Skip to content
Snippets Groups Projects
Commit aea0644a authored by Rahul Sinha's avatar Rahul Sinha
Browse files

Bug Fix: Updating changes as in Revision 16674...

Bug Fix: Updating changes as in Revision 16674 trunk/icon-dev/externals/mtime/src/mtime_eventHandling.c
parent 60dd7aa0
No related branches found
No related tags found
No related merge requests found
......@@ -555,10 +555,12 @@ isTriggerTimeInRange(struct _datetime* current_dt, struct _datetime* triggerNext
struct _datetime *dt_upperbound = newDateTime(initDummyDTString);
struct _datetime *dt_lowerbound = newDateTime(initDummyDTString);
allowedMinusdelta->sign = '-'; /* Change sign to obtain substraction. */
struct _timedelta* allowedMinusdelta_local = constructAndCopyTimeDelta(allowedMinusdelta);
allowedMinusdelta_local->sign = '-'; /* Change sign to obtain substraction. */
upper_val_flag = compareDatetime(current_dt,addTimeDeltaToDateTime(triggerNextEventDateTime,allowedPlusdelta,dt_upperbound));
lower_val_flag = compareDatetime(current_dt,addTimeDeltaToDateTime(triggerNextEventDateTime,allowedMinusdelta,dt_lowerbound));
lower_val_flag = compareDatetime(current_dt,addTimeDeltaToDateTime(triggerNextEventDateTime,allowedMinusdelta_local,dt_lowerbound));
if (
(upper_val_flag == less_than || upper_val_flag == equal_to)
......@@ -580,6 +582,7 @@ isTriggerTimeInRange(struct _datetime* current_dt, struct _datetime* triggerNext
//Cleaup.
deallocateDateTime(dt_upperbound);
deallocateDateTime(dt_lowerbound);
deallocateTimeDelta(allowedMinusdelta_local);
}
else /* If slack is malformed (negative sign is not permitted), return as normal (follow exact match for equal). */
{
......@@ -667,7 +670,7 @@ isCurrentEventActive(struct _event* event, struct _datetime* current_dt, struct
/* Check if trigger time is now. */
if(isTriggerTimeInRange(current_dt, event->triggerNextEventDateTime, plus_slack_local, minus_slack_local) == equal_to)
if( !(event->triggerCurrentEvent) && isTriggerTimeInRange(current_dt, event->triggerNextEventDateTime, plus_slack_local, minus_slack_local) == equal_to)
{
/* If current Datetime is equal to next trigger datetime, Event is active. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment