diff options
author | 2019-09-26 06:54:24 +0200 | |
---|---|---|
committer | 2019-09-26 06:54:24 +0200 | |
commit | 2578b8c6c152a88a21931596cd0055d6607ecdcf (patch) | |
tree | 1a588d95123014b875a55f616d9e731dff1d61b7 /src/normal.c | |
parent | 83087efe7197dcae77d94a8ff56e1eb70907aa9e (diff) | |
download | idevicerestore-2578b8c6c152a88a21931596cd0055d6607ecdcf.tar.gz idevicerestore-2578b8c6c152a88a21931596cd0055d6607ecdcf.tar.bz2 |
Add more cancellation points to handle CTRL+C
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/normal.c b/src/normal.c index 14fa0f6..89ec462 100644 --- a/src/normal.c +++ b/src/normal.c @@ -238,14 +238,14 @@ int normal_enter_recovery(struct idevicerestore_client_t* client) device = NULL; debug("DEBUG: Waiting for device to disconnect...\n"); - WAIT_FOR(client->mode != &idevicerestore_modes[MODE_NORMAL] || (client->flags & FLAG_QUIT), 30); + WAIT_FOR(client->mode != &idevicerestore_modes[MODE_NORMAL] || (client->flags & FLAG_QUIT), 60); if (client->mode == &idevicerestore_modes[MODE_NORMAL] || (client->flags & FLAG_QUIT)) { error("ERROR: Failed to place device in recovery mode\n"); return -1; } debug("DEBUG: Waiting for device to connect in recovery mode...\n"); - WAIT_FOR(client->mode == &idevicerestore_modes[MODE_RECOVERY] || (client->flags & FLAG_QUIT), 30); + WAIT_FOR(client->mode == &idevicerestore_modes[MODE_RECOVERY] || (client->flags & FLAG_QUIT), 60); if (client->mode != &idevicerestore_modes[MODE_RECOVERY] || (client->flags & FLAG_QUIT)) { error("ERROR: Failed to enter recovery mode\n"); return -1; @@ -425,7 +425,7 @@ int normal_handle_create_stashbag(struct idevicerestore_client_t* client, plist_ } int ticks = 0; - while (ticks++ < 130) { + while (ticks++ < 130 && !(client->flags & FLAG_QUIT)) { plist_t pl = NULL; perr = preboard_receive_with_timeout(preboard, &pl, 1000); if (perr == PREBOARD_E_TIMEOUT) { |