diff options
| author | 2014-10-11 22:12:04 +0200 | |
|---|---|---|
| committer | 2014-10-11 22:12:04 +0200 | |
| commit | fd43544a9251fcc698b0002967d45c251c203bb2 (patch) | |
| tree | f9b9c6f82a37bd386914eb1986349bb8b799e4cd /tools/ideviceprovision.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/ideviceprovision.c')
| -rw-r--r-- | tools/ideviceprovision.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c index 82e929d..2e13e8b 100644 --- a/tools/ideviceprovision.c +++ b/tools/ideviceprovision.c | |||
| @@ -244,6 +244,7 @@ static int profile_read_from_file(const char* path, unsigned char **profile_data | |||
| 244 | int main(int argc, char *argv[]) | 244 | int main(int argc, char *argv[]) |
| 245 | { | 245 | { |
| 246 | lockdownd_client_t client = NULL; | 246 | lockdownd_client_t client = NULL; |
| 247 | lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; | ||
| 247 | lockdownd_service_descriptor_t service = NULL; | 248 | lockdownd_service_descriptor_t service = NULL; |
| 248 | idevice_t device = NULL; | 249 | idevice_t device = NULL; |
| 249 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; | 250 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| @@ -377,7 +378,8 @@ int main(int argc, char *argv[]) | |||
| 377 | return -1; | 378 | return -1; |
| 378 | } | 379 | } |
| 379 | 380 | ||
| 380 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "ideviceprovision")) { | 381 | if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, "ideviceprovision"))) { |
| 382 | fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); | ||
| 381 | idevice_free(device); | 383 | idevice_free(device); |
| 382 | return -1; | 384 | return -1; |
| 383 | } | 385 | } |
