# HG changeset patch # User bertrand # Date 1031016331 0 # Node ID 27a1315d6af431b96801a5d333130b1524335023 # Parent 06a8e6a01180271b403213aa89c028e25f312e7c Checked if the connection succeeded before writing in the socket. diff -r 06a8e6a01180 -r 27a1315d6af4 libmpdemux/asf_mmst_streaming.c --- a/libmpdemux/asf_mmst_streaming.c Tue Sep 03 00:18:08 2002 +0000 +++ b/libmpdemux/asf_mmst_streaming.c Tue Sep 03 01:25:31 2002 +0000 @@ -513,11 +513,19 @@ 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"); /*