Fix bug in contact sync & add phone log.
authorKeebum Kim <keebum.kim@samsung.com>
Tue, 25 Jun 2013 09:58:57 +0000 (18:58 +0900)
committerKeebum Kim <keebum.kim@samsung.com>
Tue, 25 Jun 2013 09:58:57 +0000 (18:58 +0900)
Change-Id: Id7afa1d7bcfd23f624186805ea078c131725e5ce

framework/transaction-manager/MsgCmdHandlerTransport.cpp
utils/MsgContact.cpp

index 95474f7..694cbff 100755 (executable)
@@ -460,13 +460,14 @@ int MsgIncomingMMSConfMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent)
        msgIds[0] = msgInfo.msgId;
        msgIdList.msgIdList = msgIds;
 
-       err = MsgStoGetAddrInfo(msgInfo.msgId, &(msgInfo.addressList[0]));
+       //err = MsgStoGetAddrInfo(msgInfo.msgId, &(msgInfo.addressList[0]));
+       err = MsgStoGetOrgAddressList(&msgInfo);
 
        if (err == MSG_SUCCESS) {
-               MSG_DEBUG("MmsStoGetAddrInfo() success.");
-               msgInfo.nAddressCnt = 1;
+               MSG_DEBUG("MsgStoGetOrgAddressList() success.");
+//             msgInfo.nAddressCnt = 1;
        } else {
-               MSG_DEBUG("MmsStoGetAddrInfo() fail.");
+               MSG_DEBUG("MsgStoGetOrgAddressList() fail.");
        }
 
        if(msgInfo.msgType.subType == MSG_RETRIEVE_AUTOCONF_MMS || msgInfo.msgType.subType == MSG_RETRIEVE_MANUALCONF_MMS) {
index f9533c3..732bef9 100755 (executable)
@@ -253,33 +253,27 @@ msg_error_t MsgGetContactInfo(const MSG_ADDRESS_INFO_S *pAddrInfo, MSG_CONTACT_I
        ret = contacts_record_get_child_record_at_p(contact, _contacts_contact.name, 0, &name);
        if (ret != CONTACTS_ERROR_NONE) {
                MSG_DEBUG("contacts_record_get_child_record_at_p() Error [%d]", ret);
-               contacts_record_destroy(contact, true);
-               return MSG_SUCCESS;
-       }
-
-       char* strFirstName = NULL;
-       ret = contacts_record_get_str_p(name, _contacts_name.first, &strFirstName);
-       if (ret != CONTACTS_ERROR_NONE) {
-               MSG_DEBUG("contacts_record_get_str_p() Error [%d]", ret);
-               contacts_record_destroy(contact, true);
-               return MSG_SUCCESS;
-       }
+       } else {
+               char* strFirstName = NULL;
+               ret = contacts_record_get_str_p(name, _contacts_name.first, &strFirstName);
+               if (ret != CONTACTS_ERROR_NONE) {
+                       MSG_DEBUG("contacts_record_get_str_p() Error [%d]", ret);
+               }
 
-       char* strLastName = NULL;
-       ret = contacts_record_get_str_p(name, _contacts_name.last, &strLastName);
-       if (ret != CONTACTS_ERROR_NONE) {
-               MSG_DEBUG("contacts_record_get_str_p() Error [%d]", ret);
-               contacts_record_destroy(contact, true);
-               return MSG_SUCCESS;
-       }
+               char* strLastName = NULL;
+               ret = contacts_record_get_str_p(name, _contacts_name.last, &strLastName);
+               if (ret != CONTACTS_ERROR_NONE) {
+                       MSG_DEBUG("contacts_record_get_str_p() Error [%d]", ret);
+               }
 
-       MSG_DEBUG("First Name : [%s], Last Name : [%s]", strFirstName, strLastName);
+               if (strFirstName != NULL)
+                       strncpy(pContactInfo->firstName, strFirstName, MAX_DISPLAY_NAME_LEN);
 
-       if (strFirstName != NULL)
-               strncpy(pContactInfo->firstName, strFirstName, MAX_DISPLAY_NAME_LEN);
+               if (strLastName != NULL)
+                       strncpy(pContactInfo->lastName, strLastName, MAX_DISPLAY_NAME_LEN);
+       }
 
-       if (strLastName != NULL)
-               strncpy(pContactInfo->lastName, strLastName, MAX_DISPLAY_NAME_LEN);
+       MSG_DEBUG("pContactInfo->firstName : [%s], pContactInfo->lastName : [%s]", pContactInfo->firstName, pContactInfo->lastName);
 
        ret = contacts_record_get_int(contact, _contacts_contact.id, (int*)&pContactInfo->contactId);
        if (ret != CONTACTS_ERROR_NONE) {