diff options
author | jy910.yun <jy910.yun@samsung.com> | 2013-04-26 16:05:10 +0900 |
---|---|---|
committer | jy910.yun <jy910.yun@samsung.com> | 2013-04-26 17:19:30 +0900 |
commit | 474a30caac537cd3f34fd215054a7c90f8d77773 (patch) | |
tree | e28c75f10c88a9da9f1ce269ba20aabdecf5e3f6 | |
parent | c0d35f453660d15646532d58a08dd1c1a3b0ca10 (diff) | |
download | haptic-module-tizen-tizen_2.1.tar.gz haptic-module-tizen-tizen_2.1.tar.bz2 haptic-module-tizen-tizen_2.1.zip |
when vibrating buffer finished normally, it doesn't notify to system-server.submit/tizen_2.2/20130714.145800submit/tizen_2.1/20130514.0528052.2_releasetizen_2.1
Also stop value has been wrong operation.
Change-Id: Ie860c2516144fd9bc40af5e6ef5836dcb0d71f0a
-rw-r--r-- | tizen/DEVICE/src/file.c | 9 |
1 files 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); } |