summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-10-05 16:58:20 +0200
committerGravatar Martin Szulecki2014-10-05 16:58:20 +0200
commit7aad73614e19a5cf73e1926c0279adb481fbb8e9 (patch)
treef66e0be2810d367222b8f4ed1ee2a5b866e1b79d /tools
parent9ab98650ab0ce0ca816ba66814e7946c639d6b02 (diff)
downloadlibimobiledevice-7aad73614e19a5cf73e1926c0279adb481fbb8e9.tar.gz
libimobiledevice-7aad73614e19a5cf73e1926c0279adb481fbb8e9.tar.bz2
idevicebackup2: Fix error variables for type consistency
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup2.c13
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);