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: =?UTF-8?q?Use=20ff=5Fneterrno=20instead=20of=20errno=20in=20tcp.c?= =?UTF-8?q?.=20If=20ff=5Fneterrno()=20is=20checked=20instead=20of=20errno,?= =?UTF-8?q?=20that's=20probably=20what=20should=20be=20used=20in=20the=20r?= =?UTF-8?q?eturn=20value.=20As=20a=20sideeffect,=20this=20gives=20better?= =?UTF-8?q?=20compatibility=20with=20Windows=20(CE),=20where=20network=20e?= =?UTF-8?q?rrors=20aren't=20visible=20in=20errno.)=20patch=20by=20Martin?= =?UTF-8?q?=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(-) (limited to 'libavformat/tcp.c') 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; -- cgit v1.2.3