fix blocked number checking error 66/142166/1 accepted/tizen/unified/20170804.132925 submit/tizen/20170803.064520
authorJongkyu Koo <jk.koo@samsung.com>
Thu, 3 Aug 2017 02:41:12 +0000 (11:41 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Thu, 3 Aug 2017 02:41:12 +0000 (11:41 +0900)
Change-Id: I170d286d7bf3cb503feb05d5879cc4864fe0ade1
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
externals/MsgSpamFilter.cpp

index eb27d8e..63aecd6 100755 (executable)
@@ -93,10 +93,21 @@ bool MsgCheckFilter(MsgDbHandler *pDbHandle, MSG_MESSAGE_INFO_S *pMsgInfo)
        MSG_SEC_DEBUG("pMsg->addressList[0].addressVal [%s]", pMsgInfo->addressList[0].addressVal);
 #if 1 /* use phonenumber-utils API */
        bool is_blocking = false;
-       int ret = phone_number_check_blocking(pMsgInfo->addressList[0].addressVal, &is_blocking);
+       int ret = PHONE_NUMBER_ERROR_NONE;
+
+       ret = phone_number_connect();
+       if (ret != PHONE_NUMBER_ERROR_NONE)
+               MSG_WARN("phone_number_connect failed! [%d]", ret);
+
+       ret = phone_number_check_blocking(pMsgInfo->addressList[0].addressVal, &is_blocking);
        if (ret != PHONE_NUMBER_ERROR_NONE)
                MSG_WARN("phone_number_check_blocking failed! [%d]", ret);
 
+       ret = phone_number_disconnect();
+       if (ret != PHONE_NUMBER_ERROR_NONE)
+               MSG_WARN("phone_number_disconnect failed! [%d]", ret);
+
+
        if (is_blocking == true) {
                MSG_SEC_DEBUG("Msg is Filtered by Address : [%s]", pMsgInfo->addressList[0].addressVal);
                pMsgInfo->folderId = MSG_SPAMBOX_ID;