summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-17 18:41:18 +0200
committerGravatar Nikias Bassen2012-07-17 18:41:18 +0200
commit8103f15cd9df4651d3bfdf63c9df308f134c22f0 (patch)
treeac181bfa3642a1603b89a0376b965ae4b5cede17 /src/restore.c
parentfe65cdaebd2e30c99be16e875c0899e82bb77483 (diff)
downloadidevicerestore-8103f15cd9df4651d3bfdf63c9df308f134c22f0.tar.gz
idevicerestore-8103f15cd9df4651d3bfdf63c9df308f134c22f0.tar.bz2
restore: Don't process further device add events if we already have a match
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/restore.c b/src/restore.c
index 1ad7bb7..d396c7f 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -364,7 +364,7 @@ static void restore_device_event_cb(const idevice_event_t *event, void *user_dat
{
if (event->event == IDEVICE_DEVICE_ADD) {
struct idevicerestore_client_t* client = (struct idevicerestore_client_t*)user_data;
- if (restore_is_current_device(client, event->udid)) {
+ if (!restore_device_connected && restore_is_current_device(client, event->udid)) {
restore_device_connected = 1;
client->udid = strdup(event->udid);
}