diff options
| author | 2020-11-19 03:33:02 +0100 | |
|---|---|---|
| committer | 2020-11-19 03:33:02 +0100 | |
| commit | a8a6c64b4d135e3c8c0411b2571f7bf65d724d8b (patch) | |
| tree | 349352cad93355c3f416df5211d8430e4f0876d2 /src/idevice.c | |
| parent | bfaf1a132a0d528cfe1dae8cbb4f0ecdeccaa88d (diff) | |
| download | libimobiledevice-a8a6c64b4d135e3c8c0411b2571f7bf65d724d8b.tar.gz libimobiledevice-a8a6c64b4d135e3c8c0411b2571f7bf65d724d8b.tar.bz2 | |
idevice: Handle -EAGAIN in case usbmuxd_send() returns it
Diffstat (limited to 'src/idevice.c')
| -rw-r--r-- | src/idevice.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/idevice.c b/src/idevice.c index 47c9ab4..c71c49b 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -527,7 +527,10 @@ static idevice_error_t internal_connection_send(idevice_connection_t connection, | |||
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | if (connection->type == CONNECTION_USBMUXD) { | 529 | if (connection->type == CONNECTION_USBMUXD) { |
| 530 | int res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes); | 530 | int res; |
| 531 | do { | ||
| 532 | res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes); | ||
| 533 | } while (res == -EAGAIN); | ||
| 531 | if (res < 0) { | 534 | if (res < 0) { |
| 532 | debug_info("ERROR: usbmuxd_send returned %d (%s)", res, strerror(-res)); | 535 | debug_info("ERROR: usbmuxd_send returned %d (%s)", res, strerror(-res)); |
| 533 | return IDEVICE_E_UNKNOWN_ERROR; | 536 | return IDEVICE_E_UNKNOWN_ERROR; |
