}
#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 {
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;
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;
}
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;
}