From dabd1408df7d8fad62e284605de0bff9bf58bb81 Mon Sep 17 00:00:00 2001 From: david_kim31 Date: Thu, 4 Apr 2013 00:09:49 +0900 Subject: [PATCH] Fix alarm setting on the listener Change-Id: I9b1a2f1e24dee8f40663a345f05f726ead270c99 Signed-off-by: david_kim31 --- src/system/FSys_AlarmManager.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/system/FSys_AlarmManager.cpp b/src/system/FSys_AlarmManager.cpp index 5143ac8..bcc561e 100644 --- a/src/system/FSys_AlarmManager.cpp +++ b/src/system/FSys_AlarmManager.cpp @@ -449,6 +449,12 @@ _AlarmManager::OnAlarmExpired(int alarmId) SysLog(NID_SYS, "Alarm expire event is delivered. alarm id is %d", alarmId); + _AlarmImpl* pAlarmImpl = (_AlarmImpl*)__alarmList.GetValue(reservedAlarmId); + if(pAlarmImpl == null) + { + SysLog(NID_SYS, "pAlarmImpl of reserved alarm[%d] is not found.", alarmId); + } + if(pValueEnum != null) { String alarmAppId; @@ -485,12 +491,14 @@ _AlarmManager::OnAlarmExpired(int alarmId) SysLog(NID_SYS, "Next time is greater than end time."); RemoveAlarmList(alarmId); pValueEnum->Reset(); + pAlarmImpl->__alarmId.value = 0; } } } else if (pPeriod->ToInt() == 0) { RemoveAlarmList(alarmId); + pAlarmImpl->__alarmId.value = 0; } else { @@ -498,21 +506,14 @@ _AlarmManager::OnAlarmExpired(int alarmId) } } - _AlarmImpl* pAlarmImpl = (_AlarmImpl*)__alarmList.GetValue(reservedAlarmId); if(pAlarmImpl != null) { - SysLog(NID_SYS, "Reserved Alarm[%d] is found.", alarmId); pAlarmImpl->OnAlarmExpired(alarmId); } - else - { - SysLog(NID_SYS, "pAlarmImpl of reserved alarm[%d] is not found.", alarmId); - } if(__pAlarmHashMap->ContainsKey(reservedAlarmId) == false) { SysLog(NID_SYS, "Remove an alarm list[%d].", reservedAlarmId.value); - pAlarmImpl->__alarmId.value = 0; r = __alarmList.Remove(reservedAlarmId); SetLastResult(r); } -- 2.7.4