case MSG_NOTI_TYPE_NORMAL:
case MSG_NOTI_TYPE_SIM:
case MSG_NOTI_TYPE_CB:
- noti_id = MsgSettingGetInt(NOTIFICATION_PRIV_ID);
+ if (MsgSettingGetInt(NOTIFICATION_PRIV_ID, ¬i_id) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
break;
#else
case MSG_NOTI_TYPE_NORMAL:
break;
#endif
case MSG_NOTI_TYPE_FAILED:
- noti_id = MsgSettingGetInt(MSG_SENTFAIL_NOTI_ID);
+ if (MsgSettingGetInt(MSG_SENTFAIL_NOTI_ID, ¬i_id) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
break;
case MSG_NOTI_TYPE_VOICE_1: {
char keyName[MAX_VCONFKEY_NAME_LEN] = {0, };
snprintf(keyName, sizeof(keyName), "%s/%d", VOICE_NOTI_ID_1, sim_idx);
- noti_id = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, ¬i_id) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
break;
}
case MSG_NOTI_TYPE_VOICE_2: {
char keyName[MAX_VCONFKEY_NAME_LEN] = {0, };
snprintf(keyName, sizeof(keyName), "%s/%d", VOICE_NOTI_ID_2, sim_idx);
- noti_id = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, ¬i_id) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
break;
}
case MSG_NOTI_TYPE_SIM_FULL:
- noti_id = MsgSettingGetInt(SIM_FULL_NOTI_PRIV_ID);
+ if (MsgSettingGetInt(SIM_FULL_NOTI_PRIV_ID, ¬i_id) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
break;
default:
MSG_DEBUG("No matching noti type [%d]", noti_type);
case MSG_NOTI_TYPE_VOICE_2: {
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_COUNT, msg_info->sim_idx);
- noti_info->count = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &(noti_info->count)) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
noti_info->layout = NOTIFICATION_LY_NOTI_EVENT_SINGLE;
noti_info->time = msg_info->displayTime;
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, msg_info->sim_idx);
- char *voiceNumber = MsgSettingGetString(keyName);
+ char *voiceNumber = NULL;
+ if (MsgSettingGetString(keyName, &voiceNumber) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_ALPHA_ID, msg_info->sim_idx);
- char *voiceAlphaId = MsgSettingGetString(keyName);
+ char *voiceAlphaId = NULL;
+ if (MsgSettingGetString(keyName, &voiceAlphaId) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
char *dialNumber = NULL;
MSG_SEC_DEBUG("Voice mail server - alpha id = [%s], default num = [%s]", voiceAlphaId, voiceNumber);
setNotiSound(noti_h, NOTIFICATION_SOUND_TYPE_USER_DATA, msg_tone_file_path);
else {
#endif /* MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
- MSG_RINGTONE_TYPE_T ringtoneType = (MSG_RINGTONE_TYPE_T)MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
+ int tmpVal = 0;
+ if (MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_RINGTONE_TYPE_T ringtoneType = (MSG_RINGTONE_TYPE_T)tmpVal;
if (ringtoneType == MSG_RINGTONE_TYPE_SILENT)
setNotiSound(noti_h, NOTIFICATION_SOUND_TYPE_NONE, NULL);
else
int nRepeatValue = 0;
long nRepeatTime = 0;
- nRepeatValue = MsgSettingGetInt(MSG_ALERT_REP_TYPE);
+ if (MsgSettingGetInt(MSG_ALERT_REP_TYPE, &nRepeatValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
switch (nRepeatValue) {
case MSG_ALERT_TONE_ONCE:
if (ret == GESTURE_ERROR_NONE && event == GESTURE_EVENT_DETECTED && \
gesture == GESTURE_TURN_FACE_DOWN) {
MSG_DEBUG("GESTURE_TURN_FACE_DOWN gesture detected.");
- if (MsgSettingGetInt(VCONFKEY_SETAPPL_MOTION_ACTIVATION)) {
- if (MsgSettingGetInt(VCONFKEY_SETAPPL_USE_TURN_OVER)) {
- if (SensorCBFunction)
- SensorCBFunction();
- }
+ int motion_activation = 0;
+ int use_turn_over = 0;
+
+ if (MsgSettingGetInt(VCONFKEY_SETAPPL_MOTION_ACTIVATION, &motion_activation) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+
+ if (MsgSettingGetInt(VCONFKEY_SETAPPL_USE_TURN_OVER, &use_turn_over) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+
+ if (motion_activation && use_turn_over) {
+ if (SensorCBFunction)
+ SensorCBFunction();
}
}
}
defaultRingtonePath = NULL;
- defaultRingtonePath = MsgSettingGetString(VCONFKEY_SETAPPL_NOTI_RINGTONE_DEFAULT_PATH_STR);
+ if (MsgSettingGetString(VCONFKEY_SETAPPL_NOTI_RINGTONE_DEFAULT_PATH_STR, &defaultRingtonePath) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (defaultRingtonePath == NULL || MsgGetFileSize(defaultRingtonePath) < 1) {
defaultRingtonePath = (char *)DEFAULT_ALERT_FILE;
void MsgSoundPlayer::MsgGetRingtonePath(char *userRingtonePath, char **msg_tone_file_path_p)
{
#ifndef MSG_WEARABLE_PROFILE
- MSG_RINGTONE_TYPE_T ringtoneType = (MSG_RINGTONE_TYPE_T)MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
+ int tmpVal = 0;
+ if (MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_RINGTONE_TYPE_T ringtoneType = (MSG_RINGTONE_TYPE_T)tmpVal;
MSG_DEBUG("Ringtone type = [%d]", ringtoneType);
tmpFilePath = userRingtonePath;
} else {
if (ringtoneType == MSG_RINGTONE_TYPE_DEFAULT) {
- tmpFilePath = MsgSettingGetString(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR);
+ if (MsgSettingGetString(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, &tmpFilePath) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
} else {
- tmpFilePath = MsgSettingGetString(MSG_SETTING_RINGTONE_PATH);
+ if (MsgSettingGetString(MSG_SETTING_RINGTONE_PATH, &tmpFilePath) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
}
}
bool bSoundOn = false; /* sound setting on notification panel */
bool bVibrationOn = false; /* vibration setting on notification panel */
- MsgSettingGetBool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &bSoundOn);
- MsgSettingGetBool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &bVibrationOn);
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &bSoundOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &bVibrationOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/* Alert setting */
#if 0 /* not used value */
bool bNotiVibrationOn = false; /* alert vibration */
- MsgSettingGetBool(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, &bNotiVibrationOn);
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, &bNotiVibrationOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
#endif
bool bMsgSettingNoti = true; /* Alert for message notification */
MSG_RINGTONE_TYPE_T ringtoneType = MSG_RINGTONE_TYPE_DEFAULT; /*sound type for message notification */
bool bMsgSettingSound = true;
- MsgSettingGetBool(MSG_SETTING_VIBRATION, &bMsgSettingVibration);
- MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &bMsgSettingNoti);
- ringtoneType = (MSG_RINGTONE_TYPE_T)MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
+ if (MsgSettingGetBool(MSG_SETTING_VIBRATION, &bMsgSettingVibration) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &bMsgSettingNoti) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ int tmpVal = 0;
+ if (MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ ringtoneType = (MSG_RINGTONE_TYPE_T)tmpVal;
if (ringtoneType == MSG_RINGTONE_TYPE_SILENT)
bMsgSettingSound = false;
/* 2. Call is not active */
MSG_DEBUG("Call is not active.");
- int voiceRecording = MsgSettingGetInt(VCONFKEY_RECORDER_STATE);
+ int voiceRecording = 0;
+ if (MsgSettingGetInt(VCONFKEY_RECORDER_STATE, &voiceRecording) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (bVoiceMail) { /* 2-1. Voice message */
if (bMsgSettingNoti) {
/* check camera state */
int cameraState = 0; /* camera recording state */
- cameraState = MsgSettingGetInt(VCONFKEY_CAMERA_STATE);
+ if (MsgSettingGetInt(VCONFKEY_CAMERA_STATE, &cameraState) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
MSG_SEC_DEBUG("Camera state [%d]", cameraState);
if (cameraState == VCONFKEY_CAMERA_STATE_RECORDING) {
int nRepeatValue = 0;
long nRepeatTime = 0;
- nRepeatValue = MsgSettingGetInt(MSG_ALERT_REP_TYPE);
+ if (MsgSettingGetInt(MSG_ALERT_REP_TYPE, &nRepeatValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
switch (nRepeatValue) {
case MSG_ALERT_TONE_ONCE:
int MsgSoundPlayer::MsgSoundGetUnreadMsgCnt()
{
int unreadCnt = 0;
+ int unreadSms = 0;
+ int unreadMms = 0;
#ifndef MSG_WEARABLE_PROFILE
/* Get SMS Count */
- unreadCnt = MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_SMS_STATE);
+ if (MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_SMS_STATE, &unreadSms) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
/* Get MMS Count */
- unreadCnt += MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_MMS_STATE);
+ if (MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_MMS_STATE, &unreadMms) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+
+ unreadCnt = unreadSms + unreadMms;
MSG_DEBUG("unread count : [%d]", unreadCnt);
return;
}
- nRepeatValue = MsgSettingGetInt(MSG_ALERT_REP_TYPE);
+ if (MsgSettingGetInt(MSG_ALERT_REP_TYPE, &nRepeatValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
switch (nRepeatValue) {
case MSG_ALERT_TONE_ONCE:
{
MSG_BEGIN();
- MsgSettingGetBool(MSG_BLOCK_MESSAGE, pSetFlag);
+ if (MsgSettingGetBool(MSG_BLOCK_MESSAGE, pSetFlag) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
MSG_END();
}
bool isTTSOn = false;
- MsgSettingGetBool(VCONFKEY_SETAPPL_DRIVINGMODE_DRIVINGMODE, &isTTSOn);
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_DRIVINGMODE_DRIVINGMODE, &isTTSOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
MSG_DEBUG("VCONFKEY_SETAPPL_DRIVINGMODE_DRIVINGMODE [%d]", isTTSOn);
if(isTTSOn) {
if (msgSubType == MSG_MWI_VOICE_SMS) {
bool isVoiceMailOn = false;
- MsgSettingGetBool(VCONFKEY_SETAPPL_DRIVINGMODE_NEWVOICEMAILS, &isVoiceMailOn);
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_DRIVINGMODE_NEWVOICEMAILS, &isVoiceMailOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
MSG_DEBUG("VCONFKEY_SETAPPL_DRIVINGMODE_NEWVOICEMAILS [%d]", isVoiceMailOn);
if (isVoiceMailOn) {
isVoiceMail = true;
}
} else {
bool isTTSMsgOn = false;
- MsgSettingGetBool(VCONFKEY_SETAPPL_DRIVINGMODE_MESSAGE, &isTTSMsgOn);
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_DRIVINGMODE_MESSAGE, &isTTSMsgOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
MSG_DEBUG("VCONFKEY_SETAPPL_DRIVINGMODE_MESSAGE [%d]", isTTSMsgOn);
if (!isTTSMsgOn || !isFavorites) {
return;
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, pMsgInfo->sim_idx);
- char *voiceNumber = MsgSettingGetString(keyName);
+ char *voiceNumber = NULL;
+ if (MsgSettingGetString(keyName, &voiceNumber) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (voiceNumber) {
MSG_SEC_DEBUG("Voice Mail Number [%s]", voiceNumber);
snprintf(pMsgInfo->addressList[0].addressVal, sizeof(pMsgInfo->addressList[0].addressVal), "%s", voiceNumber);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_ALPHA_ID, pMsgInfo->sim_idx);
- char *alphaId = MsgSettingGetString(keyName);
+ char *alphaId = NULL;
+ if (MsgSettingGetString(keyName, &alphaId) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (alphaId) {
memset(pMsgInfo->addressList->displayName, 0x00, sizeof(pMsgInfo->addressList->displayName));
memcpy(pMsgInfo->addressList->displayName, alphaId, sizeof(pMsgInfo->addressList->displayName)-1);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_COUNT, pMsgInfo->sim_idx);
- int voicecnt = MsgSettingGetInt(keyName);
+ int voicecnt = 0;
+ if (MsgSettingGetInt(keyName, &voicecnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
memset(pMsgInfo->msgText, 0x00, sizeof(pMsgInfo->msgText));
snprintf(pMsgInfo->msgText, sizeof(pMsgInfo->msgText), "%d", voicecnt);
pMsgInfo->dataSize = strlen(pMsgInfo->msgText);
MSG_DEBUG("Starting WAP Message Incoming.");
#ifndef MSG_WEARABLE_PROFILE
- MSG_PUSH_SERVICE_TYPE_T serviceType = (MSG_PUSH_SERVICE_TYPE_T)MsgSettingGetInt(PUSH_SERVICE_TYPE);
+ int tmpVal = 0;
+ if (MsgSettingGetInt(PUSH_SERVICE_TYPE, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_PUSH_SERVICE_TYPE_T serviceType = (MSG_PUSH_SERVICE_TYPE_T)tmpVal;
app_control_h svc_handle = NULL;
switch (pMsgInfo->msgType.subType) {
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
MSG_SIM_STATUS_T simStatus = MSG_SIM_STATUS_NOT_FOUND;
+ int tmpVal = 0;
#ifdef USE_GCONF
err = MsgGconfGetClient();
case MSG_SMSC_LIST :
/* Check SIM is present or not */
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pSetting->option.smscList.simIndex);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
if (pSetting->option.cbMsgOpt.simIndex != 0) {
/* Check SIM is present or not */
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pSetting->option.cbMsgOpt.simIndex);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
case MSG_VOICEMAIL_OPT :
/* Check SIM is present or not */
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pSetting->option.voiceMailOpt.simIndex);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
#endif
char keyName[MAX_VCONFKEY_NAME_LEN] = {0, };
MSG_SIM_STATUS_T simStatus = MSG_SIM_STATUS_NOT_FOUND;
+ int tmpVal = 0;
switch (pSetting->type) {
case MSG_GENERAL_OPT:
case MSG_SMSC_LIST: {
/* Check SIM is present or not */
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pSetting->option.smscList.simIndex);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
case MSG_CBMSG_OPT: {
/* Check SIM is present or not */
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pSetting->option.cbMsgOpt.simIndex);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
}
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pSetting->option.voiceMailOpt.simIndex);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
memcpy(&generalOpt, &(pSetting->option.generalOpt), sizeof(MSG_GENERAL_OPT_S));
- MsgSettingGetBool(MSG_KEEP_COPY, &bValue);
+ if (MsgSettingGetBool(MSG_KEEP_COPY, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != generalOpt.bKeepCopy) {
if (MsgSettingSetBool(MSG_KEEP_COPY, generalOpt.bKeepCopy) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_KEEP_COPY);
}
}
- MsgSettingGetBool(MSG_AUTO_ERASE, &bValue);
+ if (MsgSettingGetBool(MSG_AUTO_ERASE, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != generalOpt.bAutoErase) {
if (MsgSettingSetBool(MSG_AUTO_ERASE, generalOpt.bAutoErase) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_AUTO_ERASE);
}
}
- MsgSettingGetBool(MSG_BLOCK_UNKNOWN_MSG, &bValue);
+ if (MsgSettingGetBool(MSG_BLOCK_UNKNOWN_MSG, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != generalOpt.bBlockUnknownMsg) {
if (MsgSettingSetBool(MSG_BLOCK_UNKNOWN_MSG, generalOpt.bBlockUnknownMsg) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_BLOCK_UNKNOWN_MSG);
}
}
- iValue = MsgSettingGetInt(MSG_SMS_LIMIT);
+ if (MsgSettingGetInt(MSG_SMS_LIMIT, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)generalOpt.smsLimitCnt) {
if (MsgSettingSetInt(MSG_SMS_LIMIT, (int)generalOpt.smsLimitCnt) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_SMS_LIMIT);
}
}
- iValue = MsgSettingGetInt(MSG_MMS_LIMIT);
+ if (MsgSettingGetInt(MSG_MMS_LIMIT, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)generalOpt.mmsLimitCnt) {
if (MsgSettingSetInt(MSG_MMS_LIMIT, (int)generalOpt.mmsLimitCnt) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_MMS_LIMIT);
}
}
- MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &bValue);
+ if (MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != generalOpt.bNotification) {
if (MsgSettingSetBool(MSG_SETTING_NOTIFICATION, generalOpt.bNotification) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_SETTING_NOTIFICATION);
}
}
- MsgSettingGetBool(MSG_SETTING_VIBRATION, &bValue);
+ if (MsgSettingGetBool(MSG_SETTING_VIBRATION, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != generalOpt.bVibration) {
if (MsgSettingSetBool(MSG_SETTING_VIBRATION, generalOpt.bVibration) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_SETTING_VIBRATION);
}
}
- MsgSettingGetBool(MSG_SETTING_PREVIEW, &bValue);
+ if (MsgSettingGetBool(MSG_SETTING_PREVIEW, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != generalOpt.bPreview) {
if (MsgSettingSetBool(MSG_SETTING_PREVIEW, generalOpt.bPreview) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_SETTING_PREVIEW);
}
}
- iValue = MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
+ if (MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != generalOpt.ringtoneType) {
if (MsgSettingSetInt(MSG_SETTING_RINGTONE_TYPE, generalOpt.ringtoneType) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_SETTING_RINGTONE_TYPE);
return MSG_ERR_SET_SETTING;
}
} else {
- strValue = MsgSettingGetString(MSG_SETTING_RINGTONE_PATH);
+ if (MsgSettingGetString(MSG_SETTING_RINGTONE_PATH, &strValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MSG_DEBUG("strValue=[%s], ringtone=[%s]", strValue, generalOpt.ringtonePath);
if (g_strcmp0(strValue, generalOpt.ringtonePath) != 0) {
strValue = NULL;
}
- iValue = MsgSettingGetInt(MSG_ALERT_REP_TYPE);
+ if (MsgSettingGetInt(MSG_ALERT_REP_TYPE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)generalOpt.alertTone) {
if (MsgSettingSetInt(MSG_ALERT_REP_TYPE, (int)generalOpt.alertTone) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSG_ALERT_REP_TYPE);
memcpy(&sendOpt, &(pSetting->option.smsSendOpt), sizeof(MSG_SMS_SENDOPT_S));
- iValue = MsgSettingGetInt(SMS_SEND_DCS);
+ if (MsgSettingGetInt(SMS_SEND_DCS, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.dcs) {
if (MsgSettingSetInt(SMS_SEND_DCS, (int)sendOpt.dcs) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", SMS_SEND_DCS);
}
}
- iValue = MsgSettingGetInt(SMS_SEND_NETWORK_MODE);
+ if (MsgSettingGetInt(SMS_SEND_NETWORK_MODE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.netMode) {
if (MsgSettingSetInt(SMS_SEND_NETWORK_MODE, (int)sendOpt.netMode) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", SMS_SEND_NETWORK_MODE);
}
}
- MsgSettingGetBool(SMS_SEND_REPLY_PATH, &bValue);
+ if (MsgSettingGetBool(SMS_SEND_REPLY_PATH, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bReplyPath) {
if (MsgSettingSetBool(SMS_SEND_REPLY_PATH, sendOpt.bReplyPath) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", SMS_SEND_REPLY_PATH);
}
}
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &bValue);
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bDeliveryReport) {
if (MsgSettingSetBool(SMS_SEND_DELIVERY_REPORT, sendOpt.bDeliveryReport) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", SMS_SEND_DELIVERY_REPORT);
}
}
- iValue = MsgSettingGetInt(SMS_SEND_SAVE_STORAGE);
+ if (MsgSettingGetInt(SMS_SEND_SAVE_STORAGE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.saveStorage) {
if (MsgSettingSetInt(SMS_SEND_SAVE_STORAGE, (int)sendOpt.saveStorage) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", SMS_SEND_SAVE_STORAGE);
memcpy(&sendOpt, &(pSetting->option.mmsSendOpt), sizeof(MSG_MMS_SENDOPT_S));
- iValue = MsgSettingGetInt(MMS_SEND_MSG_CLASS);
+ if (MsgSettingGetInt(MMS_SEND_MSG_CLASS, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.msgClass) {
if (MsgSettingSetInt(MMS_SEND_MSG_CLASS, (int)sendOpt.msgClass) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_MSG_CLASS);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_PRIORITY);
+ if (MsgSettingGetInt(MMS_SEND_PRIORITY, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.priority) {
if (MsgSettingSetInt(MMS_SEND_PRIORITY, (int)sendOpt.priority) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_PRIORITY);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_EXPIRY_TIME);
+ if (MsgSettingGetInt(MMS_SEND_EXPIRY_TIME, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.expiryTime) {
if (MsgSettingSetInt(MMS_SEND_EXPIRY_TIME, (int)sendOpt.expiryTime) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_EXPIRY_TIME);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_DELIVERY_TIME);
+ if (MsgSettingGetInt(MMS_SEND_DELIVERY_TIME, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.deliveryTime) {
if (MsgSettingSetInt(MMS_SEND_DELIVERY_TIME, (int)sendOpt.deliveryTime) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_DELIVERY_TIME);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY);
+ if (MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.customDeliveryTime) {
if (MsgSettingSetInt(MMS_SEND_CUSTOM_DELIVERY, sendOpt.customDeliveryTime) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_CUSTOM_DELIVERY);
}
}
- MsgSettingGetBool(MMS_SEND_SENDER_VISIBILITY, &bValue);
+ if (MsgSettingGetBool(MMS_SEND_SENDER_VISIBILITY, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bSenderVisibility) {
if (MsgSettingSetBool(MMS_SEND_SENDER_VISIBILITY, sendOpt.bSenderVisibility) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_SENDER_VISIBILITY);
}
}
- MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &bValue);
+ if (MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bDeliveryReport) {
if (MsgSettingSetBool(MMS_SEND_DELIVERY_REPORT, sendOpt.bDeliveryReport) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_DELIVERY_REPORT);
}
}
- MsgSettingGetBool(MMS_SEND_READ_REPLY, &bValue);
+ if (MsgSettingGetBool(MMS_SEND_READ_REPLY, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bReadReply) {
if (MsgSettingSetBool(MMS_SEND_READ_REPLY, sendOpt.bReadReply) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_READ_REPLY);
}
#endif /* __NOT_USED_BY_DESIGN_CHANGE__ */
- MsgSettingGetBool(MMS_SEND_BODY_REPLYING, &bValue);
+ if (MsgSettingGetBool(MMS_SEND_BODY_REPLYING, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bBodyReplying) {
if (MsgSettingSetBool(MMS_SEND_BODY_REPLYING, sendOpt.bBodyReplying) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_BODY_REPLYING);
}
}
- MsgSettingGetBool(MMS_SEND_HIDE_RECIPIENTS, &bValue);
+ if (MsgSettingGetBool(MMS_SEND_HIDE_RECIPIENTS, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != sendOpt.bHideRecipients) {
if (MsgSettingSetBool(MMS_SEND_HIDE_RECIPIENTS, sendOpt.bHideRecipients) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_HIDE_RECIPIENTS);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING);
+ if (MsgSettingGetInt(MMS_SEND_REPLY_CHARGING, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != sendOpt.replyCharging) {
if (MsgSettingSetInt(MMS_SEND_REPLY_CHARGING, sendOpt.replyCharging) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_REPLY_CHARGING);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_DEADLINE);
+ if (MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_DEADLINE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.replyChargingDeadline) {
if (MsgSettingSetInt(MMS_SEND_REPLY_CHARGING_DEADLINE, sendOpt.replyChargingDeadline) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_REPLY_CHARGING_DEADLINE);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_SIZE);
+ if (MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_SIZE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)sendOpt.replyChargingSize) {
if (MsgSettingSetInt(MMS_SEND_REPLY_CHARGING_SIZE, sendOpt.replyChargingSize) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_REPLY_CHARGING_SIZE);
}
}
- iValue = MsgSettingGetInt(MMS_SEND_CREATION_MODE);
+ if (MsgSettingGetInt(MMS_SEND_CREATION_MODE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != sendOpt.creationMode) {
if (MsgSettingSetInt(MMS_SEND_CREATION_MODE, sendOpt.creationMode) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_SEND_CREATION_MODE);
memcpy(&recvOpt, &(pSetting->option.mmsRecvOpt), sizeof(MSG_MMS_RECVOPT_S));
- iValue = MsgSettingGetInt(MMS_RECV_HOME_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_HOME_NETWORK, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)recvOpt.homeNetwork) {
if (MsgSettingSetInt(MMS_RECV_HOME_NETWORK, (int)recvOpt.homeNetwork) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_RECV_HOME_NETWORK);
}
}
- iValue = MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)recvOpt.abroadNetwok) {
if (MsgSettingSetInt(MMS_RECV_ABROAD_NETWORK, (int)recvOpt.abroadNetwok) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_RECV_ABROAD_NETWORK);
}
}
- MsgSettingGetBool(MMS_RECV_READ_RECEIPT, &bValue);
+ if (MsgSettingGetBool(MMS_RECV_READ_RECEIPT, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != recvOpt.readReceipt) {
if (MsgSettingSetBool(MMS_RECV_READ_RECEIPT, recvOpt.readReceipt) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_RECV_READ_RECEIPT);
}
}
- MsgSettingGetBool(MMS_RECV_DELIVERY_RECEIPT, &bValue);
+ if (MsgSettingGetBool(MMS_RECV_DELIVERY_RECEIPT, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != recvOpt.bDeliveryReceipt) {
if (MsgSettingSetBool(MMS_RECV_DELIVERY_RECEIPT, recvOpt.bDeliveryReceipt) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_RECV_DELIVERY_RECEIPT);
}
}
- MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &bValue);
+ if (MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != recvOpt.bRejectUnknown) {
if (MsgSettingSetBool(MMS_RECV_REJECT_UNKNOWN, recvOpt.bRejectUnknown) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_RECV_REJECT_UNKNOWN);
}
}
- MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &bValue);
+ if (MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != recvOpt.bRejectAdvertisement) {
if (MsgSettingSetBool(MMS_RECV_REJECT_ADVERTISE, recvOpt.bRejectAdvertisement) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_RECV_REJECT_ADVERTISE);
memcpy(&styleOpt, &(pSetting->option.mmsStyleOpt), sizeof(MSG_MMS_STYLEOPT_S));
- iValue = MsgSettingGetInt(MMS_STYLE_FONT_SIZE);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_SIZE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.fontSize) {
if (MsgSettingSetInt(MMS_STYLE_FONT_SIZE, styleOpt.fontSize) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_SIZE);
}
}
- MsgSettingGetBool(MMS_STYLE_FONT_STYLE_BOLD, &bValue);
+ if (MsgSettingGetBool(MMS_STYLE_FONT_STYLE_BOLD, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != styleOpt.bFontStyleBold) {
if (MsgSettingSetBool(MMS_STYLE_FONT_STYLE_BOLD, styleOpt.bFontStyleBold) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_STYLE_BOLD);
}
}
- MsgSettingGetBool(MMS_STYLE_FONT_STYLE_ITALIC, &bValue);
+ if (MsgSettingGetBool(MMS_STYLE_FONT_STYLE_ITALIC, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != styleOpt.bFontStyleItalic) {
if (MsgSettingSetBool(MMS_STYLE_FONT_STYLE_ITALIC, styleOpt.bFontStyleItalic) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_STYLE_ITALIC);
}
}
- MsgSettingGetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, &bValue);
+ if (MsgSettingGetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != styleOpt.bFontStyleUnderline) {
if (MsgSettingSetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, styleOpt.bFontStyleUnderline) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_STYLE_UNDERLINE);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_RED);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_RED, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.fontColorRed) {
if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_RED, styleOpt.fontColorRed) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_RED);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_GREEN);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_GREEN, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.fontColorGreen) {
if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_GREEN, styleOpt.fontColorGreen) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_GREEN);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_BLUE);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_BLUE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.fontColorBlue) {
if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_BLUE, styleOpt.fontColorBlue) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_BLUE);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_HUE);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_HUE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.fontColorHue) {
if (MsgSettingSetInt(MMS_STYLE_FONT_COLOR_HUE, styleOpt.fontColorHue) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_FONT_COLOR_HUE);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_RED);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_RED, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.bgColorRed) {
if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_RED, styleOpt.bgColorRed) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_RED);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_GREEN);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_GREEN, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.bgColorGreen) {
if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_GREEN, styleOpt.bgColorGreen) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_GREEN);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_BLUE);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_BLUE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.bgColorBlue) {
if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_BLUE, styleOpt.bgColorBlue) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_BLUE);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_HUE);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_HUE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.bgColorHue) {
if (MsgSettingSetInt(MMS_STYLE_BG_COLOR_HUE, styleOpt.bgColorHue) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_BG_COLOR_HUE);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_PAGE_DUR);
+ if (MsgSettingGetInt(MMS_STYLE_PAGE_DUR, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.pageDur) {
if (MsgSettingSetInt(MMS_STYLE_PAGE_DUR, styleOpt.pageDur) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_PAGE_DUR);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_PAGE_CUSTOM_DUR);
+ if (MsgSettingGetInt(MMS_STYLE_PAGE_CUSTOM_DUR, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.pageCustomDur) {
if (MsgSettingSetInt(MMS_STYLE_PAGE_CUSTOM_DUR, styleOpt.pageCustomDur) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_PAGE_CUSTOM_DUR);
}
}
- iValue = MsgSettingGetInt(MMS_STYLE_PAGE_DUR_MANUAL);
+ if (MsgSettingGetInt(MMS_STYLE_PAGE_DUR_MANUAL, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)styleOpt.pageDurManual) {
if (MsgSettingSetInt(MMS_STYLE_PAGE_DUR_MANUAL, styleOpt.pageDurManual) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MMS_STYLE_PAGE_DUR_MANUAL);
memcpy(&pushOpt, &(pSetting->option.pushMsgOpt), sizeof(MSG_PUSHMSG_OPT_S));
- MsgSettingGetBool(PUSH_RECV_OPTION, &bValue);
+ if (MsgSettingGetBool(PUSH_RECV_OPTION, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != pushOpt.bReceive) {
if (MsgSettingSetBool(PUSH_RECV_OPTION, pushOpt.bReceive) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", PUSH_RECV_OPTION);
}
}
- iValue = MsgSettingGetInt(PUSH_SERVICE_TYPE);
+ if (MsgSettingGetInt(PUSH_SERVICE_TYPE, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != (int)pushOpt.serviceType) {
if (MsgSettingSetInt(PUSH_SERVICE_TYPE, (int)pushOpt.serviceType) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", PUSH_SERVICE_TYPE);
if (simIndex != 0) {
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_MAX_SIM_COUNT, simIndex);
- cbOpt.maxSimCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &(cbOpt.maxSimCnt)) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (cbOpt.channelData.channelCnt > cbOpt.maxSimCnt) {
MSG_DEBUG("Channel Count [%d] is over Max SIM Count [%d]", cbOpt.channelData.channelCnt, cbOpt.maxSimCnt);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_RECEIVE, simIndex);
- MsgSettingGetBool(keyName, &bValue);
+ if (MsgSettingGetBool(keyName, &bValue) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (bValue != cbOpt.bReceive) {
if (MsgSettingSetBool(keyName, cbOpt.bReceive) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", keyName);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_MAX_SIM_COUNT, simIndex);
- iValue = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != cbOpt.maxSimCnt) {
if (MsgSettingSetInt(keyName, cbOpt.maxSimCnt) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", keyName);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, simIndex);
- pValue = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &pValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (pValue != NULL && strcmp(pValue, voiceMailOpt.mailNumber) == 0) {
/* Value is same with previous one. Therefore, we don't need to save it. */
memcpy(&msgSizeOpt, &(pSetting->option.msgSizeOpt), sizeof(MSG_MSGSIZE_OPT_S));
- iValue = MsgSettingGetInt(MSGSIZE_OPTION);
+ if (MsgSettingGetInt(MSGSIZE_OPTION, &iValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (iValue != msgSizeOpt.nMsgSize) {
if (MsgSettingSetInt(MSGSIZE_OPTION, msgSizeOpt.nMsgSize) != MSG_SUCCESS) {
MSG_DEBUG("Error to set config data [%s]", MSGSIZE_OPTION);
memset(&(pSetting->option.generalOpt), 0x00, sizeof(MSG_GENERAL_OPT_S));
- MsgSettingGetBool(MSG_KEEP_COPY, &pSetting->option.generalOpt.bKeepCopy);
+ if (MsgSettingGetBool(MSG_KEEP_COPY, &pSetting->option.generalOpt.bKeepCopy) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MSG_BLOCK_UNKNOWN_MSG, &pSetting->option.generalOpt.bBlockUnknownMsg);
+ if (MsgSettingGetBool(MSG_BLOCK_UNKNOWN_MSG, &pSetting->option.generalOpt.bBlockUnknownMsg) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- pSetting->option.generalOpt.smsLimitCnt = MsgSettingGetInt(MSG_SMS_LIMIT);
+ if (MsgSettingGetInt(MSG_SMS_LIMIT, &(pSetting->option.generalOpt.smsLimitCnt)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.generalOpt.mmsLimitCnt = MsgSettingGetInt(MSG_MMS_LIMIT);
+ if (MsgSettingGetInt(MSG_MMS_LIMIT, &(pSetting->option.generalOpt.mmsLimitCnt)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &pSetting->option.generalOpt.bNotification);
+ if (MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &pSetting->option.generalOpt.bNotification) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MSG_SETTING_VIBRATION, &pSetting->option.generalOpt.bVibration);
+ if (MsgSettingGetBool(MSG_SETTING_VIBRATION, &pSetting->option.generalOpt.bVibration) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MSG_SETTING_PREVIEW, &pSetting->option.generalOpt.bPreview);
+ if (MsgSettingGetBool(MSG_SETTING_PREVIEW, &pSetting->option.generalOpt.bPreview) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MSG_AUTO_ERASE, &pSetting->option.generalOpt.bAutoErase);
+ if (MsgSettingGetBool(MSG_AUTO_ERASE, &pSetting->option.generalOpt.bAutoErase) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- pSetting->option.generalOpt.ringtoneType = MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
+ if (MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE, &(pSetting->option.generalOpt.ringtoneType)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- tmpValue = MsgSettingGetString(MSG_SETTING_RINGTONE_PATH);
+ if (MsgSettingGetString(MSG_SETTING_RINGTONE_PATH, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (tmpValue != NULL) {
strncpy(pSetting->option.generalOpt.ringtonePath, tmpValue, MSG_FILEPATH_LEN_MAX);
free(tmpValue);
tmpValue = NULL;
}
- pSetting->option.generalOpt.alertTone = (MSG_ALERT_TONE_T)MsgSettingGetInt(MSG_ALERT_REP_TYPE);
+ int tmpVal = 0;
+ if (MsgSettingGetInt(MSG_ALERT_REP_TYPE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
+ pSetting->option.generalOpt.alertTone = (MSG_ALERT_TONE_T)tmpVal;
}
void MsgGetSMSSendOpt(MSG_SETTING_S *pSetting)
{
+ int tmpVal = 0;
memset(&(pSetting->option.smsSendOpt), 0x00, sizeof(MSG_SMS_SENDOPT_S));
- pSetting->option.smsSendOpt.dcs = (msg_encode_type_t)MsgSettingGetInt(SMS_SEND_DCS);
+ if (MsgSettingGetInt(SMS_SEND_DCS, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.smsSendOpt.netMode = (MSG_SMS_NETWORK_MODE_T)MsgSettingGetInt(SMS_SEND_NETWORK_MODE);
+ pSetting->option.smsSendOpt.dcs = (msg_encode_type_t)tmpVal;
- MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSetting->option.smsSendOpt.bReplyPath);
+ if (MsgSettingGetInt(SMS_SEND_NETWORK_MODE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSetting->option.smsSendOpt.bDeliveryReport);
+ pSetting->option.smsSendOpt.netMode = (MSG_SMS_NETWORK_MODE_T)tmpVal;
- pSetting->option.smsSendOpt.saveStorage = (MSG_SMS_SAVE_STORAGE_T)MsgSettingGetInt(SMS_SEND_SAVE_STORAGE);
+ if (MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSetting->option.smsSendOpt.bReplyPath) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSetting->option.smsSendOpt.bDeliveryReport) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetInt(SMS_SEND_SAVE_STORAGE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
+ pSetting->option.smsSendOpt.saveStorage = (MSG_SMS_SAVE_STORAGE_T)tmpVal;
}
void MsgGetMMSSendOpt(MSG_SETTING_S *pSetting)
{
+ int tmpVal = 0;
memset(&(pSetting->option.mmsSendOpt), 0x00, sizeof(MSG_MMS_SENDOPT_S));
- pSetting->option.mmsSendOpt.msgClass = (MSG_MMS_MSG_CLASS_TYPE_T)MsgSettingGetInt(MMS_SEND_MSG_CLASS);
+ if (MsgSettingGetInt(MMS_SEND_MSG_CLASS, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
+ pSetting->option.mmsSendOpt.msgClass = (MSG_MMS_MSG_CLASS_TYPE_T)tmpVal;
+
+ if (MsgSettingGetInt(MMS_SEND_PRIORITY, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsSendOpt.priority = (msg_priority_type_t)MsgSettingGetInt(MMS_SEND_PRIORITY);
+ pSetting->option.mmsSendOpt.priority = (msg_priority_type_t)tmpVal;
- pSetting->option.mmsSendOpt.expiryTime = (MSG_MMS_EXPIRY_TIME_T)MsgSettingGetInt(MMS_SEND_EXPIRY_TIME);
+ if (MsgSettingGetInt(MMS_SEND_EXPIRY_TIME, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsSendOpt.deliveryTime = (MSG_MMS_DELIVERY_TIME_T)MsgSettingGetInt(MMS_SEND_DELIVERY_TIME);
+ pSetting->option.mmsSendOpt.expiryTime = (MSG_MMS_EXPIRY_TIME_T)tmpVal;
- pSetting->option.mmsSendOpt.customDeliveryTime = MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY);
+ if (MsgSettingGetInt(MMS_SEND_DELIVERY_TIME, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- MsgSettingGetBool(MMS_SEND_SENDER_VISIBILITY, &pSetting->option.mmsSendOpt.bSenderVisibility);
+ pSetting->option.mmsSendOpt.deliveryTime = (MSG_MMS_DELIVERY_TIME_T)tmpVal;
- MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &pSetting->option.mmsSendOpt.bDeliveryReport);
+ if (MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- MsgSettingGetBool(MMS_SEND_READ_REPLY, &pSetting->option.mmsSendOpt.bReadReply);
+ if (MsgSettingGetBool(MMS_SEND_SENDER_VISIBILITY, &pSetting->option.mmsSendOpt.bSenderVisibility) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &pSetting->option.mmsSendOpt.bDeliveryReport) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MMS_SEND_READ_REPLY, &pSetting->option.mmsSendOpt.bReadReply) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
#ifdef __NOT_USED_BY_DESIGN_CHANGE__
- MsgSettingGetBool(MMS_SEND_KEEP_COPY, &pSetting->option.mmsSendOpt.bKeepCopy);
+ if (MsgSettingGetBool(MMS_SEND_KEEP_COPY, &pSetting->option.mmsSendOpt.bKeepCopy) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
#endif /* __NOT_USED_BY_DESIGN_CHANGE__ */
- MsgSettingGetBool(MMS_SEND_BODY_REPLYING, &pSetting->option.mmsSendOpt.bBodyReplying);
+ if (MsgSettingGetBool(MMS_SEND_BODY_REPLYING, &pSetting->option.mmsSendOpt.bBodyReplying) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MMS_SEND_HIDE_RECIPIENTS, &pSetting->option.mmsSendOpt.bHideRecipients) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetInt(MMS_SEND_REPLY_CHARGING, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
+ pSetting->option.mmsSendOpt.replyCharging = (MSG_MMS_REPLY_CHARGING_TYPE_T)tmpVal;
- MsgSettingGetBool(MMS_SEND_HIDE_RECIPIENTS, &pSetting->option.mmsSendOpt.bHideRecipients);
+ if (MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_DEADLINE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsSendOpt.replyCharging = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING);
+ pSetting->option.mmsSendOpt.replyChargingDeadline = (unsigned int)tmpVal;
- pSetting->option.mmsSendOpt.replyChargingDeadline = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_DEADLINE);
+ if (MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_SIZE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsSendOpt.replyChargingSize = MsgSettingGetInt(MMS_SEND_REPLY_CHARGING_SIZE);
+ pSetting->option.mmsSendOpt.replyChargingSize = (unsigned int)tmpVal;
- pSetting->option.mmsSendOpt.creationMode = MsgSettingGetInt(MMS_SEND_CREATION_MODE);
+ if (MsgSettingGetInt(MMS_SEND_CREATION_MODE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
+ pSetting->option.mmsSendOpt.creationMode = (MSG_MMS_CREATION_MODE_T)tmpVal;
}
void MsgGetMMSRecvOpt(MSG_SETTING_S *pSetting)
{
+ int tmpVal = 0;
memset(&(pSetting->option.mmsRecvOpt), 0x00, sizeof(MSG_MMS_RECVOPT_S));
- pSetting->option.mmsRecvOpt.homeNetwork = (MSG_MMS_HOME_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_HOME_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_HOME_NETWORK, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+ pSetting->option.mmsRecvOpt.homeNetwork = (MSG_MMS_HOME_RETRIEVE_TYPE_T)tmpVal;
- pSetting->option.mmsRecvOpt.abroadNetwok = (MSG_MMS_ABROAD_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+ pSetting->option.mmsRecvOpt.abroadNetwok = (MSG_MMS_ABROAD_RETRIEVE_TYPE_T)tmpVal;
- MsgSettingGetBool(MMS_RECV_READ_RECEIPT, &pSetting->option.mmsRecvOpt.readReceipt);
+ if (MsgSettingGetBool(MMS_RECV_READ_RECEIPT, &pSetting->option.mmsRecvOpt.readReceipt) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MMS_RECV_DELIVERY_RECEIPT, &pSetting->option.mmsRecvOpt.bDeliveryReceipt);
+ if (MsgSettingGetBool(MMS_RECV_DELIVERY_RECEIPT, &pSetting->option.mmsRecvOpt.bDeliveryReceipt) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &pSetting->option.mmsRecvOpt.bRejectUnknown);
+ if (MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &pSetting->option.mmsRecvOpt.bRejectUnknown) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &pSetting->option.mmsRecvOpt.bRejectAdvertisement);
+ if (MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &pSetting->option.mmsRecvOpt.bRejectAdvertisement) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
}
{
memset(&(pSetting->option.mmsStyleOpt), 0x00, sizeof(MSG_MMS_STYLEOPT_S));
- pSetting->option.mmsStyleOpt.fontSize = MsgSettingGetInt(MMS_STYLE_FONT_SIZE);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_SIZE, (int *)&(pSetting->option.mmsStyleOpt.fontSize)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- MsgSettingGetBool(MMS_STYLE_FONT_STYLE_BOLD, &pSetting->option.mmsStyleOpt.bFontStyleBold);
+ if (MsgSettingGetBool(MMS_STYLE_FONT_STYLE_BOLD, &pSetting->option.mmsStyleOpt.bFontStyleBold) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MMS_STYLE_FONT_STYLE_ITALIC, &pSetting->option.mmsStyleOpt.bFontStyleItalic);
+ if (MsgSettingGetBool(MMS_STYLE_FONT_STYLE_ITALIC, &pSetting->option.mmsStyleOpt.bFontStyleItalic) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, &pSetting->option.mmsStyleOpt.bFontStyleUnderline);
+ if (MsgSettingGetBool(MMS_STYLE_FONT_STYLE_UNDERLINE, &pSetting->option.mmsStyleOpt.bFontStyleUnderline) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- pSetting->option.mmsStyleOpt.fontColorRed = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_RED);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_RED, (int *)&(pSetting->option.mmsStyleOpt.fontColorRed)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.fontColorGreen = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_GREEN);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_GREEN, (int *)&(pSetting->option.mmsStyleOpt.fontColorGreen)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.fontColorBlue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_BLUE);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_BLUE, (int *)&(pSetting->option.mmsStyleOpt.fontColorBlue)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.fontColorHue = MsgSettingGetInt(MMS_STYLE_FONT_COLOR_HUE);
+ if (MsgSettingGetInt(MMS_STYLE_FONT_COLOR_HUE, (int *)&(pSetting->option.mmsStyleOpt.fontColorHue)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.bgColorRed = MsgSettingGetInt(MMS_STYLE_BG_COLOR_RED);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_RED, (int *)&(pSetting->option.mmsStyleOpt.bgColorRed)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.bgColorGreen = MsgSettingGetInt(MMS_STYLE_BG_COLOR_GREEN);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_GREEN, (int *)&(pSetting->option.mmsStyleOpt.bgColorGreen)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.bgColorBlue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_BLUE);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_BLUE, (int *)&(pSetting->option.mmsStyleOpt.bgColorBlue)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.bgColorHue = MsgSettingGetInt(MMS_STYLE_BG_COLOR_HUE);
+ if (MsgSettingGetInt(MMS_STYLE_BG_COLOR_HUE, (int *)&(pSetting->option.mmsStyleOpt.bgColorHue)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.pageDur = MsgSettingGetInt(MMS_STYLE_PAGE_DUR);
+ if (MsgSettingGetInt(MMS_STYLE_PAGE_DUR, (int *)&(pSetting->option.mmsStyleOpt.pageDur)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.pageCustomDur = MsgSettingGetInt(MMS_STYLE_PAGE_CUSTOM_DUR);
+ if (MsgSettingGetInt(MMS_STYLE_PAGE_CUSTOM_DUR, (int *)&(pSetting->option.mmsStyleOpt.pageCustomDur)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.mmsStyleOpt.pageDurManual = MsgSettingGetInt(MMS_STYLE_PAGE_DUR_MANUAL);
+ if (MsgSettingGetInt(MMS_STYLE_PAGE_DUR_MANUAL, (int *)&(pSetting->option.mmsStyleOpt.pageDurManual)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
}
{
memset(&(pSetting->option.pushMsgOpt), 0x00, sizeof(MSG_PUSHMSG_OPT_S));
- MsgSettingGetBool(PUSH_RECV_OPTION, &pSetting->option.pushMsgOpt.bReceive);
+ if (MsgSettingGetBool(PUSH_RECV_OPTION, &pSetting->option.pushMsgOpt.bReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ int tmpVal;
+ if (MsgSettingGetInt(PUSH_SERVICE_TYPE, &tmpVal) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
- pSetting->option.pushMsgOpt.serviceType = (MSG_PUSH_SERVICE_TYPE_T)MsgSettingGetInt(PUSH_SERVICE_TYPE);
+ pSetting->option.pushMsgOpt.serviceType = (MSG_PUSH_SERVICE_TYPE_T)tmpVal;
}
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_RECEIVE, simIndex);
- MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bReceive);
+ if (MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (simIndex == 0) {
MSG_DEBUG("SIM Index = 0, bReceive is gotten");
#ifndef FEATURE_SMS_CDMA
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_MAX_SIM_COUNT, simIndex);
- pSetting->option.cbMsgOpt.maxSimCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &(pSetting->option.cbMsgOpt.maxSimCnt)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
#endif
err = MsgStoGetCBChannelInfo(dbHandle, &pSetting->option.cbMsgOpt.channelData, simIndex);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, DEF_BUF_LEN, "%s/%d", CB_LANGUAGE, i);
- MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]);
+ if (MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
}
#endif
}
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, simIndex);
- tmpValue = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(pSetting->option.voiceMailOpt.mailNumber, 0x00, sizeof(pSetting->option.voiceMailOpt.mailNumber));
if (tmpValue != NULL) {
strncpy(pSetting->option.voiceMailOpt.mailNumber, tmpValue, MAX_PHONE_NUMBER_LEN);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_ALPHA_ID, simIndex);
- tmpValue = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(pSetting->option.voiceMailOpt.alpahId, 0x00, sizeof(pSetting->option.voiceMailOpt.alpahId));
if (tmpValue != NULL) {
strncpy(pSetting->option.voiceMailOpt.alpahId, tmpValue, MAX_SIM_XDN_ALPHA_ID_LEN);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_COUNT, simIndex);
- pSetting->option.voiceMailOpt.voiceCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &(pSetting->option.voiceMailOpt.voiceCnt)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
}
{
memset(&(pSetting->option.msgSizeOpt), 0x00, sizeof(MSG_MSGSIZE_OPT_S));
- pSetting->option.msgSizeOpt.nMsgSize = MsgSettingGetInt(MSGSIZE_OPTION);
+ if (MsgSettingGetInt(MSGSIZE_OPTION, &(pSetting->option.msgSizeOpt.nMsgSize)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
}
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_SUBS_ID, pMsg->sim_idx);
- char *imsi = MsgSettingGetString(keyName);
+ char *imsi = NULL;
+ if (MsgSettingGetString(keyName, &imsi) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
/* Add Message */
memset(sqlQuery, 0x00, sizeof(sqlQuery));
if (pSendOptInfo != NULL) {
/* Get Global setting value if bSetting == false */
if (pSendOptInfo->bSetting == false) {
- MsgSettingGetBool(MSG_KEEP_COPY, &pSendOptInfo->bKeepCopy);
+ if (MsgSettingGetBool(MSG_KEEP_COPY, &pSendOptInfo->bKeepCopy) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (pMsg->msgType.mainType == MSG_SMS_TYPE) {
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq);
- MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSendOptInfo->option.smsSendOptInfo.bReplyPath);
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSendOptInfo->option.smsSendOptInfo.bReplyPath) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
} else if (pMsg->msgType.mainType == MSG_MMS_TYPE) {
- MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq);
- MsgSettingGetBool(MMS_SEND_READ_REPLY, &pSendOptInfo->option.mmsSendOptInfo.bReadReq);
- pSendOptInfo->option.mmsSendOptInfo.expiryTime.time = (unsigned int)MsgSettingGetInt(MMS_SEND_EXPIRY_TIME);
+ if (MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MMS_SEND_READ_REPLY, &pSendOptInfo->option.mmsSendOptInfo.bReadReq) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ int tmpVal = 0;
+ if (MsgSettingGetInt(MMS_SEND_EXPIRY_TIME, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ pSendOptInfo->option.mmsSendOptInfo.expiryTime.time = (unsigned int)tmpVal;
- MSG_MMS_DELIVERY_TIME_T deliveryTime = (MSG_MMS_DELIVERY_TIME_T)MsgSettingGetInt(MMS_SEND_DELIVERY_TIME);
+ if (MsgSettingGetInt(MMS_SEND_DELIVERY_TIME, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_MMS_DELIVERY_TIME_T deliveryTime = (MSG_MMS_DELIVERY_TIME_T)tmpVal;
if (deliveryTime == MSG_DELIVERY_TIME_CUSTOM) {
pSendOptInfo->option.mmsSendOptInfo.bUseDeliveryCustomTime = true;
- pSendOptInfo->option.mmsSendOptInfo.deliveryTime.time = (unsigned int)MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY);
+ if (MsgSettingGetInt(MMS_SEND_CUSTOM_DELIVERY, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ pSendOptInfo->option.mmsSendOptInfo.deliveryTime.time = (unsigned int)tmpVal;
} else {
pSendOptInfo->option.mmsSendOptInfo.bUseDeliveryCustomTime = false;
pSendOptInfo->option.mmsSendOptInfo.deliveryTime.time = (unsigned int)deliveryTime;
}
- pSendOptInfo->option.mmsSendOptInfo.priority = (msg_priority_type_t)MsgSettingGetInt(MMS_SEND_PRIORITY);
+ if (MsgSettingGetInt(MMS_SEND_PRIORITY, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ pSendOptInfo->option.mmsSendOptInfo.priority = (msg_priority_type_t)tmpVal;
}
}
}
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_SUBS_ID, pMsg->sim_idx);
- char *imsi = MsgSettingGetString(keyName);
+ char *imsi = NULL;
+ if (MsgSettingGetString(keyName, &imsi) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
/* Add Message */
memset(sqlQuery, 0x00, sizeof(sqlQuery));
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_SUBS_ID, sim_idx);
- char *imsi = MsgSettingGetString(keyName);
+ char *imsi = NULL;
+ if (MsgSettingGetString(keyName, &imsi) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MSG_SEC_DEBUG("imsi value exist -> %s", imsi);
msg_error_t err = MSG_SUCCESS;
bool bAutoErase = false;
- MsgSettingGetBool(MSG_AUTO_ERASE, &bAutoErase);
+ if (MsgSettingGetBool(MSG_AUTO_ERASE, &bAutoErase) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (bAutoErase) {
MSG_DEBUG("threadId [%d]", threadId);
MSG_DEBUG("currentSmsCnt [%d], currentMmsCnt [%d]", currentSmsCnt, currentMmsCnt);
if (currentSmsCnt > 0 || currentMmsCnt > 0) {
- limitSmsCnt = MsgSettingGetInt(MSG_SMS_LIMIT);
- limitMmsCnt = MsgSettingGetInt(MSG_MMS_LIMIT);
+ if (MsgSettingGetInt(MSG_SMS_LIMIT, &limitSmsCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+
+ if (MsgSettingGetInt(MSG_MMS_LIMIT, &limitMmsCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (limitSmsCnt < 0 || limitMmsCnt < 0) {
MSG_DEBUG("limitSmsCnt [%d], limitMmsCnt [%d]", limitSmsCnt, limitMmsCnt);
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...");
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 */
msg_error_t MsgSettingSetInt(const char *pKey, int nSetValue);
msg_error_t MsgSettingSetBool(const char *pKey, bool bSetValue);
-char* MsgSettingGetString(const char *pKey);
-int MsgSettingGetInt(const char *pKey);
-int MsgSettingGetBool(const char *pKey, bool *pVal);
+msg_error_t MsgSettingGetString(const char *pKey, char **pVal);
+msg_error_t MsgSettingGetInt(const char *pKey, int *pVal);
+msg_error_t MsgSettingGetBool(const char *pKey, bool *pVal);
msg_error_t MsgSettingHandleNewMsg(int SmsCnt, int MmsCnt);
msg_error_t MsgSettingSetIndicator(int SmsCnt, int MmsCnt);
int MsgSettingGetAutoReject();
bool MsgSettingGetUnknownAutoReject();
-void MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb);
-void MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb);
+msg_error_t MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb);
+msg_error_t MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb);
#endif /* MSG_GCONF_WRAPPER_H */
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
} catch (MsgException& e) {
MSG_FATAL("%s", e.what());
if (e.errorCode() == MsgException::SERVER_READY_ERROR)
+ return MSG_ERR_SERVER_NOT_READY;
+ else if (e.errorCode() == MsgException::SECURITY_ERROR)
return MSG_ERR_PERMISSION_DENIED;
else
return MSG_ERR_CALLBACK_ERROR;
struct tm timeInfo;
time_t RawTime = 0;
time_t nTimeInSecs = 0;
+ int tmpVal = 0;
MMS_HEADER_DATA_S *pHeaderData = pMsgData->header;
if (pSendOptInfo) {
if (pSendOptInfo->bSetting == false) {
unsigned int settingTime;
- priority = (MmsPriority)MsgSettingGetInt(MMS_SEND_PRIORITY);
+ if (MsgSettingGetInt(MMS_SEND_PRIORITY, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ priority = (MmsPriority)tmpVal;
- settingTime = (unsigned int)MsgSettingGetInt(MMS_SEND_EXPIRY_TIME);
+ if (MsgSettingGetInt(MMS_SEND_EXPIRY_TIME, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ settingTime = (unsigned int)tmpVal;
if (settingTime == 0) {
expiryTime.type = MMS_TIMETYPE_NONE;
expiryTime.time = 0;
expiryTime.time = settingTime;
}
- settingTime = (unsigned int)MsgSettingGetInt(MMS_SEND_DELIVERY_TIME);
+ if (MsgSettingGetInt(MMS_SEND_DELIVERY_TIME, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ settingTime = (unsigned int)tmpVal;
if (settingTime == 0) {
deliveryTime.type = MMS_TIMETYPE_NONE;
deliveryTime.time = 0;
deliveryTime.time = (unsigned int)settingTime;
}
- MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &bAskDeliveryReport);
- MsgSettingGetBool(MMS_SEND_READ_REPLY, &bAskReadReply);
+ if (MsgSettingGetBool(MMS_SEND_DELIVERY_REPORT, &bAskDeliveryReport) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MMS_SEND_READ_REPLY, &bAskReadReply) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
} else {
priority = (MmsPriority)pSendOptInfo->option.mmsSendOptInfo.priority;
bAskReadReply = pSendOptInfo->option.mmsSendOptInfo.bReadReq;
}
- msgClass = (MmsMsgClass)MsgSettingGetInt(MMS_SEND_MSG_CLASS);
+ if (MsgSettingGetInt(MMS_SEND_MSG_CLASS, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ msgClass = (MmsMsgClass)tmpVal;
/* set Header */
time(&RawTime);
return handle_list.handle[sim_idx-1];
} else {
int SIM_Status = 0;
- SIM_Status = MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT);
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT, &SIM_Status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (SIM_Status == 1) {
return handle_list.handle[0];
}
- SIM_Status = MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT2);
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT2, &SIM_Status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (SIM_Status == 1) {
return handle_list.handle[1];
}
}
int dnet_state = 0;
- if (msgInfo.sim_idx == 1)
- dnet_state = MsgSettingGetInt(VCONFKEY_DNET_STATE);
- else if (msgInfo.sim_idx == 2)
- dnet_state = MsgSettingGetInt(VCONFKEY_DNET_STATE2);
+ if (msgInfo.sim_idx == 1) {
+ if (MsgSettingGetInt(VCONFKEY_DNET_STATE, &dnet_state) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ } else if (msgInfo.sim_idx == 2) {
+ if (MsgSettingGetInt(VCONFKEY_DNET_STATE2, &dnet_state) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ }
int net_cell_type = 0;
deinitTelHandle();
bool data_enable = FALSE;
- int call_status = MsgSettingGetInt(MSG_MESSAGE_DURING_CALL);
+ int call_status = 0;
+ if (MsgSettingGetInt(MSG_MESSAGE_DURING_CALL, &call_status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
- MsgSettingGetBool(VCONFKEY_3G_ENABLE, &data_enable);
+ if (MsgSettingGetBool(VCONFKEY_3G_ENABLE, &data_enable) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
MSG_INFO("Call[%d], Data[%d], SubType[%d]", call_status, data_enable, msgInfo.msgType.subType);
MSG_INFO("sim_idx[%d], dnet_state[%d], net_cell_type[%d]", msgInfo.sim_idx, dnet_state, net_cell_type);
char szUserAgent[1024 + 1];
char *uagent = NULL;
- uagent = MsgSettingGetString(VCONFKEY_BROWSER_USER_AGENT);
+ if (MsgSettingGetString(VCONFKEY_BROWSER_USER_AGENT, &uagent) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
+
if (uagent && strlen(uagent) > 0) {
MSG_SEC_INFO("Get UserAgent : %s = %s", VCONFKEY_BROWSER_USER_AGENT, uagent);
memset(szUserAgent, 0x00, sizeof(szUserAgent));
break;
case MMS_HH_UA_PROFILE: {
- char *szUAProfile = MsgSettingGetString(MSG_MMS_UA_PROFILE);
+ char *szUAProfile = NULL;
+ if (MsgSettingGetString(MSG_MMS_UA_PROFILE, &szUAProfile) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
snprintf((char *)szHeaderBuffer, 1024, "%s", szUAProfile);
if (szUAProfile) {
#if defined(FEATURE_SMS_CDMA)
case MMS_HH_MDN: {
/*
- char *mdn = MsgSettingGetString(MSG_SIM_MSISDN);
+ char *mdn = NULL;
+ if (MsgSettingGetString(MSG_SIM_MSISDN, &mdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
+
if (mdn != NULL && strlen(mdn) > 0) {
result = true;
snprintf((char *)szHeaderBuffer, 1024, "%s", mdn);
int roamState = 0;
char pPduFilePath[MAX_FULL_PATH_SIZE] = {0};
- roamState = MsgSettingGetInt(VCONFKEY_TELEPHONY_SVC_ROAM);
- MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed);
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SVC_ROAM, &roamState) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetInt() is failed");
+
+ if (MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (checkRejectNotiInd(roamState, bReportAllowed, pPduFilePath)) {
MSG_DEBUG("MMS Message Rejected......");
return true;
}
+ int tmpVal = 0;
if (roamState == VCONFKEY_TELEPHONY_SVC_ROAM_OFF) {
- retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_HOME_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_HOME_NETWORK, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)tmpVal;
MSG_DEBUG("$$$$$$$$$$ MMS_RECV_HOME_NETWORK = %d $$$$$$$$$$$$$", retrieveType);
} else {
- retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)tmpVal;
MSG_DEBUG("$$$$$$$$$$ MMS_RECV_ABROAD_NETWORK = %d $$$$$$$$$$$$$", retrieveType);
if (retrieveType == MSG_ABROAD_RESTRICTED) {
/* Check if current request sim index is different from default network SIM */
/* Convert auto-retrieve to manual retrieve in case sim indexes are different */
int default_sim = 0;
- default_sim = MsgSettingGetInt(MSG_NETWORK_SIM);
+ if (MsgSettingGetInt(MSG_NETWORK_SIM, &default_sim) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
MSG_DEBUG("default_sim = %d, pMsgInfo->sim_idx = %d", default_sim, pMsgInfo->sim_idx);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, pMsgInfo->sim_idx);
- char *msisdn = MsgSettingGetString(keyName);
+ char *msisdn = NULL;
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MmsPluginStorage::instance()->getAddressInfo(pMsgInfo->msgId, &addressinfo);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, pMsgInfo->sim_idx);
- char *msisdn = MsgSettingGetString(keyName);
+ char *msisdn = NULL;
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
char *normal_msisdn = NULL;
if (msisdn)
normal_msisdn = msg_normalize_number(msisdn);
}
char *msisdn = NULL;
- msisdn = MsgSettingGetString(MSG_SIM_MSISDN);
+ if (MsgSettingGetString(MSG_SIM_MSISDN, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (mmsHeader.pFrom)
MmsAddrUtilRemovePlmnString(mmsHeader.pFrom->szAddr);
bool bRejectAnonymous;
bool bRejectAdvertisement;
- MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &bRejectAnonymous);
- MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &bRejectAdvertisement);
+ if (MsgSettingGetBool(MMS_RECV_REJECT_UNKNOWN, &bRejectAnonymous) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &bRejectAdvertisement) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/* Anonymous Reject */
if (bRejectAnonymous &&
}
/* Message Reject - Roaming Case */
+ int tmpVal = 0;
if (roamState == VCONFKEY_TELEPHONY_SVC_ROAM_ON) {
- retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_ABROAD_NETWORK, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)tmpVal;
if (retrieveType == MSG_ABROAD_REJECT) {
MSG_DEBUG("Abroad_Network : Notification Reject... ");
encodeNotifyRespInd(mmsHeader.szTrID, MSG_DELIVERY_REPORT_REJECTED, bReportAllowed, pSendFilePath);
return true;
}
} else {
- retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)MsgSettingGetInt(MMS_RECV_HOME_NETWORK);
+ if (MsgSettingGetInt(MMS_RECV_HOME_NETWORK, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ retrieveType = (MSG_MMS_HOME_RETRIEVE_TYPE_T)tmpVal;
if (retrieveType == MSG_HOME_REJECT) {
MSG_DEBUG("Home_Network : Notification Reject... ");
encodeNotifyRespInd(mmsHeader.szTrID, MSG_DELIVERY_REPORT_REJECTED, bReportAllowed, pSendFilePath);
MSG_DEBUG("MmsPlgUpdRejectStatus : Get MMS Transacation id Failed");
memset(pMsgInfo->msgData, 0, MAX_MSG_DATA_LEN + 1);
- MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed);
+ if (MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
if (MmsPluginInternal::instance()->encodeNotifyRespInd(szTrID, MSG_DELIVERY_REPORT_REJECTED, bReportAllowed, pMsgInfo->msgData)) {
MSG_DEBUG("MmsPlgUpdRejectStatus : Encode Notify Response Success");
pMsgInfo->dataSize = strlen(pMsgInfo->msgData);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, pReqInfo->msgInfo.sim_idx);
- char *msisdn = MsgSettingGetString(keyName);
+ char *msisdn = NULL;
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MSG_DEBUG("pReqInfo->msgInfo.msgType.subType [%d]", pReqInfo->msgInfo.msgType.subType);
break;
}
- MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed);
+ if (MsgSettingGetBool(MMS_SEND_REPORT_ALLOWED, &bReportAllowed) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
MSG_DEBUG("conf received successfully -2");
MSG_DEBUG("reqEntity.eMmsPduType [%d]", reqEntity.eMmsPduType);
if (tel_register_noti_event(pTapiHandle, TAPI_NOTI_SIM_REFRESHED, TapiEventSimRefreshed, NULL) != TAPI_API_SUCCESS)
MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SIM_REFRESHED);
- MsgSettingRegVconfCBCommon(VCONFKEY_DNET_STATE, _dnet_state_changed_cb);
+ msg_error_t err = MSG_SUCCESS;
+ err = MsgSettingRegVconfCBCommon(VCONFKEY_DNET_STATE, _dnet_state_changed_cb);
+ if (err != MSG_SUCCESS) {
+ MSG_DEBUG("MsgSettingRegVconfCBCommon() is failed");
+ }
/* MsgSettingRegVconfCBCommon(VCONFKEY_TELEPHONY_MDN, _TapiMdnChangedCb); */
}
sms_trans_msg.data.p2p_msg.telesvc_msg.data.deliver.num_msg = num_msg;
- char *voiceNumber = MsgSettingGetString(VOICEMAIL_NUMBER);
+ char *voiceNumber = NULL;
+ if (MsgSettingGetString(VOICEMAIL_NUMBER, &voiceNumber) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (voiceNumber) {
snprintf(sms_trans_msg.data.p2p_msg.address.szData, sizeof(sms_trans_msg.data.p2p_msg.address.szData), "%s", voiceNumber);
free(voiceNumber);
void _dnet_state_changed_cb(keynode_t *key, void* data)
{
- int dnet_state = MsgSettingGetInt(VCONFKEY_DNET_STATE);
+ int dnet_state = 0;
+ if (MsgSettingGetInt(VCONFKEY_DNET_STATE, &dnet_state) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (dnet_state > VCONFKEY_DNET_OFF) {
/* Call Event Handler */
if (p_p2p_msg->telesvc_msg.data.deliver.num_msg < 0)
p_p2p_msg->telesvc_msg.data.deliver.num_msg = 0;
- int voice_cnt = MsgSettingGetInt(VOICEMAIL_COUNT);
+ int voice_cnt = 0;
+ if (MsgSettingGetInt(VOICEMAIL_COUNT, &voice_cnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
/* repeated msg check for voicemail */
if (voice_cnt == p_p2p_msg->telesvc_msg.data.deliver.num_msg) {
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, simIndex);
- msisdn = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MSG_SMS_VLD_INFO("%d, SMS Receive, %s->%s, %s", msgInfo.msgId, \
msgInfo.addressList[0].addressVal, \
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, simIndex);
- msisdn = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MSG_SMS_VLD_INFO("%d, SMS Receive, %s->%s, %s", msgInfo.msgId, \
msgInfo.addressList[0].addressVal, \
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_RECEIVE, sim_idx);
- MsgSettingGetBool(keyName, &bReceive);
+ if (MsgSettingGetBool(keyName, &bReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/* Receive CB Msg = FALSE */
if (!bReceive) {
bool bReady = false;
for (int i = 0; i < 100; i++) {
- MsgSettingGetBool(VCONFKEY_TELEPHONY_READY, &bReady);
+ if (MsgSettingGetBool(VCONFKEY_TELEPHONY_READY, &bReady) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
MSG_DEBUG("Get VCONFKEY_TELEPHONY_READY [%d].", bReady ? 1 : 0);
if (bReady)
}
}
- /* Check SIM is present or not */
- /*
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(MSG_SIM_CHANGED);
-
- if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
- MSG_DEBUG("SIM is not present..");
-
- if (pReqInfo->msgInfo.msgPort.valid == false)
- SmsPluginStorage::instance()->updateSentMsg(&(pReqInfo->msgInfo), MSG_NETWORK_SEND_FAIL);
-
- return MSG_ERR_NO_SIM;
- }
- */
-
sms_request_info_s *request = NULL;
request = (sms_request_info_s *)calloc(1, sizeof(sms_request_info_s));
memset(&(pSetting->option.cbMsgOpt), 0x00, sizeof(MSG_CBMSG_OPT_S));
- MsgSettingGetBool(CB_RECEIVE, &pSetting->option.cbMsgOpt.bReceive);
-
- /* pSetting->option.cbMsgOpt.maxSimCnt = MsgSettingGetInt(CB_MAX_SIM_COUNT); */
+ if (MsgSettingGetBool(CB_RECEIVE, &pSetting->option.cbMsgOpt.bReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
err = MsgStoGetCBChannelInfo(&dbHandle, &pSetting->option.cbMsgOpt.channelData);
MSG_DEBUG("MsgStoAddCBChannelInfo : err=[%d]", err);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_LANGUAGE, i);
- MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]);
+ if (MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
}
#endif
}
msg_error_t err = MSG_SUCCESS;
if (pSendOptInfo->bSetting == false) {
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq);
- MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSendOptInfo->option.smsSendOptInfo.bReplyPath);
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSendOptInfo->option.smsSendOptInfo.bReplyPath) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/*
if (pSendOptInfo->bDeliverReq || pSendOptInfo->option.smsSendOptInfo.bReplyPath) {
pSendOptInfo->bSetting = true;
*/
- MsgSettingGetBool(MSG_KEEP_COPY, &pSendOptInfo->bKeepCopy);
+ if (MsgSettingGetBool(MSG_KEEP_COPY, &pSendOptInfo->bKeepCopy) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/* } */
}
if (err == MSG_ERR_MESSAGE_COUNT_FULL) {
bool bAutoErase = false;
- MsgSettingGetBool(MSG_AUTO_ERASE, &bAutoErase);
+ if (MsgSettingGetBool(MSG_AUTO_ERASE, &bAutoErase) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
MSG_DEBUG("bAutoErase: %d", bAutoErase);
msgRef16bit = 0x0000;
msgSeqNum = 0x00;
- msgSubmitId = MsgSettingGetInt(MSG_MESSAGE_ID_COUNTER);
+ if (MsgSettingGetInt(MSG_MESSAGE_ID_COUNTER, (int *)&msgSubmitId) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
}
pSubmit->privacy = SMS_PRIVACY_NOT_RESTRICTED;
/* 7. Set Reply option */
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, (bool *)&(pSubmit->reply_opt.deliver_ack_req));
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, (bool *)&(pSubmit->reply_opt.deliver_ack_req)) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/* 8. Set Alert priority */
pSubmit->alert_priority = SMS_ALERT_MOBILE_DEFAULT;
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, simIndex);
- msisdn = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
/* Tapi Data Structure */
TelSmsDatapackageInfo_t tapi_data_pkg;
/* check Push message receive setting */
bool bPushRecv = false;
- MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv);
+ if (MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if ((bPushRecv == false) && (appCode != SMS_WAP_APPLICATION_MMS_UA)) {
MSG_DEBUG("Push Message Receive option is OFF. Drop Push Message.");
/* check Push message receive setting */
bool bPushRecv = false;
int appcode = 0;
- MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv);
+ if (MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
storageHandler->getnthPushEvent(i, &appcode);
MSG_DEBUG("pushEvt_cnt: %d, appcode: %d", pushEvt_cnt, appcode);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, msgInfo.sim_idx);
- voiceNumber = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &voiceNumber) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_ALPHA_ID, msgInfo.sim_idx);
- voiceAlphaId = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &voiceAlphaId) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(msgInfo.addressList[0].addressVal, 0x00, sizeof(msgInfo.addressList[0].addressVal));
memset(msgInfo.addressList[0].displayName, 0x00, sizeof(msgInfo.addressList[0].displayName));
char *voiceNum = NULL;
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, sim_idx);
- voiceNum = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &voiceNum) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (voiceNum && strlen(voiceNum)) {
MSG_DEBUG("Voice mailbox number exist in vconf");
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_RECEIVE, simIndex);
- MsgSettingGetBool(keyName, &bReceive);
+ if (MsgSettingGetBool(keyName, &bReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
/* Receive CB Msg = FALSE */
if (!bReceive) {
snprintf(keyName, sizeof(keyname), "%s/%d", CB_LANGUAGE, MSG_CBLANG_TYPE_ALL);
bool bAllLang = false;
- MsgSettingGetBool(keyName, &bAllLang);
+ if (MsgSettingGetBool(keyName, &bAllLang) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (!bAllLang) {
MSG_DEBUG("ALL LANGUAGE = FALSE");
bool bLang = false;
- MsgSettingGetBool(keyName, &bLang);
+ if (MsgSettingGetBool(keyName, &bLang) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (!bLang || CbPage.pageHeader.langType == MSG_CBLANG_TYPE_MAX) {
MSG_DEBUG("LANGUAGE [%d] = FALSE", CbPage.pageHeader.langType);
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_TOTAL_COUNT, msg.simIndex);
- int totalCnt = MsgSettingGetInt(keyName);
+ int totalCnt;
+ if (MsgSettingGetInt(keyName, &totalCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (segCnt > totalCnt) {
/* send DeliveryResport as MSG_SUCCESS and return when total sim storage cnt is less than segment cnt. */
return handle_list.handle[sim_idx-1];
} else {
int SIM_Status = 0;
- SIM_Status = MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT);
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT, &SIM_Status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (SIM_Status == 1) {
return handle_list.handle[0];
}
- SIM_Status = MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT2);
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT2, &SIM_Status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (SIM_Status == 1) {
return handle_list.handle[1];
}
int active_count = 0;
int sim_status = VCONFKEY_TELEPHONY_SIM_UNKNOWN;
- sim_status = MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT);
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT, &sim_status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
MSG_DEBUG("sim1 status : %d", sim_status);
if (sim_status == VCONFKEY_TELEPHONY_SIM_INSERTED)
active_count++;
sim_status = VCONFKEY_TELEPHONY_SIM_UNKNOWN;
- sim_status = MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT2);
-
+ if (MsgSettingGetInt(VCONFKEY_TELEPHONY_SIM_SLOT2, &sim_status) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
MSG_DEBUG("sim2 status : %d", sim_status);
if (sim_status == VCONFKEY_TELEPHONY_SIM_INSERTED)
active_count++;
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, msgInfo.sim_idx);
- voiceNumber = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &voiceNumber) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_ALPHA_ID, msgInfo.sim_idx);
- voiceAlphaId = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &voiceAlphaId) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
memset(msgInfo.addressList[0].addressVal, 0x00, sizeof(msgInfo.addressList[0].addressVal));
memset(msgInfo.addressList[0].displayName, 0x00, sizeof(msgInfo.addressList[0].displayName));
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, msgInfo.sim_idx);
- msisdn = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
MSG_SMS_VLD_INFO("%d, SMS Receive, %s->%s, %s", msgInfo.msgId, \
msgInfo.addressList[0].addressVal, \
bool bReady = false;
for (int i = 0; i < 100; i++) {
- MsgSettingGetBool(VCONFKEY_TELEPHONY_READY, &bReady);
+ if (MsgSettingGetBool(VCONFKEY_TELEPHONY_READY, &bReady) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
MSG_DEBUG("Get VCONFKEY_TELEPHONY_READY [%d].", bReady ? 1 : 0);
if (bReady)
/* Check SIM is present or not */
char keyName[MAX_VCONFKEY_NAME_LEN] = {0, };
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 tmpValue = 0;
+ if (MsgSettingGetInt(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)tmpValue;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, pMsgInfo->sim_idx);
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ int tmpValue = 0;
+ if (MsgSettingGetInt(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)tmpValue;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
/* Check SIM is present or not */
char keyName[MAX_VCONFKEY_NAME_LEN] = {0, };
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, sim_idx);
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ int tmpValue = 0;
+ if (MsgSettingGetInt(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)tmpValue;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
/* Check SIM is present or not */
char keyName[MAX_VCONFKEY_NAME_LEN] = {0, };
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, sim_idx);
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ int tmpValue = 0;
+ if (MsgSettingGetInt(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)tmpValue;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, simIndex);
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ int tmpValue = 0;
+ if (MsgSettingGetInt(keyName, &tmpValue) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)tmpValue;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM is not present..");
msg_error_t SmsPlgSetConfigData(const MSG_SETTING_S *pSetting)
{
- /* Check SIM is present or not */
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(MSG_SIM_CHANGED);
-
- if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
- MSG_DEBUG("SIM is not present..");
- return MSG_ERR_NO_SIM;
- }
-
try {
SmsPluginSetting::instance()->setConfigData(pSetting);
} catch (MsgException& e) {
msg_error_t SmsPlgGetConfigData(MSG_SETTING_S *pSetting)
{
- /* Check SIM is present or not */
- MSG_SIM_STATUS_T simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(MSG_SIM_CHANGED);
-
- if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
- MSG_DEBUG("SIM is not present..");
- return MSG_ERR_NO_SIM;
- }
-
try {
SmsPluginSetting::instance()->getConfigData(pSetting);
} catch (MsgException& e) {
MSG_DEBUG("timezone : %d", time_stamp->time.absolute.timeZone);
char displayTime[32];
- struct tm * timeTM;
+ struct tm timeTM;
+ memset(&timeTM, 0x00, sizeof(tm));
struct tm timeinfo;
memset(&timeinfo, 0x00, sizeof(tm));
rawtime -= (time_stamp->time.absolute.timeZone * (3600/4));
- timeTM = localtime(&rawtime);
+ localtime_r(&rawtime, &timeTM);
memset(displayTime, 0x00, sizeof(displayTime));
- strftime(displayTime, 32, "%Y-%02m-%02d %T %z", timeTM);
+ strftime(displayTime, 32, "%Y-%02m-%02d %T %z", &timeTM);
MSG_DEBUG("displayTime [%s]", displayTime);
/* timezone value is tiemzone + daylight. So should not add daylight */
rawtime -= timezone;
#endif
- timeTM = localtime(&rawtime);
+ memset(&timeTM, 0x00, sizeof(tm));
+ localtime_r(&rawtime, &timeTM);
memset(displayTime, 0x00, sizeof(displayTime));
- strftime(displayTime, 32, "%Y-%02m-%02d %T %z", timeTM);
+ strftime(displayTime, 32, "%Y-%02m-%02d %T %z", &timeTM);
MSG_DEBUG("displayTime [%s]", displayTime);
} else {
rawtime = time(NULL);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_RECEIVE, sim_idx);
- MsgSettingGetBool(keyName, &bAPReceive);
+ if (MsgSettingGetBool(keyName, &bAPReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (cbMsgOpt.bReceive == false && bAPReceive == false) {
MSG_DEBUG("CB is off in CP and in AP. No need to send CB request to CP. ");
/*==================== Default Voice mail Setting ====================*/
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_DEFAULT_NUMBER, sim_idx);
- char *num = MsgSettingGetString(keyName);
+ char *num = NULL;
+ if (MsgSettingGetString(keyName, &num) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (num && num[0] != '\0') {
MSG_DEBUG("Voicemail Default Number [%s]", num);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, sim_idx);
- char *voicemail = MsgSettingGetString(keyName);
+ char *voicemail = NULL;
+ if (MsgSettingGetString(keyName, &voicemail) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (!voicemail || voicemail[0] == '\0') {
if (MsgSettingSetString(keyName, "") != MSG_SUCCESS)
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, sim_idx);
- char *voiceNumber = MsgSettingGetString(keyName);
+ char *voiceNumber = NULL;
+ if (MsgSettingGetString(keyName, &voiceNumber) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (!voiceNumber || (voiceNumber && voiceNumber[0] == '\0')) {
MSG_WARN("Voice Number is Empty!!");
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_COUNT, sim_idx);
- if ((mwiCnt = MsgSettingGetInt(keyName)) > 0)
+ if (MsgSettingGetInt(keyName, &mwiCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ if (mwiCnt > 0)
deliverVoiceMsgNoti(sim_idx, mwiCnt);
}
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_RECEIVE, simIndex);
- MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bReceive);
+ if (MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bReceive) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_MAX_SIM_COUNT, simIndex);
- pSetting->option.cbMsgOpt.maxSimCnt = MsgSettingGetInt(keyName);
+ int maxSimCnt = 0;
+ if (MsgSettingGetInt(keyName, &maxSimCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ pSetting->option.cbMsgOpt.maxSimCnt = maxSimCnt;
err = MsgStoGetCBChannelInfo(dbHandle, &pSetting->option.cbMsgOpt.channelData, simIndex);
if (err != MSG_SUCCESS)
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", CB_LANGUAGE, i);
- MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]);
+ if (MsgSettingGetBool(keyName, &pSetting->option.cbMsgOpt.bLanguage[i]) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
}
}
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_CHANGED, i);
- simStatus = (MSG_SIM_STATUS_T)MsgSettingGetInt(keyName);
+ int tmpVal = 0;
+ if (MsgSettingGetInt(keyName, &tmpVal) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ simStatus = (MSG_SIM_STATUS_T)tmpVal;
if (simStatus == MSG_SIM_STATUS_NOT_FOUND) {
MSG_DEBUG("SIM %d is not present..", i);
char *voiceNum = NULL;
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", VOICEMAIL_NUMBER, simIndex);
- voiceNum = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &voiceNum) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
if (voiceNum) {
snprintf(msgInfo.addressList[0].addressVal, sizeof(msgInfo.addressList[0].addressVal), "%s", voiceNum);
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_USED_COUNT, pMsgInfo->sim_idx);
- usedCnt = MsgSettingGetInt(keyName);
-
+ if (MsgSettingGetInt(keyName, &usedCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
usedCnt++;
if (MsgSettingSetInt(keyName, usedCnt) != MSG_SUCCESS)
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_USED_COUNT, sim_idx);
- usedCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &usedCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_TOTAL_COUNT, sim_idx);
- totalCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &totalCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (usedCnt == totalCnt) {
tapiRet = tel_set_sms_memory_status(handle, TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE, NULL, NULL);
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_USED_COUNT, sim_idx);
- usedCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &usedCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_TOTAL_COUNT, sim_idx);
- totalCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &totalCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
MSG_DEBUG("Segment Count [%d]", SegCnt);
MSG_DEBUG("usedCnt [%d], totalCnt [%d]", usedCnt, totalCnt);
pDeliver->dcs.msgClass = SMS_MSG_CLASS_NONE;
pDeliver->dcs.codingGroup = SMS_GROUP_GENERAL;
- /* use encoding type of received message instead of message settings */
- /*pDeliver->dcs.codingScheme = (SMS_CODING_SCHEME_T)MsgSettingGetInt(SMS_SEND_DCS);*/
pDeliver->dcs.codingScheme = pMsgInfo->encodeType;
MSG_DEBUG("DCS : %d", pDeliver->dcs.codingScheme);
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", SIM_USED_COUNT, pMsgInfo->sim_idx);
- usedCnt = MsgSettingGetInt(keyName);
+ if (MsgSettingGetInt(keyName, &usedCnt) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
usedCnt++;
if (MsgSettingSetInt(keyName, usedCnt) != MSG_SUCCESS)
msg_error_t err = MSG_SUCCESS;
if (pSendOptInfo->bSetting == false) {
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq);
- MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSendOptInfo->option.smsSendOptInfo.bReplyPath);
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSendOptInfo->bDeliverReq) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
- MsgSettingGetBool(MSG_KEEP_COPY, &pSendOptInfo->bKeepCopy);
+ if (MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSendOptInfo->option.smsSendOptInfo.bReplyPath) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(MSG_KEEP_COPY, &pSendOptInfo->bKeepCopy) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
}
MsgDbHandler *dbHandle = getDbHandle();
if (err == MSG_ERR_MESSAGE_COUNT_FULL) {
bool bAutoErase = false;
- MsgSettingGetBool(MSG_AUTO_ERASE, &bAutoErase);
+ if (MsgSettingGetBool(MSG_AUTO_ERASE, &bAutoErase) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
MSG_DEBUG("bAutoErase: %d", bAutoErase);
char keyName[MAX_VCONFKEY_NAME_LEN];
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_MSISDN, pReqInfo->msgInfo.sim_idx);
- msisdn = MsgSettingGetString(keyName);
+ if (MsgSettingGetString(keyName, &msisdn) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
for (int i = 0; i < pReqInfo->msgInfo.nAddressCnt; i++) {
/* Make SMS_SUBMIT_DATA_S from MSG_REQUEST_INFO_S */
pSubmit->bRejectDup = false;
pSubmit->bHeaderInd = false;
- MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSubmit->bStatusReport);
- MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSubmit->bReplyPath);
+ if (MsgSettingGetBool(SMS_SEND_DELIVERY_REPORT, &pSubmit->bStatusReport) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
+ if (MsgSettingGetBool(SMS_SEND_REPLY_PATH, &pSubmit->bReplyPath) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
pSubmit->msgRef = msgRef++;
pSubmit->dcs.msgClass = SMS_MSG_CLASS_NONE;
pSubmit->dcs.codingGroup = SMS_GROUP_GENERAL;
- pSubmit->dcs.codingScheme = (SMS_CODING_SCHEME_T)MsgSettingGetInt(SMS_SEND_DCS);
-
+ int codingScheme = 0;
+ if (MsgSettingGetInt(SMS_SEND_DCS, &codingScheme) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
+ pSubmit->dcs.codingScheme = (SMS_CODING_SCHEME_T)codingScheme;
MSG_DEBUG("DCS : %d", pSubmit->dcs.codingScheme);
MSG_SMSC_LIST_S smscList = {0, };
/** check Push message receive setting */
bool bPushRecv = false;
- MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv);
+ if (MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if ((bPushRecv == false) && (appCode != SMS_WAP_APPLICATION_MMS_UA)) {
MSG_DEBUG("Push Message Receive option is OFF. Drop Push Message.");
/* check Push message receive setting */
bool bPushRecv = false;
int appcode = 0;
- MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv);
+ if (MsgSettingGetBool(PUSH_RECV_OPTION, &bPushRecv) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
storageHandler->getnthPushEvent(i, &appcode);
MSG_DEBUG("pushEvt_cnt: %d, appcode: %d", pushEvt_cnt, appcode);
MsgProxyListener::instance()->insertOpenHandleSet(this);
/* server is currently booting and service is not available until the end of booting */
- MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady);
+ if (MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
if (bReady == false) {
THROW(MsgException::SERVER_READY_ERROR, "Msg Server is not ready !!!!!");
bool bReady = false;
MSG_DEBUG("Message Service Running State Changed");
/* server is currently booting and service is not available until the end of booting */
- MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady);
+ if (MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
+
MSG_INFO("Message Service Running State Changed bReady:(%d)", bReady);
/* bReady false indicates that server has restarted. Hence the proxylistener needs to be reset */
{
clearProxyCBLists();
clearOpenHandleSet();
- MsgSettingRegVconfCBCommon(VCONFKEY_MSG_SERVER_READY, MsgServerRestartCb);
+
+ msg_error_t err = MSG_SUCCESS;
+ err = MsgSettingRegVconfCBCommon(VCONFKEY_MSG_SERVER_READY, MsgServerRestartCb);
+ if (err != MSG_SUCCESS) {
+ if (err == MSG_ERR_PERMISSION_DENIED) {
+ THROW(MsgException::SECURITY_ERROR, "It must have privilege to access vconf key");
+ } else {
+ THROW(MsgException::SERVER_READY_ERROR, "vconf register fail");
+ }
+ }
channel = NULL;
eventSourceId = 0;
{
clearProxyCBLists();
clearOpenHandleSet();
- MsgSettingRemoveVconfCBCommon(VCONFKEY_MSG_SERVER_READY, MsgServerRestartCb);
+
+ msg_error_t err = MSG_SUCCESS;
+ err = MsgSettingRemoveVconfCBCommon(VCONFKEY_MSG_SERVER_READY, MsgServerRestartCb);
+ if (err != MSG_SUCCESS) {
+ if (err == MSG_ERR_PERMISSION_DENIED) {
+ MSG_DEBUG("It must have privilege to access vconf key");
+ } else {
+ MSG_DEBUG("vconf register fail");
+ }
+ }
}
msg_error_t MsgInitContactSvc()
{
#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
- phonenumberMinMatchDigit = MsgSettingGetInt(PHONENUMBER_MIN_MATCH_DIGIT);
+ if (MsgSettingGetInt(PHONENUMBER_MIN_MATCH_DIGIT, &phonenumberMinMatchDigit) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
MSG_DEBUG("phonenumberMinMatchDigit [%d]", phonenumberMinMatchDigit);
if (phonenumberMinMatchDigit < 1) {
bool isBlockModeOn = false;
bool isblock = true;
- MsgSettingGetBool(VCONFKEY_SETAPPL_BLOCKINGMODE_NOTIFICATIONS, &isBlockModeOn);
+ if (MsgSettingGetBool(VCONFKEY_SETAPPL_BLOCKINGMODE_NOTIFICATIONS, &isBlockModeOn) != MSG_SUCCESS)
+ MSG_INFO("MsgSettingGetBool() is failed");
int blockModeType = -1;
- blockModeType = MsgSettingGetInt(VCONFKEY_SETAPPL_BLOCKINGMODE_ALLOWED_CONTACT_TYPE);
+ if (MsgSettingGetInt(VCONFKEY_SETAPPL_BLOCKINGMODE_ALLOWED_CONTACT_TYPE, &blockModeType) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetInt() is failed");
+ }
if (!isBlockModeOn)
isblock = false;
break;
}
case 3: { /* For Custom allow in blocking mode. */
- char *allowList = MsgSettingGetString(VCONFKEY_SETAPPL_BLOCKINGMODE_ALLOWED_CONTACT_LIST);
+ char *allowList = NULL;
+ if (MsgSettingGetString(VCONFKEY_SETAPPL_BLOCKINGMODE_ALLOWED_CONTACT_LIST, &allowList) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
char *temp = NULL;
char *personIdStr = strtok_r(allowList, " ,", &temp);
while (personIdStr != NULL) {
#include "MsgGconfWrapper.h"
#include "MsgException.h"
-#ifdef USE_GCONF
-
-#define GCONF_SUCCESS 1
-
-MSG_GOBJECT_CLIENT_S* pClient = NULL;
-
-#endif
-
int autoReject = 0;
bool bUnknownAutoReject = false;
return MSG_ERR_NULL_POINTER;
}
-#ifdef USE_GCONF
- if (gconf_client_set_string((GConfClient*)pClient, pKey, pSetValue, NULL) != GCONF_SUCCESS)
- return MSG_ERR_SET_SETTING;
-#else
- if (vconf_set_str(pKey, pSetValue) != 0)
+ if (vconf_set_str(pKey, pSetValue) != 0) {
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to vconf_set_str with [%s], err=[%d]", pKey, vconf_err);
return MSG_ERR_SET_SETTING;
-#endif
+ }
return MSG_SUCCESS;
}
return MSG_ERR_NULL_POINTER;
}
-#ifdef USE_GCONF
- if (gconf_client_set_int((GConfClient*)pClient, pKey, nSetValue, NULL) != GCONF_SUCCESS)
+ if (vconf_set_int(pKey, nSetValue) != 0) {
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to vconf_set_int with [%s], err=[%d]", pKey, vconf_err);
return MSG_ERR_SET_SETTING;
-#else
- if (vconf_set_int(pKey, nSetValue) != 0)
- return MSG_ERR_SET_SETTING;
-#endif
+ }
return MSG_SUCCESS;
}
return MSG_ERR_NULL_POINTER;
}
-#ifdef USE_GCONF
- if (gconf_client_set_bool((GConfClient*)pClient, pKey, bSetValue, NULL) != GCONF_SUCCESS)
- return MSG_ERR_SET_SETTING;
-#else
- if (vconf_set_bool(pKey, bSetValue) != 0)
+ if (vconf_set_bool(pKey, bSetValue) != 0) {
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to vconf_set_bool with [%s], err=[%d]", pKey, vconf_err);
return MSG_ERR_SET_SETTING;
-#endif
+ }
return MSG_SUCCESS;
}
-char* MsgSettingGetString(const char *pKey)
+msg_error_t MsgSettingGetString(const char *pKey, char **pVal)
{
if (pKey == NULL) {
MSG_DEBUG("IN Parameter is NULL");
- return NULL;
+ return MSG_ERR_NULL_POINTER;
}
-#ifdef USE_GCONF
- return gconf_client_get_string((GConfClient*)pClient, pKey, NULL);
-#else
- return vconf_get_str(pKey);
-#endif
+ msg_error_t retVal = MSG_SUCCESS;
+ char *param = NULL;
+
+ param = vconf_get_str(pKey);
+ if (param == NULL) {
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to vconf_get_str with [%s], err=[%d]", pKey, vconf_err);
+ if (vconf_err == VCONF_ERROR_FILE_PERM)
+ retVal = MSG_ERR_PERMISSION_DENIED;
+ else
+ retVal = MSG_ERR_UNKNOWN;
+ }
+
+ *pVal = param;
+
+ return retVal;
}
-int MsgSettingGetInt(const char *pKey)
+msg_error_t MsgSettingGetInt(const char *pKey, int *pVal)
{
if (pKey == NULL) {
MSG_DEBUG("IN Parameter is NULL");
return -1;
}
- int retVal = 0;
+ msg_error_t retVal = MSG_SUCCESS;
+ int param = 0;
-#ifdef USE_GCONF
- retVal = gconf_client_get_int((GConfClient*)pClient, pKey, NULL);
-#else
- if (vconf_get_int(pKey, &retVal) < 0)
- return -1;
-#endif
+ if (vconf_get_int(pKey, ¶m) < 0) {
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to vconf_get_int with [%s], err=[%d]", pKey, vconf_err);
+ if (vconf_err == VCONF_ERROR_FILE_PERM)
+ retVal = MSG_ERR_PERMISSION_DENIED;
+ else
+ retVal = MSG_ERR_UNKNOWN;
+ }
+
+ *pVal = (int)param;
return retVal;
}
-int MsgSettingGetBool(const char *pKey, bool *pVal)
+msg_error_t MsgSettingGetBool(const char *pKey, bool *pVal)
{
if (pKey == NULL) {
MSG_DEBUG("IN Parameter is NULL");
return -1;
}
- int retVal = 0, param = 0;
+ msg_error_t retVal = MSG_SUCCESS;
+ int param = 0;
-#ifdef USE_GCONF
- *pVal = gconf_client_get_bool((GConfClient*)pClient, pKey, NULL);
-#else
- if (vconf_get_bool(pKey, ¶m) < 0)
- return -1;
-#endif
+ if (vconf_get_bool(pKey, ¶m) < 0) {
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to vconf_get_bool with [%s], err=[%d]", pKey, vconf_err);
+ if (vconf_err == VCONF_ERROR_FILE_PERM)
+ retVal = MSG_ERR_PERMISSION_DENIED;
+ else
+ retVal = MSG_ERR_UNKNOWN;
+ }
- *pVal = (bool)param;
+ *pVal = (bool)param;
return retVal;
}
return bUnknownAutoReject;
}
-void MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb)
+msg_error_t MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb)
{
+ msg_error_t err = MSG_SUCCESS;
+
if (vconf_notify_key_changed(pKey, pCb, NULL) < 0) {
- MSG_DEBUG("Fail to regist vconf CB with [%s]", pKey);
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to regist vconf CB with [%s], err=[%d]", pKey, vconf_err);
+ if (vconf_err == VCONF_ERROR_FILE_PERM)
+ err = MSG_ERR_PERMISSION_DENIED;
+ else
+ err = MSG_ERR_UNKNOWN;
} else {
MSG_DEBUG("Success to regist vconf CB with [%s]", pKey);
}
+
+ return err;
}
-void MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb)
+msg_error_t MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb)
{
+ msg_error_t err = MSG_SUCCESS;
+
if (vconf_ignore_key_changed(pKey, pCb) < 0) {
- MSG_DEBUG("Fail to remove vconf CB with [%s]", pKey);
+ int vconf_err = vconf_get_ext_errno();
+ MSG_DEBUG("Fail to remove vconf CB with [%s], err=[%d]", pKey, vconf_err);
+ if (vconf_err == VCONF_ERROR_FILE_PERM)
+ err = MSG_ERR_PERMISSION_DENIED;
+ else
+ err = MSG_ERR_UNKNOWN;
} else {
MSG_DEBUG("Success to remove vconf CB with [%s]", pKey);
}
+
+ return err;
}
acl = acl_from_text(priv_read);
if (!acl) {
- MSG_ERR("%s: `%s': %s\n", MSG_IPC_DATA_PATH, priv_read, strerror(errno));
+ MSG_ERR("%s: `%s': %s\n", MSG_IPC_DATA_PATH, priv_read, g_strerror(errno));
return false;
}
ret = acl_set_file((const char *)MSG_IPC_DATA_PATH, ACL_TYPE_ACCESS, acl);
if (ret != 0) {
- MSG_ERR("acl_set_file Fail : [%d][%s]", ret, strerror(errno));
+ MSG_ERR("acl_set_file Fail : [%d][%s]", ret, g_strerror(errno));
}
acl_free(acl);
memset(keyName, 0x00, sizeof(keyName));
snprintf(keyName, sizeof(keyName), "%s/%d", MSG_SIM_SUBS_ID, pMsgInfo->sim_idx);
- char *imsi = MsgSettingGetString(keyName);
+ char *imsi = NULL;
+ if (MsgSettingGetString(keyName, &imsi) != MSG_SUCCESS) {
+ MSG_INFO("MsgSettingGetString() is failed");
+ }
/* Add Message */
char sqlQuery[MAX_QUERY_LEN+1];