From 474a30caac537cd3f34fd215054a7c90f8d77773 Mon Sep 17 00:00:00 2001 From: "jy910.yun" Date: Fri, 26 Apr 2013 16:05:10 +0900 Subject: [PATCH] when vibrating buffer finished normally, it doesn't notify to system-server. Also stop value has been wrong operation. Change-Id: Ie860c2516144fd9bc40af5e6ef5836dcb0d71f0a --- tizen/DEVICE/src/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tizen/DEVICE/src/file.c b/tizen/DEVICE/src/file.c index eea51e8..b640e0c 100644 --- a/tizen/DEVICE/src/file.c +++ b/tizen/DEVICE/src/file.c @@ -130,11 +130,12 @@ static int _cancel_thread(void) } if (pthread_join(tid, (void**)&ptr) < 0) { - tid = 0; MODULE_ERROR("pthread_join is failed : %s", strerror(errno)); return -1; } + stop = 0; + tid = 0; if (ptr == PTHREAD_CANCELED) { MODULE_LOG("pthread canceled"); @@ -152,8 +153,6 @@ static void __clean_up(void *arg) MODULE_LOG("clean up handler!!! : %d", tid); - stop = 0; - for (i = 0; i < pbuffer->channels; ++i) { free(pbuffer->ppbuffer[i]); pbuffer->ppbuffer[i] = NULL; @@ -197,6 +196,10 @@ static void* __play_cb(void *arg) } } + pthread_mutex_lock(&mutex); + __haptic_predefine_action(gbuffer.handle, STOP, NULL); + pthread_mutex_unlock(&mutex); + pthread_cleanup_pop(1); pthread_exit((void *)0); } -- 2.7.4