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/ideviceenterrecovery.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/ideviceenterrecovery.c') diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c index 444d531..2747923 100644 --- a/tools/ideviceenterrecovery.c +++ b/tools/ideviceenterrecovery.c @@ -42,6 +42,7 @@ static void print_usage(int argc, char **argv) int main(int argc, char *argv[]) { lockdownd_client_t client = NULL; + lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; idevice_t device = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; @@ -72,7 +73,8 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(device, &client, "ideviceenterrecovery")) { + if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new(device, &client, "ideviceenterrecovery"))) { + printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); idevice_free(device); return -1; } -- cgit v1.1-32-gdbae