diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-06-27 15:04:13 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:11:43 +0200 |
commit | 41d25ebcc8bc8601bd66f5435c75fdff25cadc17 (patch) | |
tree | 6cf36aab161902d1b1cd508e89e0acfaf1592c18 /stream/stream_ftp.c | |
parent | e55135212138800f0107247c1f3ded81366cd123 (diff) | |
download | mpv-41d25ebcc8bc8601bd66f5435c75fdff25cadc17.tar.bz2 mpv-41d25ebcc8bc8601bd66f5435c75fdff25cadc17.tar.xz |
stream: 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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31566 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_ftp.c')
-rw-r--r-- | stream/stream_ftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/stream_ftp.c b/stream/stream_ftp.c index 1df2f897c9..69dc326641 100644 --- a/stream/stream_ftp.c +++ b/stream/stream_ftp.c @@ -213,7 +213,7 @@ static int FtpSendCmd(const char *cmd, struct stream_priv_s *nControl,char* rsp) if(hascrlf && l == 2) mp_msg(MSGT_STREAM,MSGL_V, "\n"); else mp_msg(MSGT_STREAM,MSGL_V, "[ftp] > %s",cmd); while(l > 0) { - int s = send(nControl->handle,cmd,l,0); + int s = send(nControl->handle,cmd,l,DEFAULT_SEND_FLAGS); if(s <= 0) { mp_msg(MSGT_OPEN,MSGL_ERR, "[ftp] write error: %s\n",strerror(errno)); @@ -343,8 +343,8 @@ static int seek(stream_t *s,off_t newpos) { //fcntl(p->handle,F_SETFL,fl&~O_NONBLOCK); // send only first byte as OOB due to OOB braindamage in many unices - send(p->handle,pre_cmd,1,MSG_OOB); - send(p->handle,pre_cmd+1,sizeof(pre_cmd)-1,0); + send(p->handle,pre_cmd,1,MSG_OOB|DEFAULT_SEND_FLAGS); + send(p->handle,pre_cmd+1,sizeof(pre_cmd)-1,DEFAULT_SEND_FLAGS); //fcntl(p->handle,F_SETFL,fl); |