diff options
author | BALATON Zoltan | 2016-07-12 23:01:47 +0200 |
---|---|---|
committer | BALATON Zoltan | 2017-04-08 15:48:07 +0200 |
commit | 5a8449a391d2cc848f55cfb4406bad4ded0bd138 (patch) | |
tree | 8597f3d58c6fcc5747c805806525ef877ea340d9 /src/idevice.c | |
parent | 45fda819e1aae3cacf25a04b9fe22cd6ddc61f5a (diff) | |
download | libimobiledevice-5a8449a391d2cc848f55cfb4406bad4ded0bd138.tar.gz libimobiledevice-5a8449a391d2cc848f55cfb4406bad4ded0bd138.tar.bz2 |
Propagate lower level errors to callers instead of returning unknown
error for most failures
Diffstat (limited to 'src/idevice.c')
-rw-r--r-- | src/idevice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idevice.c b/src/idevice.c index b6dfe4e..913038e 100644 --- a/src/idevice.c +++ b/src/idevice.c @@ -376,8 +376,8 @@ static idevice_error_t internal_connection_receive_timeout(idevice_connection_t if (connection->type == CONNECTION_USBMUXD) { int res = usbmuxd_recv_timeout((int)(long)connection->data, data, len, recv_bytes, timeout); if (res < 0) { - debug_info("ERROR: usbmuxd_recv_timeout returned %d (%s)", res, strerror(-res)); - return IDEVICE_E_UNKNOWN_ERROR; + debug_info("ERROR: usbmuxd_recv_timeout returned %d (%s)", res, strerror(errno)); + return (res == -EAGAIN ? IDEVICE_E_NOT_ENOUGH_DATA : IDEVICE_E_UNKNOWN_ERROR); } return IDEVICE_E_SUCCESS; } else { |