#include "MsgPluginManager.h"
#include "MsgStorageHandler.h"
#include "MsgSubmitHandler.h"
-
+#include "MsgUtilFunction.h"
/*==================================================================================================
pReqInfo->reqId = reqId;
reqId++;
+ if (msg_check_dpm_policy(pReqInfo->msgInfo.msgType.mainType) == false) {
+ MSG_DEBUG("Messaging is restricted by DPM policy.");
+ MsgDbHandler *dbHandle = getDbHandle();
+ MsgStoUpdateNetworkStatus(dbHandle, &(pReqInfo->msgInfo), MSG_NETWORK_SEND_FAIL);
+ if (pReqInfo->msgInfo.msgType.subType != MSG_RETRIEVE_MMS)
+ /* sending popup */
+ msg_syspopup_message(true);
+ else
+ /* retrieving popup */
+ msg_syspopup_message(false);
+
+ return MSG_ERR_DPM_RESTRICT;
+ }
+
MSG_DEBUG("==== Msg ID = [%d] ====", pReqInfo->msgInfo.msgId);
MSG_DEBUG("==== Folder ID = [%d] ====", pReqInfo->msgInfo.folderId);
MSG_INFO("==== Main Type = [%d] ====", pReqInfo->msgInfo.msgType.mainType);
if (pReqInfo->msgInfo.msgPort.valid == false) {
pReqInfo->msgInfo.folderId = MSG_OUTBOX_ID;
- if (pReqInfo->msgInfo.msgId > 0 && (pReqInfo->msgInfo.folderId == MSG_DRAFT_ID || pReqInfo->msgInfo.folderId == MSG_OUTBOX_ID))
- err = MsgStoUpdateMessage(&(pReqInfo->msgInfo), &(pReqInfo->sendOptInfo));
- if (err != MSG_SUCCESS)
- return err;
+ if (pReqInfo->msgInfo.msgId > 0 && (pReqInfo->msgInfo.folderId == MSG_DRAFT_ID || pReqInfo->msgInfo.folderId == MSG_OUTBOX_ID)) {
+ err = MsgStoUpdateMessage(&(pReqInfo->msgInfo), &(pReqInfo->sendOptInfo));
+ if (err != MSG_SUCCESS)
+ return err;
+ }
}
err = plg->submitReq(pReqInfo);
/* copy whole of MMS PDU filepath to msgData */
strncpy(fileName, pReqInfo->msgInfo.msgData, MSG_FILENAME_LEN_MAX);
memset(pReqInfo->msgInfo.msgData, 0x00, sizeof(pReqInfo->msgInfo.msgData));
- snprintf(pReqInfo->msgInfo.msgData, sizeof(pReqInfo->msgInfo.msgData), "%s%s", MSG_IPC_DATA_PATH, fileName);
+ int wrn = snprintf(pReqInfo->msgInfo.msgData, sizeof(pReqInfo->msgInfo.msgData), "%s%s", MSG_IPC_DATA_PATH, fileName);
+ if(wrn<0)
+ MSG_DEBUG("snprintf was failed");
MSG_SEC_DEBUG("JAVA MMS PDU filepath:%s", pReqInfo->msgInfo.msgData);
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pReqInfo->msgInfo.sim_idx);
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ int tmpval = 0;
+ if (MsgSettingGetInt(keyName, &tmpval) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)tmpval;
if(simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present...");
MsgStoSetReadReportSendStatus(pReqInfo->msgInfo.msgId, MMS_RECEIVE_READ_REPORT_SENT);
if (err != MSG_SUCCESS) {
- if(pReqInfo->msgInfo.msgType.subType == MSG_RETRIEVE_MMS )
+ if(pReqInfo->msgInfo.msgType.subType == MSG_RETRIEVE_MMS)
MsgStoUpdateNetworkStatus(dbHandle, &(pReqInfo->msgInfo), MSG_NETWORK_RETRIEVE_FAIL);
else
MsgStoUpdateNetworkStatus(dbHandle, &(pReqInfo->msgInfo), MSG_NETWORK_SEND_FAIL);
return err;
}
-msg_error_t MsgCancelReq(msg_request_id_t reqId)
-{
- msg_error_t err = MSG_SUCCESS;
-
- return err;
-}
-
msg_error_t MsgUpdateSentMsg(msg_message_id_t MsgId, msg_network_status_t Status)
{
if (MsgStoGetMmsSendOpt(MsgId, &sendOpt) == MSG_SUCCESS)
bKeepCopy = sendOpt.bKeepCopy;
else
- ret = MsgSettingGetBool(MSG_KEEP_COPY, &bKeepCopy);
+ err = MsgSettingGetBool(MSG_KEEP_COPY, &bKeepCopy);
}
/* Move Msg to SENTBOX */