summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-11-19 03:33:02 +0100
committerGravatar Nikias Bassen2020-11-19 03:33:02 +0100
commita8a6c64b4d135e3c8c0411b2571f7bf65d724d8b (patch)
tree349352cad93355c3f416df5211d8430e4f0876d2 /src
parentbfaf1a132a0d528cfe1dae8cbb4f0ecdeccaa88d (diff)
downloadlibimobiledevice-a8a6c64b4d135e3c8c0411b2571f7bf65d724d8b.tar.gz
libimobiledevice-a8a6c64b4d135e3c8c0411b2571f7bf65d724d8b.tar.bz2
idevice: Handle -EAGAIN in case usbmuxd_send() returns it
Diffstat (limited to 'src')
-rw-r--r--src/idevice.c5
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,
}
if (connection->type == CONNECTION_USBMUXD) {
- int res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes);
+ int res;
+ do {
+ res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes);
+ } while (res == -EAGAIN);
if (res < 0) {
debug_info("ERROR: usbmuxd_send returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;