Modify check address logic.
authorKeebum Kim <keebum.kim@samsung.com>
Mon, 11 Mar 2013 08:16:07 +0000 (17:16 +0900)
committerKeebum Kim <keebum.kim@samsung.com>
Mon, 11 Mar 2013 08:16:07 +0000 (17:16 +0900)
Change-Id: Ie4481bb5baf3ce67bd1a815a625d6987691246f6

utils/MsgUtilStorage.cpp

index 33f5fa9..27588c0 100755 (executable)
@@ -843,7 +843,7 @@ bool MsgExistAddress(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsg, ms
        *pConvId = 0;
 
        if(pMsg->nAddressCnt == 1) {
-               if (strlen(pMsg->addressList[0].addressVal) > MAX_PRECONFIG_NUM) {
+               if (strlen(pMsg->addressList[0].addressVal) > MAX_PRECONFIG_NUM && pMsg->addressList[0].addressType == MSG_ADDRESS_TYPE_PLMN) {
                        char newPhoneNum[MAX_PRECONFIG_NUM+1];
 
                        memset(newPhoneNum, 0x00, sizeof(newPhoneNum));
@@ -890,7 +890,7 @@ bool MsgExistAddress(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsg, ms
                }
 
        } else { /* multiple address */
-               if (strlen(pMsg->addressList[0].addressVal) > MAX_PRECONFIG_NUM) {
+               if (strlen(pMsg->addressList[0].addressVal) > MAX_PRECONFIG_NUM && pMsg->addressList[0].addressType == MSG_ADDRESS_TYPE_PLMN) {
                        char newPhoneNum[MAX_PRECONFIG_NUM+1];
 
                        memset(newPhoneNum, 0x00, sizeof(newPhoneNum));