diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/idevicebackup.c | 3 | ||||
-rw-r--r-- | tools/idevicebackup2.c | 3 | ||||
-rw-r--r-- | tools/idevicecrashreport.c | 1 | ||||
-rw-r--r-- | tools/idevicedate.c | 4 | ||||
-rw-r--r-- | tools/idevicedebugserverproxy.c | 5 | ||||
-rw-r--r-- | tools/idevicediagnostics.c | 4 | ||||
-rw-r--r-- | tools/ideviceenterrecovery.c | 4 | ||||
-rw-r--r-- | tools/ideviceimagemounter.c | 5 | ||||
-rw-r--r-- | tools/ideviceinfo.c | 4 | ||||
-rw-r--r-- | tools/idevicename.c | 2 | ||||
-rw-r--r-- | tools/idevicepair.c | 2 | ||||
-rw-r--r-- | tools/ideviceprovision.c | 4 | ||||
-rw-r--r-- | tools/idevicescreenshot.c | 5 |
13 files changed, 30 insertions, 16 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 2159566..c5315d2 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c @@ -843,7 +843,8 @@ int main(int argc, char *argv[]) } } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicebackup")) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, "idevicebackup"))) { + printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); idevice_free(device); return -1; } diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 0370139..4fde24f 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -1499,7 +1499,8 @@ int main(int argc, char *argv[]) } lockdownd_client_t lockdown = NULL; - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lockdown, "idevicebackup2")) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lockdown, "idevicebackup2"))) { + printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); idevice_free(device); return -1; } diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c index dbed041..de2edb5 100644 --- a/tools/idevicecrashreport.c +++ b/tools/idevicecrashreport.c @@ -369,6 +369,7 @@ int main(int argc, char* argv[]) { lockdownd_error = lockdownd_client_new_with_handshake(device, &lockdownd, "idevicecrashreport"); if (lockdownd_error != LOCKDOWN_E_SUCCESS) { + fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", lockdownd_error); idevice_free(device); return -1; } diff --git a/tools/idevicedate.c b/tools/idevicedate.c index e14d587..234a8fe 100644 --- a/tools/idevicedate.c +++ b/tools/idevicedate.c @@ -56,6 +56,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; @@ -137,7 +138,8 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicedate")) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, "idevicedate"))) { + fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); result = -1; goto cleanup; } diff --git a/tools/idevicedebugserverproxy.c b/tools/idevicedebugserverproxy.c index baf3cd7..9ccb3c3 100644 --- a/tools/idevicedebugserverproxy.c +++ b/tools/idevicedebugserverproxy.c @@ -223,6 +223,7 @@ static void* connection_handler(void* data) int main(int argc, char *argv[]) { lockdownd_client_t lockdown = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; idevice_t device = NULL; idevice_connection_t connection = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; @@ -291,8 +292,8 @@ int main(int argc, char *argv[]) goto leave_cleanup; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lockdown, "idevicedebugserverproxy")) { - fprintf(stderr, "Could not connect to lockdownd. Exiting.\n"); + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lockdown, "idevicedebugserverproxy"))) { + fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); result = EXIT_FAILURE; goto leave_cleanup; } diff --git a/tools/idevicediagnostics.c b/tools/idevicediagnostics.c index 216ebf1..491441d 100644 --- a/tools/idevicediagnostics.c +++ b/tools/idevicediagnostics.c @@ -173,9 +173,9 @@ int main(int argc, char **argv) goto cleanup; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lockdown_client, "idevicediagnostics")) { + if (LOCKDOWN_E_SUCCESS != (ret = lockdownd_client_new_with_handshake(device, &lockdown_client, "idevicediagnostics"))) { idevice_free(device); - printf("Unable to connect to lockdownd.\n"); + printf("ERROR: Could not connect to lockdownd, error code %d\n", ret); goto cleanup; } diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c index 444d531..2747923 100644 --- a/tools/ideviceenterrecovery.c +++ b/tools/ideviceenterrecovery.c @@ -42,6 +42,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; @@ -72,7 +73,8 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(device, &client, "ideviceenterrecovery")) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new(device, &client, "ideviceenterrecovery"))) { + printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); idevice_free(device); return -1; } diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c index 29d25d7..9ce25c9 100644 --- a/tools/ideviceimagemounter.c +++ b/tools/ideviceimagemounter.c @@ -138,6 +138,7 @@ int main(int argc, char **argv) { idevice_t device = NULL; lockdownd_client_t lckd = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; mobile_image_mounter_client_t mim = NULL; afc_client_t afc = NULL; lockdownd_service_descriptor_t service = NULL; @@ -172,8 +173,8 @@ int main(int argc, char **argv) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, "ideviceimagemounter")) { - printf("ERROR: could not connect to lockdown. Exiting.\n"); + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lckd, "ideviceimagemounter"))) { + printf("ERROR: Could not connect to lockdown, error code %d.\n", ldret); goto leave; } diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c index 7b3b924..005023a 100644 --- a/tools/ideviceinfo.c +++ b/tools/ideviceinfo.c @@ -103,6 +103,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; @@ -179,9 +180,10 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != (simple ? + if (LOCKDOWN_E_SUCCESS != (ldret = simple ? lockdownd_client_new(device, &client, "ideviceinfo"): lockdownd_client_new_with_handshake(device, &client, "ideviceinfo"))) { + fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); idevice_free(device); return -1; } diff --git a/tools/idevicename.c b/tools/idevicename.c index 7e4c372..c013edc 100644 --- a/tools/idevicename.c +++ b/tools/idevicename.c @@ -87,7 +87,7 @@ int main(int argc, char** argv) lockdownd_error_t lerr = lockdownd_client_new_with_handshake(device, &lockdown, "idevicename"); if (lerr != LOCKDOWN_E_SUCCESS) { idevice_free(device); - fprintf(stderr, "ERROR: lockdown connection failed, lockdown error %d\n", lerr); + fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", lerr); return -1; } diff --git a/tools/idevicepair.c b/tools/idevicepair.c index 872d44a..d02a258 100644 --- a/tools/idevicepair.c +++ b/tools/idevicepair.c @@ -226,7 +226,7 @@ int main(int argc, char **argv) lerr = lockdownd_client_new(device, &client, "idevicepair"); if (lerr != LOCKDOWN_E_SUCCESS) { idevice_free(device); - printf("ERROR: lockdownd_client_new failed with error code %d\n", lerr); + printf("ERROR: Could not connect to lockdownd, error code %d\n", lerr); return EXIT_FAILURE; } diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c index 82e929d..2e13e8b 100644 --- a/tools/ideviceprovision.c +++ b/tools/ideviceprovision.c @@ -244,6 +244,7 @@ static int profile_read_from_file(const char* path, unsigned char **profile_data int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; lockdownd_service_descriptor_t service = NULL; idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; @@ -377,7 +378,8 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "ideviceprovision")) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, "ideviceprovision"))) { + fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); idevice_free(device); return -1; } diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c index 486265e..bc3793a 100644 --- a/tools/idevicescreenshot.c +++ b/tools/idevicescreenshot.c @@ -35,6 +35,7 @@ int main(int argc, char **argv) { idevice_t device = NULL; lockdownd_client_t lckd = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; screenshotr_client_t shotr = NULL; lockdownd_service_descriptor_t service = NULL; int result = -1; @@ -80,9 +81,9 @@ int main(int argc, char **argv) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lckd, NULL))) { idevice_free(device); - printf("Exiting.\n"); + printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); return -1; } |