From: Kyeonghun Lee Date: Wed, 10 May 2017 05:42:36 +0000 (+0900) Subject: [TNEXT-360] bug on msg_get_message() fixed X-Git-Tag: submit/tizen/20170510.054744^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=927853f9bfb07989658691da0feb8d51b1d187fd;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git [TNEXT-360] bug on msg_get_message() fixed Change-Id: Ia587c9dc0447ebbe482a2c69edd92fa2adb083da Signed-off-by: Kyeonghun Lee --- diff --git a/framework/storage-handler/MsgStorageMessage.cpp b/framework/storage-handler/MsgStorageMessage.cpp index 1f1dfff..8c5111d 100755 --- a/framework/storage-handler/MsgStorageMessage.cpp +++ b/framework/storage-handler/MsgStorageMessage.cpp @@ -2145,6 +2145,14 @@ msg_error_t MsgStoGetMessage(msg_message_id_t msgId, MSG_MESSAGE_INFO_S *pMsg, M dbHandle->finalizeQuery(); + if (pMsg->msgType.mainType == MSG_MMS_TYPE && pMsg->networkStatus == MSG_NETWORK_RETRIEVE_SUCCESS) { + /* get recipients information. */ + MsgStoGetRecipientsByMsgId(dbHandle, pMsg->msgId, &pMsg->nAddressCnt, &pMsg->addressList); + } else { + /* get address information. */ + MsgStoGetAddressByMsgId(dbHandle, pMsg->msgId, &pMsg->nAddressCnt, &pMsg->addressList); + } + /* Get MMS body if it is MMS. */ if ((pMsg->networkStatus == MSG_NETWORK_RETRIEVE_SUCCESS && (pMsg->msgType.subType == MSG_RETRIEVE_MMS || pMsg->msgType.subType == MSG_RETRIEVE_AUTOCONF_MMS || pMsg->msgType.subType == MSG_RETRIEVE_MANUALCONF_MMS)) || @@ -2206,12 +2214,6 @@ msg_error_t MsgStoGetMessage(msg_message_id_t msgId, MSG_MESSAGE_INFO_S *pMsg, M delete [] pDestMsg; pDestMsg = NULL; } - /* get recipients information. */ - MsgStoGetRecipientsByMsgId(dbHandle, pMsg->msgId, &pMsg->nAddressCnt, &pMsg->addressList); - - } else { - /* get address information. */ - MsgStoGetAddressByMsgId(dbHandle, pMsg->msgId, &pMsg->nAddressCnt, &pMsg->addressList); } /* Get SMS Sending Options */