From fd43544a9251fcc698b0002967d45c251c203bb2 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 11 Oct 2014 22:12:04 +0200 Subject: tools: Make sure to print an error when lockdown connection fails --- tools/idevicedebugserverproxy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/idevicedebugserverproxy.c') 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; } -- cgit v1.1-32-gdbae