resolve TSAM-4887, TSAM-4854: return PERMISSION DENIED error when VCONFKEY_MSG_SERVER... 01/74901/2
authorhhk86.heo <hhk86.heo@samsung.com>
Thu, 16 Jun 2016 04:45:39 +0000 (13:45 +0900)
committerheo hyungkang <hhk86.heo@samsung.com>
Thu, 16 Jun 2016 04:50:39 +0000 (21:50 -0700)
Change-Id: Ibf928866c002e73c3e50e38799ea030fc3e4c620
Signed-off-by: hyungkang heo <hhk86.heo@samsung.com>
proxy/MsgHandleControl.cpp

index 2eac5dd..1357ceb 100755 (executable)
@@ -45,12 +45,17 @@ MsgHandle::~MsgHandle()
 void MsgHandle::openHandle()
 {
        bool bReady = false;
+       msg_error_t error = MSG_SUCCESS;
 
        MsgProxyListener::instance()->insertOpenHandleSet(this);
 
        /* server is currently booting and service is not available until the end of booting */
-       if (MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady) != MSG_SUCCESS)
+       error = MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady);
+       if (error != MSG_SUCCESS) {
                MSG_INFO("MsgSettingGetBool() is failed");
+               if (error == MSG_ERR_PERMISSION_DENIED)
+                       THROW(MsgException::SECURITY_ERROR, "Client doesn't have permission");
+       }
 
        if (bReady == false) {
                THROW(MsgException::SERVER_READY_ERROR, "Msg Server is not ready !!!!!");