From: munkyu.im Date: Tue, 26 Nov 2013 11:09:48 +0000 (+0900) Subject: emuld: return checking when call pm_lock_state() X-Git-Tag: submit/tizen/20150527.025434^2~10^2~1^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ee3dac74f8662cd35f02688c82fa027aaa57cc8;p=platform%2Fadaptation%2Femulator%2Femulator-daemon.git emuld: return checking when call pm_lock_state() printed return value as log. Change-Id: I5138e6eb1f821b93bf7ccda3ffdf076647f5384e Signed-off-by: munkyu.im --- diff --git a/src/emuld.cpp b/src/emuld.cpp index 0318eec..c2a7b05 100644 --- a/src/emuld.cpp +++ b/src/emuld.cpp @@ -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); } diff --git a/src/get_status.cpp b/src/get_status.cpp index 6516ba5..1356a8c 100644 --- a/src/get_status.cpp +++ b/src/get_status.cpp @@ -25,7 +25,7 @@ * */ -//#include "emuld.h" +#include "emuld.h" #include "emuld_common.h" #include #include