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;