diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/diagnostics_relay.c | 2 | ||||
| -rw-r--r-- | src/lockdown.c | 8 | ||||
| -rw-r--r-- | src/restore.c | 8 | ||||
| -rw-r--r-- | src/service.c | 6 | ||||
| -rw-r--r-- | src/syslog_relay.c | 2 |
5 files changed, 15 insertions, 11 deletions
diff --git a/src/diagnostics_relay.c b/src/diagnostics_relay.c index 055f60a..825678a 100644 --- a/src/diagnostics_relay.c +++ b/src/diagnostics_relay.c | |||
| @@ -153,7 +153,7 @@ static diagnostics_relay_error_t diagnostics_relay_send(diagnostics_relay_client | |||
| 153 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 153 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| 154 | 154 | ||
| 155 | diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_SUCCESS; | 155 | diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_SUCCESS; |
| 156 | idevice_error_t err; | 156 | property_list_service_error_t err; |
| 157 | 157 | ||
| 158 | err = property_list_service_send_xml_plist(client->parent, plist); | 158 | err = property_list_service_send_xml_plist(client->parent, plist); |
| 159 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 159 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { |
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; |
diff --git a/src/restore.c b/src/restore.c index 3f6be8f..4d4823f 100644 --- a/src/restore.c +++ b/src/restore.c | |||
| @@ -154,7 +154,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, pl | |||
| 154 | return RESTORE_E_INVALID_ARG; | 154 | return RESTORE_E_INVALID_ARG; |
| 155 | 155 | ||
| 156 | restored_error_t ret = RESTORE_E_SUCCESS; | 156 | restored_error_t ret = RESTORE_E_SUCCESS; |
| 157 | idevice_error_t err; | 157 | property_list_service_error_t err; |
| 158 | 158 | ||
| 159 | err = property_list_service_send_xml_plist(client->parent, plist); | 159 | err = property_list_service_send_xml_plist(client->parent, plist); |
| 160 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { | 160 | if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { |
| @@ -297,6 +297,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest | |||
| 297 | return RESTORE_E_INVALID_ARG; | 297 | return RESTORE_E_INVALID_ARG; |
| 298 | 298 | ||
| 299 | restored_error_t ret = RESTORE_E_SUCCESS; | 299 | restored_error_t ret = RESTORE_E_SUCCESS; |
| 300 | idevice_error_t idev_ret; | ||
| 300 | 301 | ||
| 301 | static struct lockdownd_service_descriptor service = { | 302 | static struct lockdownd_service_descriptor service = { |
| 302 | .port = 0xf27e, | 303 | .port = 0xf27e, |
| @@ -317,9 +318,10 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest | |||
| 317 | if (label != NULL) | 318 | if (label != NULL) |
| 318 | client_loc->label = strdup(label); | 319 | client_loc->label = strdup(label); |
| 319 | 320 | ||
| 320 | ret = idevice_get_udid(device, &client_loc->udid); | 321 | idev_ret = idevice_get_udid(device, &client_loc->udid); |
| 321 | if (RESTORE_E_SUCCESS != ret) { | 322 | if (IDEVICE_E_SUCCESS != idev_ret) { |
| 322 | debug_info("failed to get device udid."); | 323 | debug_info("failed to get device udid."); |
| 324 | ret = RESTORE_E_DEVICE_ERROR; | ||
| 323 | } | 325 | } |
| 324 | debug_info("device udid: %s", client_loc->udid); | 326 | debug_info("device udid: %s", client_loc->udid); |
| 325 | 327 | ||
diff --git a/src/service.c b/src/service.c index c4743dc..48959b6 100644 --- a/src/service.c +++ b/src/service.c | |||
| @@ -76,7 +76,7 @@ LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdo | |||
| 76 | return SERVICE_E_SUCCESS; | 76 | return SERVICE_E_SUCCESS; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code) | 79 | LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int32_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int32_t *error_code) |
| 80 | { | 80 | { |
| 81 | *client = NULL; | 81 | *client = NULL; |
| 82 | 82 | ||
| @@ -95,9 +95,9 @@ LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevic | |||
| 95 | return SERVICE_E_START_SERVICE_ERROR; | 95 | return SERVICE_E_START_SERVICE_ERROR; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | int16_t ec; | 98 | int32_t ec; |
| 99 | if (constructor_func) { | 99 | if (constructor_func) { |
| 100 | ec = (int16_t)constructor_func(device, service, client); | 100 | ec = (int32_t)constructor_func(device, service, client); |
| 101 | } else { | 101 | } else { |
| 102 | ec = service_client_new(device, service, (service_client_t*)client); | 102 | ec = service_client_new(device, service, (service_client_t*)client); |
| 103 | } | 103 | } |
diff --git a/src/syslog_relay.c b/src/syslog_relay.c index 63e7d34..44006ce 100644 --- a/src/syslog_relay.c +++ b/src/syslog_relay.c | |||
| @@ -139,7 +139,7 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive_with_timeout(sysl | |||
| 139 | 139 | ||
| 140 | void *syslog_relay_worker(void *arg) | 140 | void *syslog_relay_worker(void *arg) |
| 141 | { | 141 | { |
| 142 | service_error_t ret = SERVICE_E_UNKNOWN_ERROR; | 142 | syslog_relay_error_t ret = SYSLOG_RELAY_E_UNKNOWN_ERROR; |
| 143 | struct syslog_relay_worker_thread *srwt = (struct syslog_relay_worker_thread*)arg; | 143 | struct syslog_relay_worker_thread *srwt = (struct syslog_relay_worker_thread*)arg; |
| 144 | 144 | ||
| 145 | if (!srwt) | 145 | if (!srwt) |
