changeset 5102:81c37b782fba libavformat

Use ff_neterrno instead of errno in tcp.c. If ff_neterrno() is checked instead of errno, that's probably what should be used in the return value. As a sideeffect, this gives better compatibility with Windows (CE), where network errors aren't visible in errno.) patch by Martin Storsj, martin martin st
author diego
date Wed, 15 Jul 2009 05:52:49 +0000
parents a8f8b675035b
children ccb7812599f4
files tcp.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tcp.c	Mon Jul 13 17:16:36 2009 +0000
+++ b/tcp.c	Wed Jul 15 05:52:49 2009 +0000
@@ -130,7 +130,7 @@
             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 @@
             if (len < 0) {
                 if (ff_neterrno() != FF_NETERROR(EINTR) &&
                     ff_neterrno() != FF_NETERROR(EAGAIN))
-                    return AVERROR(errno);
+                    return AVERROR(ff_neterrno());
                 continue;
             }
             size -= len;