summaryrefslogtreecommitdiffstats
path: root/stream/tcp.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential bugs and issues, general cleanupsreimar2012-11-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these are reimar fixing issues found by Coverity static analyzer, and possibly some more cleanup commits independent from this. Since these commits are rather noisy, squash them all together. Try to make code a bit clearer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35294 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: audio/out/ao_alsa.c Check the correct variable for NULL. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35323 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless unreachable code (the loop condition already checks the 0xff case). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35325 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix typo that might have caused reading beyond the string end. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35326 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not needlessly use "long" types. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35331 b3059339-0415-0410-9bf9-f77b7e298cf2 Use AV_RB32 to avoid sign extension issues and validate offset before using it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35332 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove nonsense casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35343 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix crash in case sh_audio allocation failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35348 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix potential NULL dereference. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35351 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: libmpcodecs/ad_ffmpeg.c Note: Slightly modified. Fix malloc failure check to check the correct variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35353 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid code duplication and pointless casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35363 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/tv.c Error out if an invalid channel list name was specified instead of continuing and reading outside array bounds all over the place. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35364 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/tv.c Make array "static const". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35365 b3059339-0415-0410-9bf9-f77b7e298cf2 Properly free resources even when encountering many parse errors. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35367 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: parser-cfg.c Avoid leaks in error handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35380 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not do sign comparisons on "char" type which can be both signed or unsigned. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35381 b3059339-0415-0410-9bf9-f77b7e298cf2 Free cookies file data after parsing it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35382 b3059339-0415-0410-9bf9-f77b7e298cf2 http_set_field only makes a copy of the string, so we still need to free it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35383 b3059339-0415-0410-9bf9-f77b7e298cf2 check4proxies does not modify input URL, so mark it const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35390 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove proxy "support" from stream_rtp and stream_upd, trying to use a http proxy for UDP connections makes no sense. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35394 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/stream_rtp.c stream/stream_udp.c Add url_new_with_proxy function to reduce code duplication and memleaks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35395 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/pnm.c stream/stream_live555.c stream/stream_nemesi.c stream/stream_rtsp.c Fix off-by-one errors in file descriptor validity checks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35402 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35403 b3059339-0415-0410-9bf9-f77b7e298cf2 Abort when opening the file failed instead of calling "write" with an invalid descriptor. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35404 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless local variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35411 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/http.c
* Rename directories, move files (step 2 of 2)wm42012-11-121-1/+1
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* stream/tcp.c: Prefer the use of inet_ntop over inet_ntoaattila2010-11-021-3/+3
| | | | | | | inet_ntop is ipv6 safe. This fixes bug #1491. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31498 b3059339-0415-0410-9bf9-f77b7e298cf2
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Merge svn changes up to r30663Uoti Urpala2010-03-101-0/+8
|\ | | | | | | | | | | | | Conflicts: gui/cfg.c libmpcodecs/vd_dmo.c mplayer.c
| * Make sure we do not try to use IPv6 with winsock2, we end up connectingreimar2010-02-201-0/+8
| | | | | | | | | | | | | | to random addresses, causing huge delays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30661 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30475Uoti Urpala2010-03-091-2/+18
|\|
| * Add license header to all files missing it in the stream subdirectory.diego2010-01-301-2/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29412Uoti Urpala2009-07-071-1/+2
|\|
| * Replace incorrect use of strncpy by av_strlcpy.reimar2009-06-261-1/+2
| | | | | | | | | | | | | | Only a real issue if inet_ntoa can actually return a string of more than 255 bytes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29393 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-17/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-17/+17
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-10/+10
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-10/+10
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Restructure network tests: Always check for both inet_aton and inet_pton.diego2009-02-011-6/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28439 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert HAVE_WINSOCK2_H into a 0/1 definition.diego2009-02-011-8/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28437 b3059339-0415-0410-9bf9-f77b7e298cf2
* HAVE_ATON --> HAVE_INET_ATON to match FFmpeg and give it a 0/1 value.diego2009-02-011-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28435 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid u_ BSD type names.diego2008-12-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28197 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move '#define closesocket close' preprocessor directive to a common placediego2008-09-011-1/+1
| | | | | | | and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27505 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert moving closesocket definition and network headers to network.h.diego2008-08-311-1/+12
| | | | | | | This caused lots of trouble on MinGW, we need a different solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27504 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move duplicated '#define closesocket close' into network.h along withdiego2008-08-291-12/+1
| | | | | | | network-related #include #ifdeffery. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27496 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.diego2008-08-291-9/+9
| | | | | | | | | This is what it is called in FFmpeg and more consistent with other names for similar conditionals. This fixes a potential compilation failure on MinGW, as described in Bugzilla #1262. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27493 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;diego2008-08-011-2/+2
| | | | | | | CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2
* Start unifying names of internal preprocessor directives.diego2008-07-301-2/+2
| | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing stream.h #include, fixes the warning:diego2008-05-151-0/+1
| | | | | | | stream/tcp.c:197: warning: implicit declaration of function 'stream_check_interrupt' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26783 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove the need for code using stream to export an mp_input_check_interrupt()albeu2008-04-091-2/+1
| | | | | | | function. It also removes the compile-time dependency on input. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26358 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make functions static if they aren't referenced externally.zuxy2007-10-271-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24869 b3059339-0415-0410-9bf9-f77b7e298cf2
* (Re)move idiotic checks, ret can't be < 0 or > 0 if the loop conditionreimar2007-09-191-3/+2
| | | | | | | is that it is == 0! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24579 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a few typosreimar2007-09-191-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24578 b3059339-0415-0410-9bf9-f77b7e298cf2
* winsocks expects an int in milliseconds instead of struct timeval to setivo2007-03-011-4/+12
| | | | | | | | | | the timeout of a socket patch by Zuxy Meng, zuxy dot meng ... gmailcom git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22397 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a few gcc warnings, approved by Diego and Reimar.rathann2007-02-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22160 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use defined() syntax instead without ().reimar2007-02-041-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22132 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add timeout to tcp connections, avoid hanging forever.rtogni2007-02-041-0/+7
| | | | | | | Based on patch for bugzilla #673 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22131 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: recommit patch changing return values to definesreimar2006-08-261-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19549 b3059339-0415-0410-9bf9-f77b7e298cf2
* Recreate tcp.c as partial copy from network.creimar2006-08-261-0/+242
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19548 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove to allow readding as copy from network.creimar2006-08-261-291/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19547 b3059339-0415-0410-9bf9-f77b7e298cf2
* missing header for struct timevalrfelker2006-08-201-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19470 b3059339-0415-0410-9bf9-f77b7e298cf2
* isolated tcp socket code from network.c to a dedicated fileben2006-08-051-0/+290
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19341 b3059339-0415-0410-9bf9-f77b7e298cf2