result
Alarm::Set(const DateTime& startTime, int period, const DateTime* pEndTime)
{
- result r = E_SUCCESS;
- r = _AccessController::CheckUserPrivilege(_PRV_ALARM);
- SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
+ result r = E_SUCCESS;
+ r = _AccessController::CheckUserPrivilege(_PRV_ALARM);
+ SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
SysAssertf(__pAlarmImpl != null, "Not yet constructed. Construct() should be called before use.");
if(pEndTime != null)
if(r != E_SUCCESS && r != E_INVALID_ARG)
{
- SysLog(NID_SYS, "It is failed to register alarm. [%s]", GetErrorMessage(r));
+ SysLog(NID_SYS, "It is failed to cancel alarm. [%s]", GetErrorMessage(r));
r = E_SYSTEM;
}
+
+ __alarmId.value = 0;
+
return r;
}
{
__pEvent->Fire(*pAlarmEventArg);
}
+
+ __alarmId.value = 0;
+
SysLog(NID_SYS, "Alarm Expired for alarm id: %d and listener called.", alarmId);
}
else