summaryrefslogtreecommitdiff
path: root/provider/download-provider-notification-manager.c
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-28 11:00:51 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-10-28 11:00:51 +0900
commit7bda74a901d97edc0aab123c0f3b0e49dac5ff5d (patch)
treedb87557750e42a80fd4bd1221976a469a3efe576 /provider/download-provider-notification-manager.c
parent73435351b469a7437b8d4aedd105b59c34b8526e (diff)
downloaddownload-provider-accepted/tizen_2.4_mobile.tar.gz
download-provider-accepted/tizen_2.4_mobile.tar.bz2
download-provider-accepted/tizen_2.4_mobile.zip
Diffstat (limited to 'provider/download-provider-notification-manager.c')
-rw-r--r--provider/download-provider-notification-manager.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/provider/download-provider-notification-manager.c b/provider/download-provider-notification-manager.c
index ea89c0c..d4f8b8f 100644
--- a/provider/download-provider-notification-manager.c
+++ b/provider/download-provider-notification-manager.c
@@ -515,7 +515,7 @@ static int __dp_notification_manager_start()
TRACE_DEBUG("try to create notification-manager");
if (pthread_create(&g_dp_notification_manager_tid, NULL,
__dp_notification_manager, NULL) != 0) {
- TRACE_STRERROR("failed to create notification-manager");
+ TRACE_ERROR("failed to create notification-manager");
return -1;
}
}
@@ -540,13 +540,15 @@ void dp_notification_manager_kill()
if (g_dp_notification_manager_tid > 0 &&
pthread_kill(g_dp_notification_manager_tid, 0) != ESRCH) {
//send signal to notification thread
- g_dp_notification_manager_tid = 0;
+ int status;
+ pthread_t tid;
+ tid = g_dp_notification_manager_tid;
CLIENT_MUTEX_LOCK(&g_dp_notification_manager_mutex);
+ g_dp_notification_manager_tid = 0;
pthread_cond_signal(&g_dp_notification_manager_cond);
CLIENT_MUTEX_UNLOCK(&g_dp_notification_manager_mutex);
- pthread_cancel(g_dp_notification_manager_tid);
- int status;
- pthread_join(g_dp_notification_manager_tid, (void **)&status);
+ pthread_cancel(tid);
+ pthread_join(tid, (void **)&status);
}
}
#else