emuld: return checking when call pm_lock_state()
authormunkyu.im <munkyu.im@samsung.com>
Tue, 26 Nov 2013 11:09:48 +0000 (20:09 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Tue, 26 Nov 2013 11:12:06 +0000 (20:12 +0900)
printed return value as log.

Change-Id: I5138e6eb1f821b93bf7ccda3ffdf076647f5384e
Signed-off-by: munkyu.im <munkyu.im@samsung.com>
src/emuld.cpp
src/get_status.cpp

index 0318eec94d434aeeaf26689604f62f698d1b601d..c2a7b05add4cb42c4a21a0c848fa62d802d586b6 100644 (file)
@@ -911,8 +911,15 @@ void end_server(int sig)
 
 void set_lock_state() {
     int i = 0;
+    int ret = 0;
     // Now we blocking to enter "SLEEP".
-    while (i < PMAPI_RETRY_COUNT && pm_lock_state(LCD_OFF, STAY_CUR_STATE, 0) == -1) {
+    while(i < PMAPI_RETRY_COUNT ) {
+        ret = pm_lock_state(LCD_OFF, STAY_CUR_STATE, 0);
+        LOG("pm_lock_state() return: %d", ret);
+        if(ret == 0)
+        {
+            break;
+        }
         ++i;
         sleep(10);
     }
index 6516ba589f1ad68d2d5f8cbbd7db9c48f0c810c3..1356a8c360de7c65b338a552dbe65dbfe8e7c621 100644 (file)
@@ -25,7 +25,7 @@
  *
  */
 
-//#include "emuld.h"
+#include "emuld.h"
 #include "emuld_common.h"
 #include <vconf/vconf.h>
 #include <vconf/vconf-keys.h>