diff options
| author | 2014-10-11 22:12:04 +0200 | |
|---|---|---|
| committer | 2014-10-11 22:12:04 +0200 | |
| commit | fd43544a9251fcc698b0002967d45c251c203bb2 (patch) | |
| tree | f9b9c6f82a37bd386914eb1986349bb8b799e4cd /tools/ideviceenterrecovery.c | |
| parent | 75b0ba0d69bff5de42fb21ccd5650b78c2997dfa (diff) | |
| download | libimobiledevice-fd43544a9251fcc698b0002967d45c251c203bb2.tar.gz libimobiledevice-fd43544a9251fcc698b0002967d45c251c203bb2.tar.bz2 | |
tools: Make sure to print an error when lockdown connection fails
Diffstat (limited to 'tools/ideviceenterrecovery.c')
| -rw-r--r-- | tools/ideviceenterrecovery.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
| 42 | int main(int argc, char *argv[]) | 42 | int main(int argc, char *argv[]) |
| 43 | { | 43 | { |
| 44 | lockdownd_client_t client = NULL; | 44 | lockdownd_client_t client = NULL; |
| 45 | lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; | ||
| 45 | idevice_t device = NULL; | 46 | idevice_t device = NULL; |
| 46 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; | 47 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| 47 | int i; | 48 | int i; |
| @@ -72,7 +73,8 @@ int main(int argc, char *argv[]) | |||
| 72 | return -1; | 73 | return -1; |
| 73 | } | 74 | } |
| 74 | 75 | ||
| 75 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(device, &client, "ideviceenterrecovery")) { | 76 | if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new(device, &client, "ideviceenterrecovery"))) { |
| 77 | printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); | ||
| 76 | idevice_free(device); | 78 | idevice_free(device); |
| 77 | return -1; | 79 | return -1; |
| 78 | } | 80 | } |
