summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineet Uprari <v.uprari@samsung.com>2013-08-28 17:50:07 +0530
committerVineet Uprari <v.uprari@samsung.com>2013-08-29 12:13:13 +0530
commit15be8fc29b0da561e8fd8c3b8be28d03d4d4a878 (patch)
treeb7dee9a75d1767fe8c02f1ba5f0542bb60895799
parent474a30caac537cd3f34fd215054a7c90f8d77773 (diff)
downloadhaptic-module-tizen-15be8fc29b0da561e8fd8c3b8be28d03d4d4a878.tar.gz
haptic-module-tizen-15be8fc29b0da561e8fd8c3b8be28d03d4d4a878.tar.bz2
haptic-module-tizen-15be8fc29b0da561e8fd8c3b8be28d03d4d4a878.zip
Fixed continuous vibration along with system hang.
Change-Id: I17451635fe5132b011a817b9678d123e57e4ce62
-rw-r--r--tizen/DEVICE/src/file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tizen/DEVICE/src/file.c b/tizen/DEVICE/src/file.c
index b640e0c..1a6ae80 100644
--- a/tizen/DEVICE/src/file.c
+++ b/tizen/DEVICE/src/file.c
@@ -121,7 +121,7 @@ static int _cancel_thread(void)
usleep(100);
MODULE_LOG("Already locked..");
}
- __haptic_predefine_action(gbuffer.handle, STOP, NULL);
+
pthread_mutex_unlock(&mutex);
if ((ret = pthread_cancel(tid)) < 0) {
@@ -163,6 +163,11 @@ static void __clean_up(void *arg)
pbuffer->channels = 0;
pbuffer->length = 0;
+
+ if(stop){
+ __haptic_predefine_action(gbuffer.handle, STOP, NULL);
+ pthread_mutex_unlock(&mutex);
+ }
}
static void* __play_cb(void *arg)
@@ -182,7 +187,6 @@ static void* __play_cb(void *arg)
for (k = 0; k < pbuffer->channels; ++k) {
pthread_mutex_lock(&mutex);
if (stop) {
- pthread_mutex_unlock(&mutex);
pthread_exit((void*)0);
}
ch = pbuffer->ppbuffer[k][j];