diff options
-rw-r--r-- | tools/idevicebackup.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index b9fb81a..c5c5b37 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c @@ -27,6 +27,7 @@ #include <signal.h> #include <glib.h> #include <gcrypt.h> +#include <unistd.h> #include <libimobiledevice/libimobiledevice.h> #include <libimobiledevice/lockdown.h> @@ -946,6 +947,12 @@ int main(int argc, char *argv[]) /* process series of DLSendFile messages */ do { mobilebackup_receive(mobilebackup, &message); + if (!message) { + printf("Device is not ready yet. Going to try again in 2 seconds...\n"); + sleep(2); + continue; + } + node = plist_array_get_item(message, 0); /* get out if we don't get a DLSendFile */ |