From ee08a2d2d37ef356b25d21821658e16c1de82254 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 10 Dec 2006 19:35:39 +0000 Subject: [PATCH] Make sure stream->fd is set correct (esp. to -1 on error when fd is closed) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21581 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stream/http.c b/stream/http.c index 899c850ee2..ccf75eeba8 100644 --- a/stream/http.c +++ b/stream/http.c @@ -744,7 +744,6 @@ static int http_streaming_start(stream_t *stream, int* file_format) { goto err_out; } - stream->fd=fd; if( mp_msg_test(MSGT_NETWORK,MSGL_V) ) { http_debug_hdr( http_hdr ); } @@ -857,9 +856,11 @@ static int http_streaming_start(stream_t *stream, int* file_format) { err_out: if (fd > 0) closesocket( fd ); + fd = -1; res = -1; http_free( http_hdr ); out: + stream->fd = fd; return res; }