diff options
-rw-r--r-- | tools/idevicebackup2.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 229fa93..0370139 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -1201,6 +1201,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; int i; char* udid = NULL; char* source_udid = NULL; @@ -1505,8 +1506,8 @@ int main(int argc, char *argv[]) /* start notification_proxy */ np_client_t np = NULL; - ret = lockdownd_start_service(lockdown, NP_SERVICE_NAME, &service); - if ((ret == LOCKDOWN_E_SUCCESS) && service && service->port) { + ldret = lockdownd_start_service(lockdown, NP_SERVICE_NAME, &service); + if ((ldret == LOCKDOWN_E_SUCCESS) && service && service->port) { np_client_new(device, service, &np); np_set_notify_callback(np, notify_cb, NULL); const char *noties[5] = { @@ -1526,8 +1527,8 @@ int main(int argc, char *argv[]) /* start AFC, we need this for the lock file */ service->port = 0; service->ssl_enabled = 0; - ret = lockdownd_start_service(lockdown, AFC_SERVICE_NAME, &service); - if ((ret == LOCKDOWN_E_SUCCESS) && service->port) { + ldret = lockdownd_start_service(lockdown, AFC_SERVICE_NAME, &service); + if ((ldret == LOCKDOWN_E_SUCCESS) && service->port) { afc_client_new(device, service, &afc); } } @@ -1539,8 +1540,8 @@ int main(int argc, char *argv[]) /* start mobilebackup service and retrieve port */ mobilebackup2_client_t mobilebackup2 = NULL; - ret = lockdownd_start_service_with_escrow_bag(lockdown, MOBILEBACKUP2_SERVICE_NAME, &service); - if ((ret == LOCKDOWN_E_SUCCESS) && service && service->port) { + ldret = lockdownd_start_service_with_escrow_bag(lockdown, MOBILEBACKUP2_SERVICE_NAME, &service); + if ((ldret == LOCKDOWN_E_SUCCESS) && service && service->port) { PRINT_VERBOSE(1, "Started \"%s\" service on port %d.\n", MOBILEBACKUP2_SERVICE_NAME, service->port); mobilebackup2_client_new(device, service, &mobilebackup2); |