diff options
| -rw-r--r-- | include/libimobiledevice/installation_proxy.h | 1 | ||||
| -rw-r--r-- | src/installation_proxy.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h index 1274884..18b7804 100644 --- a/include/libimobiledevice/installation_proxy.h +++ b/include/libimobiledevice/installation_proxy.h | |||
| @@ -40,6 +40,7 @@ extern "C" { | |||
| 40 | #define INSTPROXY_E_CONN_FAILED -3 | 40 | #define INSTPROXY_E_CONN_FAILED -3 |
| 41 | #define INSTPROXY_E_OP_IN_PROGRESS -4 | 41 | #define INSTPROXY_E_OP_IN_PROGRESS -4 |
| 42 | #define INSTPROXY_E_OP_FAILED -5 | 42 | #define INSTPROXY_E_OP_FAILED -5 |
| 43 | #define INSTPROXY_E_RECEIVE_TIMEOUT -6 | ||
| 43 | 44 | ||
| 44 | #define INSTPROXY_E_UNKNOWN_ERROR -256 | 45 | #define INSTPROXY_E_UNKNOWN_ERROR -256 |
| 45 | /*@}*/ | 46 | /*@}*/ |
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index 7ee12cc..f758a14 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | * installation_proxy.c | 2 | * installation_proxy.c |
| 3 | * com.apple.mobile.installation_proxy service implementation. | 3 | * com.apple.mobile.installation_proxy service implementation. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2013 Martin Szulecki All Rights Reserved. | ||
| 5 | * Copyright (c) 2009 Nikias Bassen, All Rights Reserved. | 6 | * Copyright (c) 2009 Nikias Bassen, All Rights Reserved. |
| 6 | * | 7 | * |
| 7 | * This library is free software; you can redistribute it and/or | 8 | * This library is free software; you can redistribute it and/or |
| @@ -230,7 +231,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_opt | |||
| 230 | browsing = 0; | 231 | browsing = 0; |
| 231 | dict = NULL; | 232 | dict = NULL; |
| 232 | res = instproxy_error(property_list_service_receive_plist(client->parent, &dict)); | 233 | res = instproxy_error(property_list_service_receive_plist(client->parent, &dict)); |
| 233 | if (res != INSTPROXY_E_SUCCESS) { | 234 | if (res != INSTPROXY_E_SUCCESS && res != INSTPROXY_E_RECEIVE_TIMEOUT) { |
| 234 | break; | 235 | break; |
| 235 | } | 236 | } |
| 236 | if (dict) { | 237 | if (dict) { |
| @@ -297,9 +298,9 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client, | |||
| 297 | 298 | ||
| 298 | do { | 299 | do { |
| 299 | instproxy_lock(client); | 300 | instproxy_lock(client); |
| 300 | res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 30000)); | 301 | res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 1000)); |
| 301 | instproxy_unlock(client); | 302 | instproxy_unlock(client); |
| 302 | if (res != INSTPROXY_E_SUCCESS) { | 303 | if (res != INSTPROXY_E_SUCCESS && res != INSTPROXY_E_RECEIVE_TIMEOUT) { |
| 303 | debug_info("could not receive plist, error %d", res); | 304 | debug_info("could not receive plist, error %d", res); |
| 304 | break; | 305 | break; |
| 305 | } | 306 | } |
| @@ -376,7 +377,7 @@ static void* instproxy_status_updater(void* arg) | |||
| 376 | instproxy_lock(data->client); | 377 | instproxy_lock(data->client); |
| 377 | debug_info("done, cleaning up."); | 378 | debug_info("done, cleaning up."); |
| 378 | if (data->operation) { | 379 | if (data->operation) { |
| 379 | free(data->operation); | 380 | free(data->operation); |
| 380 | } | 381 | } |
| 381 | data->client->status_updater = (thread_t)NULL; | 382 | data->client->status_updater = (thread_t)NULL; |
| 382 | instproxy_unlock(data->client); | 383 | instproxy_unlock(data->client); |
