summaryrefslogtreecommitdiffstats
path: root/tools/idevicediagnostics.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/idevicediagnostics.c')
-rw-r--r--tools/idevicediagnostics.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/idevicediagnostics.c b/tools/idevicediagnostics.c
index 0e3e66e..66ed589 100644
--- a/tools/idevicediagnostics.c
+++ b/tools/idevicediagnostics.c
@@ -213,13 +213,18 @@ int main(int argc, char **argv)
213 213
214 /* attempt to use newer diagnostics service available on iOS 5 and later */ 214 /* attempt to use newer diagnostics service available on iOS 5 and later */
215 ret = lockdownd_start_service(lockdown_client, "com.apple.mobile.diagnostics_relay", &service); 215 ret = lockdownd_start_service(lockdown_client, "com.apple.mobile.diagnostics_relay", &service);
216 if (ret != LOCKDOWN_E_SUCCESS) { 216 if (ret == LOCKDOWN_E_INVALID_SERVICE) {
217 /* attempt to use older diagnostics service */ 217 /* attempt to use older diagnostics service */
218 ret = lockdownd_start_service(lockdown_client, "com.apple.iosdiagnostics.relay", &service); 218 ret = lockdownd_start_service(lockdown_client, "com.apple.iosdiagnostics.relay", &service);
219 } 219 }
220
221 lockdownd_client_free(lockdown_client); 220 lockdownd_client_free(lockdown_client);
222 221
222 if (ret != LOCKDOWN_E_SUCCESS) {
223 idevice_free(device);
224 printf("ERROR: Could not start diagnostics relay service: %s\n", lockdownd_strerror(ret));
225 goto cleanup;
226 }
227
223 result = EXIT_FAILURE; 228 result = EXIT_FAILURE;
224 229
225 if ((ret == LOCKDOWN_E_SUCCESS) && service && (service->port > 0)) { 230 if ((ret == LOCKDOWN_E_SUCCESS) && service && (service->port > 0)) {