diff options
| author | 2014-10-05 16:51:03 +0200 | |
|---|---|---|
| committer | 2014-10-05 16:51:03 +0200 | |
| commit | 5072dea1373b7c4789a9ea1e65d05ea30acf41ed (patch) | |
| tree | 51bdd0584d727080fab86acd28bd4b360b2333bd /src/lockdown.c | |
| parent | 5552fa0fcc7501d3206fb3d3a64c1d04062ec53b (diff) | |
| download | libimobiledevice-5072dea1373b7c4789a9ea1e65d05ea30acf41ed.tar.gz libimobiledevice-5072dea1373b7c4789a9ea1e65d05ea30acf41ed.tar.bz2 | |
Convert int16_t macro error types into enum to improve debugging/type-checking
This simple change provides various benefits for developers like compile
time errors, better auto-completition in editors and the ability of a
debugger to show the constant instead of just the raw value.
Thanks to Aaron Burghardt for the proposal.
Diffstat (limited to 'src/lockdown.c')
| -rw-r--r-- | src/lockdown.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 8dc1644..14886c9 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -287,7 +287,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_send(lockdownd_client_t client, | |||
| 287 | return LOCKDOWN_E_INVALID_ARG; | 287 | return LOCKDOWN_E_INVALID_ARG; |
| 288 | 288 | ||
| 289 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; | 289 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; |
| 290 | idevice_error_t err; | 290 | property_list_service_error_t err; |
| 291 | 291 | ||
| 292 | err = property_list_service_send_xml_plist(client->parent, plist); | 292 | err = property_list_service_send_xml_plist(client->parent, plist); |
| 293 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 293 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { |
| @@ -1031,6 +1031,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t clie | |||
| 1031 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) | 1031 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) |
| 1032 | { | 1032 | { |
| 1033 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; | 1033 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; |
| 1034 | property_list_service_error_t plret; | ||
| 1034 | plist_t dict = NULL; | 1035 | plist_t dict = NULL; |
| 1035 | 1036 | ||
| 1036 | if (!client || !host_id) | 1037 | if (!client || !host_id) |
| @@ -1113,8 +1114,9 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_ | |||
| 1113 | debug_info("Enable SSL Session: %s", (use_ssl?"true":"false")); | 1114 | debug_info("Enable SSL Session: %s", (use_ssl?"true":"false")); |
| 1114 | 1115 | ||
| 1115 | if (use_ssl) { | 1116 | if (use_ssl) { |
| 1116 | ret = property_list_service_enable_ssl(client->parent); | 1117 | plret = property_list_service_enable_ssl(client->parent); |
| 1117 | if (ret == PROPERTY_LIST_SERVICE_E_SUCCESS) { | 1118 | if (plret == PROPERTY_LIST_SERVICE_E_SUCCESS) { |
| 1119 | ret = LOCKDOWN_E_SUCCESS; | ||
| 1118 | client->ssl_enabled = 1; | 1120 | client->ssl_enabled = 1; |
| 1119 | } else { | 1121 | } else { |
| 1120 | ret = LOCKDOWN_E_SSL_ERROR; | 1122 | ret = LOCKDOWN_E_SSL_ERROR; |
