diff stream/asf_streaming.c @ 31500:b01f807eb183

Use MSG_NOSIGNAL flag if available for send(). This avoids MPlayer quitting due to SIGPIPE at least for these cases. Ignoring SIGPIPE in general would break window-closing with some window-managers.
author reimar
date Sun, 27 Jun 2010 15:04:13 +0000
parents 9494acd724a9
children abf1b2360d4f
line wrap: on
line diff
--- a/stream/asf_streaming.c	Sun Jun 27 15:01:24 2010 +0000
+++ b/stream/asf_streaming.c	Sun Jun 27 15:04:13 2010 +0000
@@ -728,7 +728,7 @@
 		http_hdr = asf_http_request( stream->streaming_ctrl );
 		mp_msg(MSGT_NETWORK,MSGL_DBG2,"Request [%s]\n", http_hdr->buffer );
 		for(i=0; i < (int)http_hdr->buffer_size ; ) {
-			int r = send( fd, http_hdr->buffer+i, http_hdr->buffer_size-i, 0 );
+			int r = send( fd, http_hdr->buffer+i, http_hdr->buffer_size-i, DEFAULT_SEND_FLAGS );
 			if(r <0) {
 				mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_SocketWriteError,strerror(errno));
 				goto err_out;