diff options
Diffstat (limited to 'src/notification_proxy.c')
| -rw-r--r-- | src/notification_proxy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/notification_proxy.c b/src/notification_proxy.c index 4b028f6..b22448d 100644 --- a/src/notification_proxy.c +++ b/src/notification_proxy.c | |||
| @@ -131,6 +131,8 @@ LIBIMOBILEDEVICE_API np_error_t np_client_free(np_client_t client) | |||
| 131 | if (client->notifier) { | 131 | if (client->notifier) { |
| 132 | debug_info("joining np callback"); | 132 | debug_info("joining np callback"); |
| 133 | thread_join(client->notifier); | 133 | thread_join(client->notifier); |
| 134 | thread_free(client->notifier); | ||
| 135 | client->notifier = (thread_t)NULL; | ||
| 134 | } else { | 136 | } else { |
| 135 | dict = NULL; | 137 | dict = NULL; |
| 136 | property_list_service_receive_plist(parent, &dict); | 138 | property_list_service_receive_plist(parent, &dict); |
| @@ -347,6 +349,7 @@ LIBIMOBILEDEVICE_API np_error_t np_set_notify_callback( np_client_t client, np_n | |||
| 347 | property_list_service_client_t parent = client->parent; | 349 | property_list_service_client_t parent = client->parent; |
| 348 | client->parent = NULL; | 350 | client->parent = NULL; |
| 349 | thread_join(client->notifier); | 351 | thread_join(client->notifier); |
| 352 | thread_free(client->notifier); | ||
| 350 | client->notifier = (thread_t)NULL; | 353 | client->notifier = (thread_t)NULL; |
| 351 | client->parent = parent; | 354 | client->parent = parent; |
| 352 | } | 355 | } |
| @@ -358,7 +361,7 @@ LIBIMOBILEDEVICE_API np_error_t np_set_notify_callback( np_client_t client, np_n | |||
| 358 | npt->cbfunc = notify_cb; | 361 | npt->cbfunc = notify_cb; |
| 359 | npt->user_data = user_data; | 362 | npt->user_data = user_data; |
| 360 | 363 | ||
| 361 | if (thread_create(&client->notifier, np_notifier, npt) == 0) { | 364 | if (thread_new(&client->notifier, np_notifier, npt) == 0) { |
| 362 | res = NP_E_SUCCESS; | 365 | res = NP_E_SUCCESS; |
| 363 | } | 366 | } |
| 364 | } | 367 | } |
