[FIX] cherry-pick 015e0b7ac382c13d4136dcb248dd7b7aabbf868c + merge
authorgreatim <jaewon81.lim@samsung.com>
Thu, 20 Jun 2013 16:36:35 +0000 (01:36 +0900)
committerAnastasia Lyupa <a.lyupa@samsung.com>
Tue, 23 Jul 2013 09:49:29 +0000 (13:49 +0400)
fix custom chart bug

Change-Id: Id662a17cd4f864189cd39e29a8b894689880d665

Conflicts:
custom_chart/da_chart.c

custom_chart/da_chart.c
include/dahelper.h
probe_event/da_event.c

index ad8140f..44af72a 100755 (executable)
@@ -560,8 +560,10 @@ int da_set_callback(da_handle series_handle, da_user_data_2_chart_data callback,
        // register new callback
        if(callback != NULL)
        {
+               int re;
                add_to_callback_list(interval, cindex, series_handle, callback, data_addr);
-               start_callback_thread(interval);
+               re = start_callback_thread(interval);
+               LOG("start callback thread return %d\n", re);
        }
        probeBlockEnd();
 
index ad08d7e..e764aee 100755 (executable)
@@ -84,7 +84,8 @@ extern "C"{
        do {                                                                                                            \
                LOG("screenshot_unlock : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
-               gTraceInfo.screenshot.state = 1;                                                \
+               if(gTraceInfo.screenshot.state < 0)                                             \
+                       gTraceInfo.screenshot.state = 1;                                        \
                pthread_mutex_unlock(&(gTraceInfo.screenshot.ssMutex)); \
        } while(0)
 
@@ -226,7 +227,6 @@ void _cb_render_post(void* data, Evas* e, void* eventinfo);
 int initialize_event();
 int finalize_event();
 int getOrientation();
-void orientationEnabled();
 void on_orientation_changed(int angle, bool capi);
 
 int remove_indir(const char* dirname);
index c283a6b..1538bd2 100755 (executable)
@@ -45,7 +45,6 @@
 
 static int external_angle = 0;
 static int internal_angle = 0;
-static bool orientation_enabled = false;
 
 // ===================================================================
 // orientation related functions
@@ -104,13 +103,10 @@ void on_orientation_changed(int angle, bool capi)
                        FLUSH_LOCAL_BUF();
                }
 
-//             if(orientation_enabled)
+               SCREENSHOT_SET();
+//             if(!capi)
 //             {
-                       SCREENSHOT_SET();
-//                     if(!capi)
-//                     {
-//                             SCREENSHOT_DONE();
-//                     }
+//                     SCREENSHOT_DONE();
 //             }
        }
        else { }        // do nothing
@@ -118,11 +114,6 @@ void on_orientation_changed(int angle, bool capi)
        probeBlockEnd();
 }
 
-void orientationEnabled()
-{
-       orientation_enabled = true;
-}
-
 int getOrientation()
 {
        return external_angle;