summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-03-11 10:21:14 +0100
committerGravatar Nikias Bassen2014-03-11 10:21:14 +0100
commit2d27e76f29885101b2d8887af6153b5ab5976ad6 (patch)
treea0672dd5d8d4ec9d13d9c25159b931dc1e13cdb9
parent6603bbc82f7590e6e4328dc9339726f04b2c8710 (diff)
downloadlibusbmuxd-2d27e76f29885101b2d8887af6153b5ab5976ad6.tar.gz
libusbmuxd-2d27e76f29885101b2d8887af6153b5ab5976ad6.tar.bz2
usbmuxd_send(): return negative errno value on error
-rw-r--r--src/libusbmuxd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 1b57b69..a2366a6 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -1048,7 +1048,7 @@ int usbmuxd_send(int sfd, const char *data, uint32_t len, uint32_t *sent_bytes)
*sent_bytes = 0;
num_sent = errno;
DEBUG(1, "%s: Error %d when sending: %s\n", __func__, num_sent, strerror(num_sent));
- return num_sent;
+ return -num_sent;
} else if ((uint32_t)num_sent < len) {
DEBUG(1, "%s: Warning: Did not send enough (only %d of %d)\n", __func__, num_sent, len);
}