diff options
author | 2021-07-29 03:35:35 +0200 | |
---|---|---|
committer | 2021-07-29 03:35:35 +0200 | |
commit | 8e01e874113f430dc7a1835282ff93226863e47c (patch) | |
tree | 39277c798420b5c6c300d2c2382e383bf5aa8dfe /src/idevice.c | |
parent | 4405a0fff74faaed363bc3ea4c4997293ac9d4a3 (diff) | |
download | libimobiledevice-8e01e874113f430dc7a1835282ff93226863e47c.tar.gz libimobiledevice-8e01e874113f430dc7a1835282ff93226863e47c.tar.bz2 |
Handle error cases in relevant code when retrieving pair record fails
Diffstat (limited to 'src/idevice.c')
-rw-r--r-- | src/idevice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/idevice.c b/src/idevice.c index 5b9c1ac..08a8b31 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
@@ -1069,9 +1069,9 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne | |||
1069 | idevice_error_t ret = IDEVICE_E_SSL_ERROR; | 1069 | idevice_error_t ret = IDEVICE_E_SSL_ERROR; |
1070 | plist_t pair_record = NULL; | 1070 | plist_t pair_record = NULL; |
1071 | 1071 | ||
1072 | userpref_read_pair_record(connection->device->udid, &pair_record); | 1072 | userpref_error_t uerr = userpref_read_pair_record(connection->device->udid, &pair_record); |
1073 | if (!pair_record) { | 1073 | if (uerr != USERPREF_E_SUCCESS) { |
1074 | debug_info("ERROR: Failed enabling SSL. Unable to read pair record for udid %s.", connection->device->udid); | 1074 | debug_info("ERROR: Failed enabling SSL. Unable to read pair record for udid %s (%d)", connection->device->udid, uerr); |
1075 | return ret; | 1075 | return ret; |
1076 | } | 1076 | } |
1077 | 1077 | ||