From b39ea2951cc5416e4833b1cd8cd896b7e79eed93 Mon Sep 17 00:00:00 2001 From: Sangkoo Kim Date: Wed, 23 Mar 2016 09:13:07 +0900 Subject: [PATCH 1/1] Fix TSAM-1272 : permission check error Change-Id: I70a218c917d30deda3c1706c672d13b0d586f46e Signed-off-by: Sangkoo Kim --- utils/MsgException.cpp | 2 +- utils/MsgGconfWrapper.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/utils/MsgException.cpp b/utils/MsgException.cpp index 556c3f6..da55638 100755 --- a/utils/MsgException.cpp +++ b/utils/MsgException.cpp @@ -37,7 +37,7 @@ string MsgException::errorStrings[NUM_ERRORS] = "INCOMING_MSG_ERROR", //10 "FILE_OPERATION_ERROR", - "SECURITY_ERROR" + "SECURITY_ERROR", "SERVER_READY_ERROR" }; diff --git a/utils/MsgGconfWrapper.cpp b/utils/MsgGconfWrapper.cpp index d839d56..c636486 100755 --- a/utils/MsgGconfWrapper.cpp +++ b/utils/MsgGconfWrapper.cpp @@ -117,7 +117,7 @@ msg_error_t MsgSettingGetInt(const char *pKey, int *pVal) msg_error_t retVal = MSG_SUCCESS; int param = 0; - if (vconf_get_int(pKey, ¶m) < 0) { + if (vconf_get_int(pKey, ¶m) != 0) { int vconf_err = vconf_get_ext_errno(); MSG_DEBUG("Fail to vconf_get_int with [%s], err=[%d]", pKey, vconf_err); if (vconf_err == VCONF_ERROR_FILE_PERM) @@ -142,7 +142,7 @@ msg_error_t MsgSettingGetBool(const char *pKey, bool *pVal) msg_error_t retVal = MSG_SUCCESS; int param = 0; - if (vconf_get_bool(pKey, ¶m) < 0) { + if (vconf_get_bool(pKey, ¶m) != 0) { int vconf_err = vconf_get_ext_errno(); MSG_DEBUG("Fail to vconf_get_bool with [%s], err=[%d]", pKey, vconf_err); if (vconf_err == VCONF_ERROR_FILE_PERM) @@ -217,9 +217,9 @@ msg_error_t MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb) { msg_error_t err = MSG_SUCCESS; - if (vconf_notify_key_changed(pKey, pCb, NULL) < 0) { + if (vconf_notify_key_changed(pKey, pCb, NULL) != 0) { int vconf_err = vconf_get_ext_errno(); - MSG_DEBUG("Fail to regist vconf CB with [%s], err=[%d]", pKey, vconf_err); + MSG_DEBUG("Fail to vconf_notify_key_changed with [%s], err=[%d]", pKey, vconf_err); if (vconf_err == VCONF_ERROR_FILE_PERM) err = MSG_ERR_PERMISSION_DENIED; else @@ -235,9 +235,9 @@ msg_error_t MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb { msg_error_t err = MSG_SUCCESS; - if (vconf_ignore_key_changed(pKey, pCb) < 0) { + if (vconf_ignore_key_changed(pKey, pCb) != 0) { int vconf_err = vconf_get_ext_errno(); - MSG_DEBUG("Fail to remove vconf CB with [%s], err=[%d]", pKey, vconf_err); + MSG_DEBUG("Fail to vconf_ignore_key_changed [%s], err=[%d]", pKey, vconf_err); if (vconf_err == VCONF_ERROR_FILE_PERM) err = MSG_ERR_PERMISSION_DENIED; else -- 2.7.4