From: Guillaume Zajac Date: Tue, 9 Apr 2013 13:08:22 +0000 (+0200) Subject: Check VCONFKEY_TELEPHONY_TAPI_STATE to be sure DBus interfaces are ready X-Git-Tag: accepted/tizen_2.1/20130425.035101~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc71423121b14e9a86c93b3a0b7f191049cb1dd6;p=framework%2Fmessaging%2Fmsg-service.git Check VCONFKEY_TELEPHONY_TAPI_STATE to be sure DBus interfaces are ready --- diff --git a/plugin/sms_plugin/SmsPluginMain.cpp b/plugin/sms_plugin/SmsPluginMain.cpp index 059a2c9..8b38f63 100755 --- a/plugin/sms_plugin/SmsPluginMain.cpp +++ b/plugin/sms_plugin/SmsPluginMain.cpp @@ -51,12 +51,12 @@ static void MsgTapiInitCB(keynode_t *key, void* data) { MSG_DEBUG("MsgTapiInitCB is called."); - bool bTelRdy = false; - bTelRdy = vconf_keynode_get_bool(key); + int tapi_state; + tapi_state = vconf_keynode_get_int(key); - MSG_DEBUG("bTelRdy [%d]", bTelRdy); + MSG_DEBUG("tapi_state [%d]", tapi_state); - if (bTelRdy) { + if (tapi_state == VCONFKEY_TELEPHONY_TAPI_STATE_READY) { mx.lock(); cv.signal(); mx.unlock(); @@ -119,14 +119,14 @@ msg_error_t SmsPlgInitialize() if (MsgSettingSetInt(MSG_SIM_CHANGED, MSG_SIM_STATUS_NOT_FOUND) != MSG_SUCCESS) MSG_DEBUG("MsgSettingSetInt is failed!!"); - bool bReady = false; - MsgSettingGetBool(VCONFKEY_TELEPHONY_READY, &bReady); - MSG_DEBUG("Get VCONFKEY_TELEPHONY_READY [%d].", bReady); + int tapi_state; + tapi_state = MsgSettingGetInt(VCONFKEY_TELEPHONY_TAPI_STATE); + MSG_DEBUG("Get VCONFKEY_TELEPHONY_TAPI_STATE [%d].", tapi_state); int ret = 0; - if(!bReady) { - MsgSettingRegVconfCBCommon(VCONFKEY_TELEPHONY_READY, MsgTapiInitCB); + if(tapi_state != VCONFKEY_TELEPHONY_TAPI_STATE_READY) { + MsgSettingRegVconfCBCommon(VCONFKEY_TELEPHONY_TAPI_STATE, MsgTapiInitCB); mx.lock(); ret = cv.timedwait(mx.pMutex(), 90); mx.unlock();