Checked if the connection succeeded before writing in the socket.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7251 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
bertrand
2002-09-03 01:25:31 +00:00
parent 919b436014
commit c5cc04f2c8
+8
View File
@@ -513,11 +513,19 @@ int asf_mmst_streaming_start(stream_t *stream)
URL_t *url1 = stream->streaming_ctrl->url;
int s = stream->fd;
if( s>0 ) {
close( stream->fd );
stream->fd = -1;
}
/* parse url */
path = strchr(url1->file,'/') + 1;
url1->port=1755;
s = connect2Server( url1->hostname, url1->port );
if( s<0 ) {
return s;
}
printf ("connected\n");
/*