Fix msg alert repetition
authorSangkoo Kim <sangkoo.kim@samsung.com>
Fri, 24 Aug 2012 05:38:10 +0000 (14:38 +0900)
committerSangkoo Kim <sangkoo.kim@samsung.com>
Fri, 24 Aug 2012 05:38:10 +0000 (14:38 +0900)
framework/main.cpp
utils/MsgSoundPlayer.cpp

index 48fe01a..943a7e6 100755 (executable)
@@ -30,6 +30,7 @@
 #include "MsgDeliverHandler.h"
 #include "MsgTransManager.h"
 #include "MsgStorageTypes.h"
+#include "MsgSoundPlayer.h"
 
 #include <errno.h>
 #include <glib.h>
@@ -355,6 +356,7 @@ void* InitMsgServer(void*)
        // Register Callback to get the change of contact
        MsgInitContactSvc(&MsgContactChangedCallback);
 
+       MsgSoundPlayStart();
        return (void*)0;
 }
 
index 1218096..2225961 100755 (executable)
@@ -52,8 +52,12 @@ void MsgSoundPlayStart()
        if (childpid == 0)
        {
                MSG_DEBUG("Child Process - Run helper app for Sound");
+               int nRepeatValue = 0;
 
-               execl("/usr/bin/msg-helper", MSG_SOUND_START, NULL);
+               nRepeatValue = MsgSettingGetInt(MSG_ALERT_TONE);
+
+               if(nRepeatValue != MSG_ALERT_TONE_ONCE)
+                       execl("/usr/bin/msg-helper", MSG_SOUND_START, NULL);
 
                MSG_DEBUG("Faild to run helper app for Sound");