diff options
author | 2022-02-04 02:15:56 +0100 | |
---|---|---|
committer | 2022-02-04 02:15:56 +0100 | |
commit | a64fcc3988f75cb4fc2388013c245e5e884bb96f (patch) | |
tree | 1b122ace4e0c658fbb80a2980a86eabc1114e0d2 /tools/ideviceprovision.c | |
parent | ac89a1fed5ad916c81bca1515b10934e3e01b057 (diff) | |
download | libimobiledevice-a64fcc3988f75cb4fc2388013c245e5e884bb96f.tar.gz libimobiledevice-a64fcc3988f75cb4fc2388013c245e5e884bb96f.tar.bz2 |
tools: Print meaningful error messages when service startup fails
Diffstat (limited to 'tools/ideviceprovision.c')
-rw-r--r-- | tools/ideviceprovision.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c index 36c69b0..1dee899 100644 --- a/tools/ideviceprovision.c +++ b/tools/ideviceprovision.c | |||
@@ -481,8 +481,9 @@ int main(int argc, char *argv[]) | |||
481 | } | 481 | } |
482 | int product_version = ((product_version_major & 0xFF) << 16) | ((product_version_minor & 0xFF) << 8) | (product_version_patch & 0xFF); | 482 | int product_version = ((product_version_major & 0xFF) << 16) | ((product_version_minor & 0xFF) << 8) | (product_version_patch & 0xFF); |
483 | 483 | ||
484 | if (LOCKDOWN_E_SUCCESS != lockdownd_start_service(client, "com.apple.misagent", &service)) { | 484 | lockdownd_error_t lerr = lockdownd_start_service(client, MISAGENT_SERVICE_NAME, &service); |
485 | fprintf(stderr, "Could not start service \"com.apple.misagent\"\n"); | 485 | if (lerr != LOCKDOWN_E_SUCCESS) { |
486 | fprintf(stderr, "Could not start service %s: %s\n", MISAGENT_SERVICE_NAME, lockdownd_strerror(lerr)); | ||
486 | lockdownd_client_free(client); | 487 | lockdownd_client_free(client); |
487 | idevice_free(device); | 488 | idevice_free(device); |
488 | return -1; | 489 | return -1; |
@@ -492,7 +493,7 @@ int main(int argc, char *argv[]) | |||
492 | 493 | ||
493 | misagent_client_t mis = NULL; | 494 | misagent_client_t mis = NULL; |
494 | if (misagent_client_new(device, service, &mis) != MISAGENT_E_SUCCESS) { | 495 | if (misagent_client_new(device, service, &mis) != MISAGENT_E_SUCCESS) { |
495 | fprintf(stderr, "Could not connect to \"com.apple.misagent\" on device\n"); | 496 | fprintf(stderr, "Could not connect to %s on device\n", MISAGENT_SERVICE_NAME); |
496 | if (service) | 497 | if (service) |
497 | lockdownd_service_descriptor_free(service); | 498 | lockdownd_service_descriptor_free(service); |
498 | lockdownd_client_free(client); | 499 | lockdownd_client_free(client); |