diff options
author | 2022-02-04 02:15:56 +0100 | |
---|---|---|
committer | 2022-02-04 02:15:56 +0100 | |
commit | a64fcc3988f75cb4fc2388013c245e5e884bb96f (patch) | |
tree | 1b122ace4e0c658fbb80a2980a86eabc1114e0d2 /tools/idevicescreenshot.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/idevicescreenshot.c')
-rw-r--r-- | tools/idevicescreenshot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c index 62bb4a3..9b1ffa3 100644 --- a/tools/idevicescreenshot.c +++ b/tools/idevicescreenshot.c | |||
@@ -110,9 +110,9 @@ int main(int argc, char **argv) | |||
110 | return -1; | 110 | return -1; |
111 | } | 111 | } |
112 | 112 | ||
113 | lockdownd_start_service(lckd, "com.apple.mobile.screenshotr", &service); | 113 | lockdownd_error_t lerr = lockdownd_start_service(lckd, SCREENSHOTR_SERVICE_NAME, &service); |
114 | lockdownd_client_free(lckd); | 114 | lockdownd_client_free(lckd); |
115 | if (service && service->port > 0) { | 115 | if (lerr == LOCKDOWN_E_SUCCESS) { |
116 | if (screenshotr_client_new(device, service, &shotr) != SCREENSHOTR_E_SUCCESS) { | 116 | if (screenshotr_client_new(device, service, &shotr) != SCREENSHOTR_E_SUCCESS) { |
117 | printf("Could not connect to screenshotr!\n"); | 117 | printf("Could not connect to screenshotr!\n"); |
118 | } else { | 118 | } else { |
@@ -142,7 +142,7 @@ int main(int argc, char **argv) | |||
142 | screenshotr_client_free(shotr); | 142 | screenshotr_client_free(shotr); |
143 | } | 143 | } |
144 | } else { | 144 | } else { |
145 | printf("Could not start screenshotr service! Remember that you have to mount the Developer disk image on your device if you want to use the screenshotr service.\n"); | 145 | printf("Could not start screenshotr service: %s\nRemember that you have to mount the Developer disk image on your device if you want to use the screenshotr service.\n", lockdownd_strerror(lerr)); |
146 | } | 146 | } |
147 | 147 | ||
148 | if (service) | 148 | if (service) |