diff options
| author | 2016-07-12 23:01:47 +0200 | |
|---|---|---|
| committer | 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 | |||
| 376 | if (connection->type == CONNECTION_USBMUXD) { | 376 | if (connection->type == CONNECTION_USBMUXD) { |
| 377 | int res = usbmuxd_recv_timeout((int)(long)connection->data, data, len, recv_bytes, timeout); | 377 | int res = usbmuxd_recv_timeout((int)(long)connection->data, data, len, recv_bytes, timeout); |
| 378 | if (res < 0) { | 378 | if (res < 0) { |
| 379 | debug_info("ERROR: usbmuxd_recv_timeout returned %d (%s)", res, strerror(-res)); | 379 | debug_info("ERROR: usbmuxd_recv_timeout returned %d (%s)", res, strerror(errno)); |
| 380 | return IDEVICE_E_UNKNOWN_ERROR; | 380 | return (res == -EAGAIN ? IDEVICE_E_NOT_ENOUGH_DATA : IDEVICE_E_UNKNOWN_ERROR); |
| 381 | } | 381 | } |
| 382 | return IDEVICE_E_SUCCESS; | 382 | return IDEVICE_E_SUCCESS; |
| 383 | } else { | 383 | } else { |
