diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/iphone.c | 10 | ||||
| -rw-r--r-- | src/lockdown.c | 26 | ||||
| -rw-r--r-- | src/mobilesync.c | 2 | ||||
| -rw-r--r-- | src/property_list_service.c | 6 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/iphone.c b/src/iphone.c index 85d136c..b471e35 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -316,7 +316,7 @@ iphone_error_t iphone_connection_send(iphone_connection_t connection, const char | |||
| 316 | * Internally used function for receiving raw data over the given connection | 316 | * Internally used function for receiving raw data over the given connection |
| 317 | * using a timeout. | 317 | * using a timeout. |
| 318 | */ | 318 | */ |
| 319 | static iphone_error_t internal_connection_recv_timeout(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout) | 319 | static iphone_error_t internal_connection_receive_timeout(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout) |
| 320 | { | 320 | { |
| 321 | if (!connection) { | 321 | if (!connection) { |
| 322 | return IPHONE_E_INVALID_ARG; | 322 | return IPHONE_E_INVALID_ARG; |
| @@ -365,13 +365,13 @@ iphone_error_t iphone_connection_receive_timeout(iphone_connection_t connection, | |||
| 365 | *recv_bytes = 0; | 365 | *recv_bytes = 0; |
| 366 | return IPHONE_E_SSL_ERROR; | 366 | return IPHONE_E_SSL_ERROR; |
| 367 | } | 367 | } |
| 368 | return internal_connection_recv_timeout(connection, data, len, recv_bytes, timeout); | 368 | return internal_connection_receive_timeout(connection, data, len, recv_bytes, timeout); |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | /** | 371 | /** |
| 372 | * Internally used function for receiving raw data over the given connection. | 372 | * Internally used function for receiving raw data over the given connection. |
| 373 | */ | 373 | */ |
| 374 | static iphone_error_t internal_connection_recv(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes) | 374 | static iphone_error_t internal_connection_receive(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes) |
| 375 | { | 375 | { |
| 376 | if (!connection) { | 376 | if (!connection) { |
| 377 | return IPHONE_E_INVALID_ARG; | 377 | return IPHONE_E_INVALID_ARG; |
| @@ -419,7 +419,7 @@ iphone_error_t iphone_connection_receive(iphone_connection_t connection, char *d | |||
| 419 | *recv_bytes = 0; | 419 | *recv_bytes = 0; |
| 420 | return IPHONE_E_SSL_ERROR; | 420 | return IPHONE_E_SSL_ERROR; |
| 421 | } | 421 | } |
| 422 | return internal_connection_recv(connection, data, len, recv_bytes); | 422 | return internal_connection_receive(connection, data, len, recv_bytes); |
| 423 | } | 423 | } |
| 424 | 424 | ||
| 425 | iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle) | 425 | iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle) |
| @@ -463,7 +463,7 @@ static ssize_t internal_ssl_read(gnutls_transport_ptr_t transport, char *buffer, | |||
| 463 | 463 | ||
| 464 | /* repeat until we have the full data or an error occurs */ | 464 | /* repeat until we have the full data or an error occurs */ |
| 465 | do { | 465 | do { |
| 466 | if ((res = internal_connection_recv(connection, recv_buffer, this_len, (uint32_t*)&bytes)) != IPHONE_E_SUCCESS) { | 466 | if ((res = internal_connection_receive(connection, recv_buffer, this_len, (uint32_t*)&bytes)) != IPHONE_E_SUCCESS) { |
| 467 | debug_info("ERROR: iphone_connection_receive returned %d", res); | 467 | debug_info("ERROR: iphone_connection_receive returned %d", res); |
| 468 | return res; | 468 | return res; |
| 469 | } | 469 | } |
diff --git a/src/lockdown.c b/src/lockdown.c index 8f15b3f..792dd33 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -158,7 +158,7 @@ lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char * | |||
| 158 | plist_free(dict); | 158 | plist_free(dict); |
| 159 | dict = NULL; | 159 | dict = NULL; |
| 160 | 160 | ||
| 161 | ret = lockdownd_recv(client, &dict); | 161 | ret = lockdownd_receive(client, &dict); |
| 162 | 162 | ||
| 163 | if (!dict) { | 163 | if (!dict) { |
| 164 | debug_info("LOCKDOWN_E_PLIST_ERROR"); | 164 | debug_info("LOCKDOWN_E_PLIST_ERROR"); |
| @@ -236,7 +236,7 @@ void lockdownd_client_set_label(lockdownd_client_t client, const char *label) | |||
| 236 | * | 236 | * |
| 237 | * @return an error code (LOCKDOWN_E_SUCCESS on success) | 237 | * @return an error code (LOCKDOWN_E_SUCCESS on success) |
| 238 | */ | 238 | */ |
| 239 | lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist) | 239 | lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist) |
| 240 | { | 240 | { |
| 241 | if (!client || !plist || (plist && *plist)) | 241 | if (!client || !plist || (plist && *plist)) |
| 242 | return LOCKDOWN_E_INVALID_ARG; | 242 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -304,7 +304,7 @@ lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type) | |||
| 304 | plist_free(dict); | 304 | plist_free(dict); |
| 305 | dict = NULL; | 305 | dict = NULL; |
| 306 | 306 | ||
| 307 | ret = lockdownd_recv(client, &dict); | 307 | ret = lockdownd_receive(client, &dict); |
| 308 | 308 | ||
| 309 | if (LOCKDOWN_E_SUCCESS != ret) | 309 | if (LOCKDOWN_E_SUCCESS != ret) |
| 310 | return ret; | 310 | return ret; |
| @@ -363,7 +363,7 @@ lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *dom | |||
| 363 | return ret; | 363 | return ret; |
| 364 | 364 | ||
| 365 | /* Now get device's answer */ | 365 | /* Now get device's answer */ |
| 366 | ret = lockdownd_recv(client, &dict); | 366 | ret = lockdownd_receive(client, &dict); |
| 367 | if (ret != LOCKDOWN_E_SUCCESS) | 367 | if (ret != LOCKDOWN_E_SUCCESS) |
| 368 | return ret; | 368 | return ret; |
| 369 | 369 | ||
| @@ -426,7 +426,7 @@ lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *dom | |||
| 426 | return ret; | 426 | return ret; |
| 427 | 427 | ||
| 428 | /* Now get device's answer */ | 428 | /* Now get device's answer */ |
| 429 | ret = lockdownd_recv(client, &dict); | 429 | ret = lockdownd_receive(client, &dict); |
| 430 | if (ret != LOCKDOWN_E_SUCCESS) | 430 | if (ret != LOCKDOWN_E_SUCCESS) |
| 431 | return ret; | 431 | return ret; |
| 432 | 432 | ||
| @@ -483,7 +483,7 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char * | |||
| 483 | return ret; | 483 | return ret; |
| 484 | 484 | ||
| 485 | /* Now get device's answer */ | 485 | /* Now get device's answer */ |
| 486 | ret = lockdownd_recv(client, &dict); | 486 | ret = lockdownd_receive(client, &dict); |
| 487 | if (ret != LOCKDOWN_E_SUCCESS) | 487 | if (ret != LOCKDOWN_E_SUCCESS) |
| 488 | return ret; | 488 | return ret; |
| 489 | 489 | ||
| @@ -796,7 +796,7 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_ | |||
| 796 | return ret; | 796 | return ret; |
| 797 | 797 | ||
| 798 | /* Now get iPhone's answer */ | 798 | /* Now get iPhone's answer */ |
| 799 | ret = lockdownd_recv(client, &dict); | 799 | ret = lockdownd_receive(client, &dict); |
| 800 | 800 | ||
| 801 | if (ret != LOCKDOWN_E_SUCCESS) | 801 | if (ret != LOCKDOWN_E_SUCCESS) |
| 802 | return ret; | 802 | return ret; |
| @@ -914,7 +914,7 @@ lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client) | |||
| 914 | plist_free(dict); | 914 | plist_free(dict); |
| 915 | dict = NULL; | 915 | dict = NULL; |
| 916 | 916 | ||
| 917 | ret = lockdownd_recv(client, &dict); | 917 | ret = lockdownd_receive(client, &dict); |
| 918 | 918 | ||
| 919 | if (lockdown_check_result(dict, "EnterRecovery") == RESULT_SUCCESS) { | 919 | if (lockdown_check_result(dict, "EnterRecovery") == RESULT_SUCCESS) { |
| 920 | debug_info("success"); | 920 | debug_info("success"); |
| @@ -950,7 +950,7 @@ lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client) | |||
| 950 | plist_free(dict); | 950 | plist_free(dict); |
| 951 | dict = NULL; | 951 | dict = NULL; |
| 952 | 952 | ||
| 953 | ret = lockdownd_recv(client, &dict); | 953 | ret = lockdownd_receive(client, &dict); |
| 954 | if (!dict) { | 954 | if (!dict) { |
| 955 | debug_info("did not get goodbye response back"); | 955 | debug_info("did not get goodbye response back"); |
| 956 | return LOCKDOWN_E_PLIST_ERROR; | 956 | return LOCKDOWN_E_PLIST_ERROR; |
| @@ -1139,7 +1139,7 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char | |||
| 1139 | if (ret != LOCKDOWN_E_SUCCESS) | 1139 | if (ret != LOCKDOWN_E_SUCCESS) |
| 1140 | return ret; | 1140 | return ret; |
| 1141 | 1141 | ||
| 1142 | ret = lockdownd_recv(client, &dict); | 1142 | ret = lockdownd_receive(client, &dict); |
| 1143 | 1143 | ||
| 1144 | if (!dict) | 1144 | if (!dict) |
| 1145 | return LOCKDOWN_E_PLIST_ERROR; | 1145 | return LOCKDOWN_E_PLIST_ERROR; |
| @@ -1239,7 +1239,7 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char | |||
| 1239 | if (LOCKDOWN_E_SUCCESS != ret) | 1239 | if (LOCKDOWN_E_SUCCESS != ret) |
| 1240 | return ret; | 1240 | return ret; |
| 1241 | 1241 | ||
| 1242 | ret = lockdownd_recv(client, &dict); | 1242 | ret = lockdownd_receive(client, &dict); |
| 1243 | 1243 | ||
| 1244 | if (LOCKDOWN_E_SUCCESS != ret) | 1244 | if (LOCKDOWN_E_SUCCESS != ret) |
| 1245 | return ret; | 1245 | return ret; |
| @@ -1314,7 +1314,7 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati | |||
| 1314 | plist_free(dict); | 1314 | plist_free(dict); |
| 1315 | dict = NULL; | 1315 | dict = NULL; |
| 1316 | 1316 | ||
| 1317 | ret = lockdownd_recv(client, &dict); | 1317 | ret = lockdownd_receive(client, &dict); |
| 1318 | if (!dict) { | 1318 | if (!dict) { |
| 1319 | debug_info("LOCKDOWN_E_PLIST_ERROR"); | 1319 | debug_info("LOCKDOWN_E_PLIST_ERROR"); |
| 1320 | return LOCKDOWN_E_PLIST_ERROR; | 1320 | return LOCKDOWN_E_PLIST_ERROR; |
| @@ -1357,7 +1357,7 @@ lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client) | |||
| 1357 | plist_free(dict); | 1357 | plist_free(dict); |
| 1358 | dict = NULL; | 1358 | dict = NULL; |
| 1359 | 1359 | ||
| 1360 | ret = lockdownd_recv(client, &dict); | 1360 | ret = lockdownd_receive(client, &dict); |
| 1361 | if (!dict) { | 1361 | if (!dict) { |
| 1362 | debug_info("LOCKDOWN_E_PLIST_ERROR"); | 1362 | debug_info("LOCKDOWN_E_PLIST_ERROR"); |
| 1363 | return LOCKDOWN_E_PLIST_ERROR; | 1363 | return LOCKDOWN_E_PLIST_ERROR; |
diff --git a/src/mobilesync.c b/src/mobilesync.c index 64c06d5..3492673 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -104,7 +104,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) | |||
| 104 | * | 104 | * |
| 105 | * @return an error code | 105 | * @return an error code |
| 106 | */ | 106 | */ |
| 107 | mobilesync_error_t mobilesync_recv(mobilesync_client_t client, plist_t * plist) | 107 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) |
| 108 | { | 108 | { |
| 109 | if (!client) | 109 | if (!client) |
| 110 | return MOBILESYNC_E_INVALID_ARG; | 110 | return MOBILESYNC_E_INVALID_ARG; |
diff --git a/src/property_list_service.c b/src/property_list_service.c index 39483c2..dbf02d6 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c | |||
| @@ -211,7 +211,7 @@ property_list_service_error_t property_list_service_send_binary_plist(property_l | |||
| 211 | * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR | 211 | * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR |
| 212 | * when an unspecified error occurs. | 212 | * when an unspecified error occurs. |
| 213 | */ | 213 | */ |
| 214 | static property_list_service_error_t internal_plist_recv_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout) | 214 | static property_list_service_error_t internal_plist_receive_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout) |
| 215 | { | 215 | { |
| 216 | property_list_service_error_t res = PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR; | 216 | property_list_service_error_t res = PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR; |
| 217 | uint32_t pktlen = 0; | 217 | uint32_t pktlen = 0; |
| @@ -282,7 +282,7 @@ static property_list_service_error_t internal_plist_recv_timeout(property_list_s | |||
| 282 | */ | 282 | */ |
| 283 | property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout) | 283 | property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout) |
| 284 | { | 284 | { |
| 285 | return internal_plist_recv_timeout(client, plist, timeout); | 285 | return internal_plist_receive_timeout(client, plist, timeout); |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | /** | 288 | /** |
| @@ -306,7 +306,7 @@ property_list_service_error_t property_list_service_receive_plist_with_timeout(p | |||
| 306 | */ | 306 | */ |
| 307 | property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist) | 307 | property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist) |
| 308 | { | 308 | { |
| 309 | return internal_plist_recv_timeout(client, plist, 10000); | 309 | return internal_plist_receive_timeout(client, plist, 10000); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | /** | 312 | /** |
