From 73c1326809b3da1e701aad46a36943e2d65db52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Jul 2009 05:52:49 +0000 Subject: [PATCH] =?UTF-8?q?Use=20ff=5Fneterrno=20instead=20of=20errno=20in?= =?UTF-8?q?=20tcp.c.=20If=20ff=5Fneterrno()=20is=20checked=20instead=20of?= =?UTF-8?q?=20errno,=20that's=20probably=20what=20should=20be=20used=20in?= =?UTF-8?q?=20the=20return=20value.=20As=20a=20sideeffect,=20this=20gives?= =?UTF-8?q?=20better=20compatibility=20with=20Windows=20(CE),=20where=20ne?= =?UTF-8?q?twork=20errors=20aren't=20visible=20in=20errno.)=20patch=20by?= =?UTF-8?q?=20Martin=20Storsj=C3=B6,=20martin=20martin=20st?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 19433 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/tcp.c b/libavformat/tcp.c index b7983e7c98..05676eb83d 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -130,7 +130,7 @@ static int tcp_read(URLContext *h, uint8_t *buf, int size) if (len < 0) { if (ff_neterrno() != FF_NETERROR(EINTR) && ff_neterrno() != FF_NETERROR(EAGAIN)) - return AVERROR(errno); + return AVERROR(ff_neterrno()); } else return len; } else if (ret < 0) { return -1; @@ -160,7 +160,7 @@ static int tcp_write(URLContext *h, uint8_t *buf, int size) if (len < 0) { if (ff_neterrno() != FF_NETERROR(EINTR) && ff_neterrno() != FF_NETERROR(EAGAIN)) - return AVERROR(errno); + return AVERROR(ff_neterrno()); continue; } size -= len;