diff options
author | Nikias Bassen | 2009-05-18 00:39:11 +0200 |
---|---|---|
committer | Nikias Bassen | 2009-05-18 00:39:11 +0200 |
commit | a04c396a21d29da832de21c693da18e6cbf56a13 (patch) | |
tree | 8edbeb12fb1fdc6a3b555e8cd7de6bb5b53e860b /src/sock_stuff.c | |
parent | b8d58d4a9b10f35ff0b72c7348eb329eb4465feb (diff) | |
download | usbmuxd-a04c396a21d29da832de21c693da18e6cbf56a13.tar.gz usbmuxd-a04c396a21d29da832de21c693da18e6cbf56a13.tar.bz2 |
mall change to recv_buf_timeout for easier debugging.
Diffstat (limited to 'src/sock_stuff.c')
-rw-r--r-- | src/sock_stuff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sock_stuff.c b/src/sock_stuff.c index b51d6ba..137375d 100644 --- a/src/sock_stuff.c +++ b/src/sock_stuff.c @@ -287,7 +287,10 @@ int recv_buf_timeout(int fd, void *data, size_t length, int flags, // but this is an error condition if (verbose >= 3) fprintf(stderr, "%s: fd=%d recv returned 0\n", __func__, fd); - return -1; + return -EAGAIN; + } + if (result < 0) { + return -errno; } return result; } |