From: Keebum Kim Date: Thu, 10 Oct 2013 04:57:43 +0000 (+0900) Subject: Fix bug in MsgStoGetAddressByConvId. X-Git-Tag: 2.2.1_release~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=903718ff5e19ed0c3fe06f6dd4ffb07255c713ac;p=framework%2Fmessaging%2Fmsg-service.git Fix bug in MsgStoGetAddressByConvId. --- diff --git a/utils/MsgUtilStorage.cpp b/utils/MsgUtilStorage.cpp index 88e457e..72634af 100755 --- a/utils/MsgUtilStorage.cpp +++ b/utils/MsgUtilStorage.cpp @@ -612,8 +612,7 @@ msg_error_t MsgStoGetAddressByConvId(MsgDbHandler *pDbHandle, msg_thread_id_t co pAddr->contactId = pDbHandle->getColumnToInt(index++); pDbHandle->getColumnToString(index++, MAX_ADDRESS_VAL_LEN, pAddr->addressVal); pDbHandle->getColumnToString(index++, MAX_DISPLAY_NAME_LEN, pAddr->displayName); - if(!strlen(pAddr->displayName)) - { + if(!strlen(pAddr->displayName)) { pDbHandle->getColumnToString(index++,MAX_DISPLAY_NAME_LEN, firstName); pDbHandle->getColumnToString(index++,MAX_DISPLAY_NAME_LEN, lastName); @@ -636,6 +635,9 @@ msg_error_t MsgStoGetAddressByConvId(MsgDbHandler *pDbHandle, msg_thread_id_t co strncat(pAddr->displayName, firstName, MAX_DISPLAY_NAME_LEN-strlen(pAddr->displayName)); } } + } else { + index++; // firstname + index++; // lastname } }