summaryrefslogtreecommitdiffstats
path: root/src/lockdown.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-10-05 16:51:03 +0200
committerGravatar Martin Szulecki2014-10-05 16:51:03 +0200
commit5072dea1373b7c4789a9ea1e65d05ea30acf41ed (patch)
tree51bdd0584d727080fab86acd28bd4b360b2333bd /src/lockdown.c
parent5552fa0fcc7501d3206fb3d3a64c1d04062ec53b (diff)
downloadlibimobiledevice-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.c8
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,
return LOCKDOWN_E_INVALID_ARG;
lockdownd_error_t ret = LOCKDOWN_E_SUCCESS;
- idevice_error_t err;
+ property_list_service_error_t err;
err = property_list_service_send_xml_plist(client->parent, plist);
if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) {
@@ -1031,6 +1031,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t clie
LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled)
{
lockdownd_error_t ret = LOCKDOWN_E_SUCCESS;
+ property_list_service_error_t plret;
plist_t dict = NULL;
if (!client || !host_id)
@@ -1113,8 +1114,9 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_
debug_info("Enable SSL Session: %s", (use_ssl?"true":"false"));
if (use_ssl) {
- ret = property_list_service_enable_ssl(client->parent);
- if (ret == PROPERTY_LIST_SERVICE_E_SUCCESS) {
+ plret = property_list_service_enable_ssl(client->parent);
+ if (plret == PROPERTY_LIST_SERVICE_E_SUCCESS) {
+ ret = LOCKDOWN_E_SUCCESS;
client->ssl_enabled = 1;
} else {
ret = LOCKDOWN_E_SSL_ERROR;