summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandeep singh <randeep.s@samsung.com>2019-02-16 15:28:46 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2019-02-16 15:28:46 +0000
commit61a80424d33161afe8639af73d8ab1930c7dc9e3 (patch)
treee473726b6b809c8f862436f5b99ac1f25b9a9bfe
parentb797d948a06f6b91718773606addda16b8f50bbd (diff)
parent3c24315dc3c53bea9230daa99c9b4c8c38779c39 (diff)
downloadmsg-service-61a80424d33161afe8639af73d8ab1930c7dc9e3.tar.gz
msg-service-61a80424d33161afe8639af73d8ab1930c7dc9e3.tar.bz2
msg-service-61a80424d33161afe8639af73d8ab1930c7dc9e3.zip
-rwxr-xr-xutils/MsgUtilFile.cpp2
-rwxr-xr-xutils/MsgUtilStorage.cpp20
2 files changed, 11 insertions, 11 deletions
diff --git a/utils/MsgUtilFile.cpp b/utils/MsgUtilFile.cpp
index c748e0e..7285d6e 100755
--- a/utils/MsgUtilFile.cpp
+++ b/utils/MsgUtilFile.cpp
@@ -355,7 +355,7 @@ bool MsgCreateFileName(char *pFileName)
bool MsgOpenAndReadFile(const char *pFileName, char **ppData, int *pDataSize)
{
if (!pFileName || !ppData || !pDataSize) {
- MSG_ERR("Invalid params!! pFileName=%s, ppData=%s, pDataSize=%p", pFileName, *ppData, (void *)pDataSize);
+ MSG_ERR("Invalid params");
return false;
}
diff --git a/utils/MsgUtilStorage.cpp b/utils/MsgUtilStorage.cpp
index 0f2e607..b025f95 100755
--- a/utils/MsgUtilStorage.cpp
+++ b/utils/MsgUtilStorage.cpp
@@ -1319,6 +1319,16 @@ msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread
memset(sqlQuery, 0x00, sizeof(sqlQuery));
snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET DISPLAY_NAME = ? WHERE CONV_ID = %d;",
MSGFW_CONVERSATION_TABLE_NAME, convId);
+
+ for (int j = 0; j < addressList.nCount; j++) {
+ msg_struct_s *pStruct = (msg_struct_s *)addressList.msg_struct_info[j];
+ delete (MSG_ADDRESS_INFO_S *)pStruct->data;
+ delete (msg_struct_s *)pStruct;
+ }
+
+ if (addressList.msg_struct_info != NULL) {
+ g_free((msg_struct_t *)addressList.msg_struct_info);
+ }
if (pDbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) {
MSG_DEBUG("Query Failed [%s]", sqlQuery);
@@ -1335,16 +1345,6 @@ msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread
pDbHandle->finalizeQuery();
- for (int j = 0; j < addressList.nCount; j++) {
- msg_struct_s *pStruct = (msg_struct_s *)addressList.msg_struct_info[j];
- delete (MSG_ADDRESS_INFO_S *)pStruct->data;
- delete (msg_struct_s *)pStruct;
- }
-
- if (addressList.msg_struct_info != NULL) {
- g_free((msg_struct_t *)addressList.msg_struct_info);
- }
-
return err;
}