diff options
| author | 2014-10-11 22:12:04 +0200 | |
|---|---|---|
| committer | 2014-10-11 22:12:04 +0200 | |
| commit | fd43544a9251fcc698b0002967d45c251c203bb2 (patch) | |
| tree | f9b9c6f82a37bd386914eb1986349bb8b799e4cd /tools/idevicedate.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/idevicedate.c')
| -rw-r--r-- | tools/idevicedate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/idevicedate.c b/tools/idevicedate.c index e14d587..234a8fe 100644 --- a/tools/idevicedate.c +++ b/tools/idevicedate.c | |||
| @@ -56,6 +56,7 @@ static void print_usage(int argc, char **argv) | |||
| 56 | int main(int argc, char *argv[]) | 56 | int main(int argc, char *argv[]) |
| 57 | { | 57 | { |
| 58 | lockdownd_client_t client = NULL; | 58 | lockdownd_client_t client = NULL; |
| 59 | lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR; | ||
| 59 | idevice_t device = NULL; | 60 | idevice_t device = NULL; |
| 60 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; | 61 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| 61 | int i; | 62 | int i; |
| @@ -137,7 +138,8 @@ int main(int argc, char *argv[]) | |||
| 137 | return -1; | 138 | return -1; |
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicedate")) { | 141 | if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &client, "idevicedate"))) { |
| 142 | fprintf(stderr, "ERROR: Could not connect to lockdownd, error code %d\n", ldret); | ||
| 141 | result = -1; | 143 | result = -1; |
| 142 | goto cleanup; | 144 | goto cleanup; |
| 143 | } | 145 | } |
