diff options
| author | 2014-10-11 22:12:04 +0200 | |
|---|---|---|
| committer | 2014-10-11 22:12:04 +0200 | |
| commit | fd43544a9251fcc698b0002967d45c251c203bb2 (patch) | |
| tree | f9b9c6f82a37bd386914eb1986349bb8b799e4cd /tools/ideviceinfo.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/ideviceinfo.c')
| -rw-r--r-- | tools/ideviceinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c index 7b3b924..005023a 100644 --- a/tools/ideviceinfo.c +++ b/tools/ideviceinfo.c | |||
| @@ -103,6 +103,7 @@ static void print_usage(int argc, char **argv) | |||
| 103 | int main(int argc, char *argv[]) | 103 | int main(int argc, char *argv[]) |
| 104 | { | 104 | { |
| 105 | lockdownd_client_t client = NULL; | 105 | lockdownd_client_t client = NULL; |
| 106 | lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; | ||
| 106 | idevice_t device = NULL; | 107 | idevice_t device = NULL; |
| 107 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; | 108 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| 108 | int i; | 109 | int i; |
| @@ -179,9 +180,10 @@ int main(int argc, char *argv[]) | |||
| 179 | return -1; | 180 | return -1; |
| 180 | } | 181 | } |
| 181 | 182 | ||
| 182 | if (LOCKDOWN_E_SUCCESS != (simple ? | 183 | if (LOCKDOWN_E_SUCCESS != (ldret = simple ? |
| 183 | lockdownd_client_new(device, &client, "ideviceinfo"): | 184 | lockdownd_client_new(device, &client, "ideviceinfo"): |
| 184 | lockdownd_client_new_with_handshake(device, &client, "ideviceinfo"))) { | 185 | lockdownd_client_new_with_handshake(device, &client, "ideviceinfo"))) { |
| 186 | fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); | ||
| 185 | idevice_free(device); | 187 | idevice_free(device); |
| 186 | return -1; | 188 | return -1; |
| 187 | } | 189 | } |
