From 71c4358441a8a5046d9f0316fe4efe496f989625 Mon Sep 17 00:00:00 2001 From: Sangkoo Kim Date: Fri, 24 Aug 2012 14:38:10 +0900 Subject: [PATCH] Fix msg alert repetition --- framework/main.cpp | 2 ++ utils/MsgSoundPlayer.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/main.cpp b/framework/main.cpp index 48fe01a..943a7e6 100755 --- a/framework/main.cpp +++ b/framework/main.cpp @@ -30,6 +30,7 @@ #include "MsgDeliverHandler.h" #include "MsgTransManager.h" #include "MsgStorageTypes.h" +#include "MsgSoundPlayer.h" #include #include @@ -355,6 +356,7 @@ void* InitMsgServer(void*) // Register Callback to get the change of contact MsgInitContactSvc(&MsgContactChangedCallback); + MsgSoundPlayStart(); return (void*)0; } diff --git a/utils/MsgSoundPlayer.cpp b/utils/MsgSoundPlayer.cpp index 1218096..2225961 100755 --- a/utils/MsgSoundPlayer.cpp +++ b/utils/MsgSoundPlayer.cpp @@ -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"); -- 2.34.1