summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ideviceinstaller.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 12f2caf..5ff9dad 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -323,7 +323,10 @@ static int zip_get_app_directory(struct zip* zf, char** path)
static void idevice_event_callback(const idevice_event_t* event, void* userdata)
{
if (event->event == IDEVICE_DEVICE_REMOVE) {
- is_device_connected = 0;
+ if (!strcmp(udid, event->udid)) {
+ fprintf(stderr, "ideviceinstaller: Device removed\n");
+ is_device_connected = 0;
+ }
}
}
@@ -657,6 +660,10 @@ int main(int argc, char **argv)
return -1;
}
+ if (!udid) {
+ idevice_get_udid(phone, &udid);
+ }
+
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceinstaller")) {
fprintf(stderr, "Could not connect to lockdownd. Exiting.\n");
goto leave_cleanup;