Skip to content

Commit a4ed446

Browse files
committed
retrieving lockdownd error code on handshake failure
1 parent 2f08a1c commit a4ed446

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: src/webinspector.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ int wi_connect(const char *device_id, char **to_device_id,
106106
}
107107

108108
// connect to lockdownd
109-
if (lockdownd_client_new_with_handshake(
110-
phone, &client, "ios_webkit_debug_proxy")) {
111-
perror("Could not connect to lockdownd. Exiting.");
109+
lockdownd_error_t ldret;
110+
if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(
111+
phone, &client, "ios_webkit_debug_proxy"))) {
112+
fprintf(stderr, "Could not connect to lockdownd, error code %d. Exiting.\n", ldret);
112113
goto leave_cleanup;
113114
}
114115

0 commit comments

Comments
 (0)