coverity issue msg-service 36/199936/1 accepted/tizen/unified/20190218.064017 submit/tizen/20190216.133719
authorkamaljeet <kamal.jc@samsung.com>
Sat, 16 Feb 2019 13:27:26 +0000 (18:57 +0530)
committerkamaljeet <kamal.jc@samsung.com>
Sat, 16 Feb 2019 13:27:26 +0000 (18:57 +0530)
Change-Id: I83a34434e2a340362ea5f660925e27ea764ae3f9
Signed-off-by: kamaljeet <kamal.jc@samsung.com>
framework/storage-handler/MsgStorageMessage.cpp
utils/MsgCallStatusManager.cpp

index 1957858..477d4b6 100755 (executable)
@@ -1752,10 +1752,7 @@ msg_error_t MsgStoMoveMessageToFolder(msg_message_id_t msgId, msg_folder_id_t de
 
        memset(sqlQuery, 0x00, sizeof(sqlQuery));
 
-       if (msgType.mainType == MSG_SMS_TYPE)
-               snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET FOLDER_ID = %d WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, destFolderId, msgId);
-       else
-               snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET FOLDER_ID = %d WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, destFolderId, msgId);
+       snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET FOLDER_ID = %d WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, destFolderId, msgId);
 
        if (dbHandle->execQuery(sqlQuery) != MSG_SUCCESS)
                return MSG_ERR_DB_EXEC;
index 6a44693..2c79093 100644 (file)
@@ -33,10 +33,14 @@ static void call_status_change_received(GDBusConnection *connection, const gchar
        if (g_strcmp0(signal_name, CALL_MGR_MEMBER_NAME) == 0) {
                g_variant_get(parameters, "(iis)", &call_status, NULL, NULL);
                MSG_INFO("callStatus = [%d]", call_status);
-               if (call_status == 0)
-                       MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 0); //call not active
-               else
-                       MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 1); //call active ( call_status: 2 [Ringing], call_status: 1 [In call])
+               if (call_status == 0) {
+                       if (MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 0) != 0)
+                               MSG_FATAL("Fail to set value \n"); //call not active
+               }
+               else {
+                       if (MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 1) != 0)
+                               MSG_FATAL("Fail to set value \n"); //call active ( call_status: 2 [Ringing], call_status: 1 [In call])
+               }
        }
 }