From 02b1ed52a4968a4cb8362c6e9184a73c29cebde1 Mon Sep 17 00:00:00 2001 From: Kyeonghun Lee Date: Thu, 18 May 2017 13:54:29 +0900 Subject: [PATCH] recipient type of received mms bug fixed Change-Id: I886faf9dd93cbb4a57b46069af4bc8787ee29237 Signed-off-by: Kyeonghun Lee --- plugin/mms_plugin/MmsPluginInternal.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin/mms_plugin/MmsPluginInternal.cpp b/plugin/mms_plugin/MmsPluginInternal.cpp index a236e6b..95ed6a1 100755 --- a/plugin/mms_plugin/MmsPluginInternal.cpp +++ b/plugin/mms_plugin/MmsPluginInternal.cpp @@ -547,10 +547,10 @@ void MmsPluginInternal::processSendConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEn } #if 1 -void __fillAddressInfo(MSG_ADDRESS_INFO_S *addressInfo, const char *addressVal) +void __fillAddressInfo(MSG_ADDRESS_INFO_S *addressInfo, const char *addressVal, msg_recipient_type_t recipientType) { strncpy(addressInfo->addressVal, addressVal, MAX_ADDRESS_VAL_LEN); - addressInfo->recipientType = MSG_RECIPIENTS_TYPE_TO; + addressInfo->recipientType = recipientType; if (MmsAddrUtilCheckEmailAddress(addressInfo->addressVal)) { addressInfo->addressType = MSG_ADDRESS_TYPE_EMAIL; } else { @@ -664,8 +664,8 @@ void MmsPluginInternal::processRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTra if (mmsHeader.pFrom) { MSG_DEBUG("FROM : [%s]", mmsHeader.pFrom->szAddr); /* From */ - __fillAddressInfo(&(pMsgInfo->addressList[0]), mmsHeader.pFrom->szAddr); - __fillAddressInfo(&recipients_addr_info[0], mmsHeader.pFrom->szAddr); + __fillAddressInfo(&(pMsgInfo->addressList[0]), mmsHeader.pFrom->szAddr, MSG_RECIPIENTS_TYPE_UNKNOWN); + __fillAddressInfo(&recipients_addr_info[0], mmsHeader.pFrom->szAddr, MSG_RECIPIENTS_TYPE_UNKNOWN); } int addr_idx = 0; @@ -676,9 +676,9 @@ void MmsPluginInternal::processRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTra MSG_DEBUG("TO : [%s]", iter->szAddr); /* To */ if (normal_msisdn == NULL || normal_msisdn[0] == '\0' || !g_str_has_suffix(iter->szAddr, normal_msisdn)) { - __fillAddressInfo(&(pMsgInfo->addressList[++addr_idx]), iter->szAddr); + __fillAddressInfo(&(pMsgInfo->addressList[++addr_idx]), iter->szAddr, MSG_RECIPIENTS_TYPE_TO); } - __fillAddressInfo(&recipients_addr_info[++recipients_idx], iter->szAddr); + __fillAddressInfo(&recipients_addr_info[++recipients_idx], iter->szAddr, MSG_RECIPIENTS_TYPE_TO); iter = iter->pNext; } @@ -690,9 +690,9 @@ void MmsPluginInternal::processRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTra MSG_DEBUG("CC : [%s]", iter->szAddr); /* Cc */ if (normal_msisdn == NULL || normal_msisdn[0] == '\0' || !g_str_has_suffix(iter->szAddr, normal_msisdn)) { - __fillAddressInfo(&(pMsgInfo->addressList[++addr_idx]), iter->szAddr); + __fillAddressInfo(&(pMsgInfo->addressList[++addr_idx]), iter->szAddr, MSG_RECIPIENTS_TYPE_CC); } - __fillAddressInfo(&recipients_addr_info[++recipients_idx], iter->szAddr); + __fillAddressInfo(&recipients_addr_info[++recipients_idx], iter->szAddr, MSG_RECIPIENTS_TYPE_CC); iter = iter->pNext; } -- 2.34.1