From 14bacd927e8621d723a3d67c49f43a0485c3eff4 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 29 Nov 2012 04:02:18 +0100 Subject: tools: mass replace 'device' with 'phone' variable names --- tools/idevicebackup2.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tools/idevicebackup2.c') diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 566a41f..0a06f3f 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -60,7 +60,7 @@ static mobilebackup2_client_t mobilebackup2 = NULL; static lockdownd_client_t client = NULL; static afc_client_t afc = NULL; -static idevice_t phone = NULL; +static idevice_t device = NULL; static int verbose = 1; static int quit_flag = 0; @@ -539,14 +539,14 @@ static void do_post_notification(const char *notification) np_client_t np; if (!client) { - if (lockdownd_client_new_with_handshake(phone, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { + if (lockdownd_client_new_with_handshake(device, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { return; } } lockdownd_start_service(client, NP_SERVICE_NAME, &nport); if (nport) { - np_client_new(phone, nport, &np); + np_client_new(device, nport, &np); if (np) { np_post_notification(np, notification); np_client_free(np); @@ -1291,7 +1291,7 @@ int main(int argc, char *argv[]) } if (udid) { - ret = idevice_new(&phone, udid); + ret = idevice_new(&device, udid); if (ret != IDEVICE_E_SUCCESS) { printf("No device found with udid %s, is it plugged in?\n", udid); return -1; @@ -1299,12 +1299,12 @@ int main(int argc, char *argv[]) } else { - ret = idevice_new(&phone, NULL); + ret = idevice_new(&device, NULL); if (ret != IDEVICE_E_SUCCESS) { printf("No device found, is it plugged in?\n"); return -1; } - idevice_get_udid(phone, &udid); + idevice_get_udid(device, &udid); } /* backup directory must contain an Info.plist */ @@ -1319,8 +1319,8 @@ int main(int argc, char *argv[]) PRINT_VERBOSE(1, "Backup directory is \"%s\"\n", backup_directory); - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "idevicebackup")) { - idevice_free(phone); + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicebackup")) { + idevice_free(device); return -1; } @@ -1328,7 +1328,7 @@ int main(int argc, char *argv[]) np_client_t np = NULL; ret = lockdownd_start_service(client, NP_SERVICE_NAME, &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { - np_client_new(phone, port, &np); + np_client_new(device, port, &np); np_set_notify_callback(np, notify_cb, NULL); const char *noties[5] = { NP_SYNC_CANCEL_REQUEST, @@ -1348,7 +1348,7 @@ int main(int argc, char *argv[]) port = 0; ret = lockdownd_start_service(client, "com.apple.afc", &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { - afc_client_new(phone, port, &afc); + afc_client_new(device, port, &afc); } } @@ -1357,7 +1357,7 @@ int main(int argc, char *argv[]) ret = lockdownd_start_service(client, MOBILEBACKUP2_SERVICE_NAME, &port); if ((ret == LOCKDOWN_E_SUCCESS) && port) { PRINT_VERBOSE(1, "Started \"%s\" service on port %d.\n", MOBILEBACKUP2_SERVICE_NAME, port); - mobilebackup2_client_new(phone, port, &mobilebackup2); + mobilebackup2_client_new(device, port, &mobilebackup2); /* send Hello message */ double local_versions[2] = {2.0, 2.1}; @@ -1884,7 +1884,7 @@ files_out: if (np) np_client_free(np); - idevice_free(phone); + idevice_free(device); if (udid) { free(udid); -- cgit v1.1-32-gdbae