summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkibak.yoon <kibak.yoon@samsung.com>2013-10-24 09:13:17 (GMT)
committerJacek Bukarewicz <j.bukarewicz@samsung.com>2013-10-28 14:48:53 (GMT)
commit977c71736d0b1b5edb5ee172abe70aad4e544465 (patch)
tree9e38ad91527a2a2e271326ff6ac3819550f2aac6
parent381ee6b97c9922b8193e14f076657addf6189a1f (diff)
downloadlibslp-sensor-977c71736d0b1b5edb5ee172abe70aad4e544465.zip
libslp-sensor-977c71736d0b1b5edb5ee172abe70aad4e544465.tar.gz
libslp-sensor-977c71736d0b1b5edb5ee172abe70aad4e544465.tar.bz2
Change-Id: I24ecd1d2b54510bd8d57853996ed9296a46dfc9d Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
-rwxr-xr-xsrc/client.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 952a919..759ab16 100755
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1586,9 +1586,11 @@ EXTAPI int sf_register_event(int handle , unsigned int event_type , event_condi
memset(g_cb_table[i].call_back_key,'\0',MAX_KEY_LEN);
snprintf(g_cb_table[i].call_back_key,(MAX_KEY_LEN-1),"%s%x",DEFAULT_SENSOR_KEY_PREFIX, event_type);
+ _lock.lock();
g_cb_table[i].cb_event_type = event_type;
g_cb_table[i].client_data = cb_data;
g_cb_table[i].sensor_callback_func_t = cb;
+ _lock.unlock();
switch (event_type ) {
case ACCELEROMETER_EVENT_RAW_DATA_REPORT_ON_TIME: