}
}
- dbHandle.endTrans(true);
-
/* In the case of MMS Message, load the MMS plugin to save MMS PDU */
if (pMsg->msgType.mainType == MSG_MMS_TYPE) {
MMS_MESSAGE_DATA_S mmsMsg;
err = plg->addMessage(pMsg, pSendOptInfo, pFileData);
if (err != MSG_SUCCESS) {
+ dbHandle.endTrans(false);
return MSG_ERR_STORAGE_ERROR;
}
err = MsgStoUpdateMMSMessage(pMsg);
if (err != MSG_SUCCESS) {
+ dbHandle.endTrans(false);
return MSG_ERR_STORAGE_ERROR;
}
}
}
}
+ dbHandle.endTrans(true);
+
MSG_END();
return MSG_SUCCESS;
memset(sqlQuery, 0x00, sizeof(sqlQuery));
- dbHandle.beginTrans();
-
if(pMsg->msgType.subType == MSG_RETRIEVE_AUTOCONF_MMS || pMsg->msgType.subType == MSG_RETRIEVE_MANUALCONF_MMS) {
if( pMsg->networkStatus == MSG_NETWORK_RETRIEVE_SUCCESS ) {
snprintf(sqlQuery, sizeof(sqlQuery),
MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->displayTime, pMsg->networkStatus, pMsg->thumbPath, pMsg->dataSize, pMsg->msgId);
if (dbHandle.prepareQuery(sqlQuery) != MSG_SUCCESS) {
- dbHandle.endTrans(false);
return MSG_ERR_DB_PREPARE;
}
MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->networkStatus, pMsg->thumbPath, pMsg->msgId);
if (dbHandle.prepareQuery(sqlQuery) != MSG_SUCCESS) {
- dbHandle.endTrans(false);
return MSG_ERR_DB_PREPARE;
}
MSGFW_MESSAGE_TABLE_NAME, pMsg->msgData, pMsg->thumbPath, pMsg->dataSize, pMsg->msgId);
if (dbHandle.prepareQuery(sqlQuery) != MSG_SUCCESS) {
- dbHandle.endTrans(false);
return MSG_ERR_DB_PREPARE;
}
MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->folderId, pMsg->networkStatus, pMsg->msgId);
if (dbHandle.prepareQuery(sqlQuery) != MSG_SUCCESS) {
- dbHandle.endTrans(false);
return MSG_ERR_DB_PREPARE;
}
}
if (dbHandle.stepQuery() != MSG_ERR_DB_DONE) {
dbHandle.finalizeQuery();
- dbHandle.endTrans(false);
MSG_DEBUG("Update MMS Message. Fail [%s]", sqlQuery);
return MSG_ERR_DB_STEP;
}
if (dbHandle.getTable(sqlQuery, &row) != MSG_SUCCESS) {
dbHandle.freeTable();
- dbHandle.endTrans(false);
return MSG_ERR_DB_PREPARE;
}
if (MsgStoUpdateConversation(&dbHandle, convId) != MSG_SUCCESS) {
MSG_DEBUG("MsgStoUpdateConversation() Error");
dbHandle.freeTable();
- dbHandle.endTrans(false);
-
return MSG_ERR_STORAGE_ERROR;
}
} else {
MSG_DEBUG("MsgStepQuery() Error [%s]", sqlQuery);
dbHandle.freeTable();
- dbHandle.endTrans(false);
return MSG_ERR_DB_STEP;
}
dbHandle.freeTable();
- dbHandle.endTrans(true);
MSG_END();