diff options
Diffstat (limited to 'src/installation_proxy.c')
| -rw-r--r-- | src/installation_proxy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index f82eecc..24044aa 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | #ifdef HAVE_CONFIG_H | ||
| 24 | #include <config.h> | ||
| 25 | #endif | ||
| 23 | #include <string.h> | 26 | #include <string.h> |
| 24 | #include <stdlib.h> | 27 | #include <stdlib.h> |
| 25 | #include <inttypes.h> | 28 | #include <inttypes.h> |
| @@ -240,7 +243,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lo | |||
| 240 | instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_private)); | 243 | instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_private)); |
| 241 | client_loc->parent = plistclient; | 244 | client_loc->parent = plistclient; |
| 242 | mutex_init(&client_loc->mutex); | 245 | mutex_init(&client_loc->mutex); |
| 243 | client_loc->receive_status_thread = (thread_t)NULL; | 246 | client_loc->receive_status_thread = THREAD_T_NULL; |
| 244 | 247 | ||
| 245 | *client = client_loc; | 248 | *client = client_loc; |
| 246 | return INSTPROXY_E_SUCCESS; | 249 | return INSTPROXY_E_SUCCESS; |
| @@ -264,7 +267,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t | |||
| 264 | debug_info("joining receive_status_thread"); | 267 | debug_info("joining receive_status_thread"); |
| 265 | thread_join(client->receive_status_thread); | 268 | thread_join(client->receive_status_thread); |
| 266 | thread_free(client->receive_status_thread); | 269 | thread_free(client->receive_status_thread); |
| 267 | client->receive_status_thread = (thread_t)NULL; | 270 | client->receive_status_thread = THREAD_T_NULL; |
| 268 | } | 271 | } |
| 269 | mutex_destroy(&client->mutex); | 272 | mutex_destroy(&client->mutex); |
| 270 | free(client); | 273 | free(client); |
| @@ -343,7 +346,7 @@ static instproxy_error_t instproxy_receive_status_loop(instproxy_client_t client | |||
| 343 | 346 | ||
| 344 | /* parse status response */ | 347 | /* parse status response */ |
| 345 | if (node) { | 348 | if (node) { |
| 346 | /* check status for possible error to allow reporting it and aborting it gracefully */ | 349 | /* check status for possible error to allow reporting it and aborting it gracefully */ |
| 347 | res = instproxy_status_get_error(node, &error_name, &error_description, &error_code); | 350 | res = instproxy_status_get_error(node, &error_name, &error_description, &error_code); |
| 348 | if (res != INSTPROXY_E_SUCCESS) { | 351 | if (res != INSTPROXY_E_SUCCESS) { |
| 349 | debug_info("command: %s, error %d, code 0x%08"PRIx64", name: %s, description: \"%s\"", command_name, res, error_code, error_name, error_description ? error_description: "N/A"); | 352 | debug_info("command: %s, error %d, code 0x%08"PRIx64", name: %s, description: \"%s\"", command_name, res, error_code, error_name, error_description ? error_description: "N/A"); |
| @@ -431,7 +434,7 @@ static void* instproxy_receive_status_loop_thread(void* arg) | |||
| 431 | 434 | ||
| 432 | if (data->client->receive_status_thread) { | 435 | if (data->client->receive_status_thread) { |
| 433 | thread_free(data->client->receive_status_thread); | 436 | thread_free(data->client->receive_status_thread); |
| 434 | data->client->receive_status_thread = (thread_t)NULL; | 437 | data->client->receive_status_thread = THREAD_T_NULL; |
| 435 | } | 438 | } |
| 436 | 439 | ||
| 437 | instproxy_unlock(data->client); | 440 | instproxy_unlock(data->client); |
