Actually de-queue and free reminders that expire out of the queue.

This commit is contained in:
Dianne Skoll
2024-03-16 13:29:59 -04:00
parent 96551ccaa4
commit d5a86f3e4f

View File

@@ -490,20 +490,17 @@ void HandleQueuedReminders(void)
/* Calculate the next trigger time */
q->tt.nexttime = CalculateNextTime(q);
/* If it's dequeued, update num_queued */
if (q->tt.nexttime != NO_TIME) {
/* If trigger time is way in the past because computer has been
suspended or hibernated, remove from queue */
if (q->tt.ttime < MinutesPastMidnight(1) - MaxLateMinutes &&
q->tt.nexttime < MinutesPastMidnight(1) - MaxLateMinutes) {
q->tt.nexttime = NO_TIME;
del_reminder((unsigned long) q);
if (IsServerMode()) {
print_num_queued();
}
}
}
/* If we have dequeued a reminder, update controlling process */
if (q->tt.nexttime == NO_TIME && IsServerMode()) {
print_num_queued();
}
}
exit(EXIT_SUCCESS);
}