diff options
| author | 2014-10-11 22:12:04 +0200 | |
|---|---|---|
| committer | 2014-10-11 22:12:04 +0200 | |
| commit | fd43544a9251fcc698b0002967d45c251c203bb2 (patch) | |
| tree | f9b9c6f82a37bd386914eb1986349bb8b799e4cd /tools/idevicescreenshot.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/idevicescreenshot.c')
| -rw-r--r-- | tools/idevicescreenshot.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c index 486265e..bc3793a 100644 --- a/tools/idevicescreenshot.c +++ b/tools/idevicescreenshot.c | |||
| @@ -35,6 +35,7 @@ int main(int argc, char **argv) | |||
| 35 | { | 35 | { |
| 36 | idevice_t device = NULL; | 36 | idevice_t device = NULL; |
| 37 | lockdownd_client_t lckd = NULL; | 37 | lockdownd_client_t lckd = NULL; |
| 38 | lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; | ||
| 38 | screenshotr_client_t shotr = NULL; | 39 | screenshotr_client_t shotr = NULL; |
| 39 | lockdownd_service_descriptor_t service = NULL; | 40 | lockdownd_service_descriptor_t service = NULL; |
| 40 | int result = -1; | 41 | int result = -1; |
| @@ -80,9 +81,9 @@ int main(int argc, char **argv) | |||
| 80 | return -1; | 81 | return -1; |
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) { | 84 | if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lckd, NULL))) { |
| 84 | idevice_free(device); | 85 | idevice_free(device); |
| 85 | printf("Exiting.\n"); | 86 | printf("ERROR: Could not connect to lockdownd, error code %d\n", ldret); |
| 86 | return -1; | 87 | return -1; |
| 87 | } | 88 | } |
| 88 | 89 | ||
