#include "MsgTransManager.h"
#include "MsgStorageTypes.h"
#include "MsgSoundPlayer.h"
+#include "MsgCmdHandler.h"
+#include "MsgUtilStorage.h"
+#include "MsgNotificationWrapper.h"
#include <errno.h>
#include <glib.h>
}
}
- chmod( MSG_IPC_DATA_PATH, S_IRWXU | S_IRWXG ); //public shared file: pass data by file
+ if(chmod( MSG_IPC_DATA_PATH, S_IRWXU | S_IRWXG ) !=0) { //public shared file: pass data by file
+ MSG_DEBUG("Fail to chmod [%s].", MSG_IPC_DATA_PATH);
+ }
chown( MSG_IPC_DATA_PATH, 0, 6502 );
return MSG_SUCCESS;
{
MSG_DEBUG("Assign Default Msg");
msgText = strdup(MSG_MOBILE_TRACKER_MSG);
+ if (msgText == NULL) {
+ MSG_DEBUG("msgText is NULL.");
+ return;
+ }
}
MSG_DEBUG("mobile tracker msg : [%s]", msgText);
if (orgRecipientList == NULL)
{
MSG_DEBUG("recipient list is NULL");
+ free(msgText);
+ msgText = NULL;
return;
}
void* StartMsgServer(void*)
{
+
+ MsgOpenContactSvc();
+
try
{
MsgTransactionManager::instance()->run();
if (g_main_loop_is_running(mainloop))
g_main_loop_quit(mainloop);
+ MsgCloseContactSvc();
+
return (void*)0;
}
// Register Callback to get the change of contact
MsgInitContactSvc(&MsgContactChangedCallback);
+ MsgCleanAndResetNoti();
MsgSoundInitRepeatAlarm();
return (void*)0;