diff options
-rw-r--r-- | src/libusbmuxd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 613fd1c..f52a1c2 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -1060,7 +1060,8 @@ int usbmuxd_send(int sfd, const char *data, uint32_t len, uint32_t *sent_bytes) num_sent = send(sfd, (void*)data, len, 0); if (num_sent < 0) { *sent_bytes = 0; - DEBUG(1, "%s: Error %d when sending: %s\n", __func__, num_sent, strerror(errno)); + num_sent = errno; + DEBUG(1, "%s: Error %d when sending: %s\n", __func__, num_sent, strerror(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); |