summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-05-18 00:39:11 +0200
committerGravatar Nikias Bassen2009-05-18 00:39:11 +0200
commita04c396a21d29da832de21c693da18e6cbf56a13 (patch)
tree8edbeb12fb1fdc6a3b555e8cd7de6bb5b53e860b /src
parentb8d58d4a9b10f35ff0b72c7348eb329eb4465feb (diff)
downloadusbmuxd-a04c396a21d29da832de21c693da18e6cbf56a13.tar.gz
usbmuxd-a04c396a21d29da832de21c693da18e6cbf56a13.tar.bz2
mall change to recv_buf_timeout for easier debugging.
Diffstat (limited to 'src')
-rw-r--r--src/sock_stuff.c5
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;
}