summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/libimobiledevice/installation_proxy.h1
-rw-r--r--src/installation_proxy.c9
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" {
#define INSTPROXY_E_CONN_FAILED -3
#define INSTPROXY_E_OP_IN_PROGRESS -4
#define INSTPROXY_E_OP_FAILED -5
+#define INSTPROXY_E_RECEIVE_TIMEOUT -6
#define INSTPROXY_E_UNKNOWN_ERROR -256
/*@}*/
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 @@
* installation_proxy.c
* com.apple.mobile.installation_proxy service implementation.
*
+ * Copyright (c) 2013 Martin Szulecki All Rights Reserved.
* Copyright (c) 2009 Nikias Bassen, All Rights Reserved.
*
* 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
browsing = 0;
dict = NULL;
res = instproxy_error(property_list_service_receive_plist(client->parent, &dict));
- if (res != INSTPROXY_E_SUCCESS) {
+ if (res != INSTPROXY_E_SUCCESS && res != INSTPROXY_E_RECEIVE_TIMEOUT) {
break;
}
if (dict) {
@@ -297,9 +298,9 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
do {
instproxy_lock(client);
- res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 30000));
+ res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 1000));
instproxy_unlock(client);
- if (res != INSTPROXY_E_SUCCESS) {
+ if (res != INSTPROXY_E_SUCCESS && res != INSTPROXY_E_RECEIVE_TIMEOUT) {
debug_info("could not receive plist, error %d", res);
break;
}
@@ -376,7 +377,7 @@ static void* instproxy_status_updater(void* arg)
instproxy_lock(data->client);
debug_info("done, cleaning up.");
if (data->operation) {
- free(data->operation);
+ free(data->operation);
}
data->client->status_updater = (thread_t)NULL;
instproxy_unlock(data->client);