From 59adbacef6d400d4c6458f26daddda24bcdfd635 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 11 Jun 2019 01:12:49 +0200 Subject: common: Update thread.c/.h to match the one from libusbmuxd --- src/installation_proxy.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/installation_proxy.c') 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 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include #include @@ -240,7 +243,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lo instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_private)); client_loc->parent = plistclient; mutex_init(&client_loc->mutex); - client_loc->receive_status_thread = (thread_t)NULL; + client_loc->receive_status_thread = THREAD_T_NULL; *client = client_loc; return INSTPROXY_E_SUCCESS; @@ -264,7 +267,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t debug_info("joining receive_status_thread"); thread_join(client->receive_status_thread); thread_free(client->receive_status_thread); - client->receive_status_thread = (thread_t)NULL; + client->receive_status_thread = THREAD_T_NULL; } mutex_destroy(&client->mutex); free(client); @@ -343,7 +346,7 @@ static instproxy_error_t instproxy_receive_status_loop(instproxy_client_t client /* parse status response */ if (node) { - /* check status for possible errorĀ to allow reporting it and aborting it gracefully */ + /* check status for possible error to allow reporting it and aborting it gracefully */ res = instproxy_status_get_error(node, &error_name, &error_description, &error_code); if (res != INSTPROXY_E_SUCCESS) { 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) if (data->client->receive_status_thread) { thread_free(data->client->receive_status_thread); - data->client->receive_status_thread = (thread_t)NULL; + data->client->receive_status_thread = THREAD_T_NULL; } instproxy_unlock(data->client); -- cgit v1.1-32-gdbae