support for unpurgable events

This commit is contained in:
Bob Halley
1999-06-09 23:25:50 +00:00
parent 5d02c5ee4c
commit 3f8744a28f
2 changed files with 9 additions and 4 deletions

View File

@@ -186,7 +186,8 @@ isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
*
* Notes:
* Events whose sender is 'sender', and whose type is >= first and
* <= last will be purged. A sender of NULL will match any sender.
* <= last will be purged, unless they are marked as unpurgable.
* A sender of NULL will match any sender.
*
* Requires:
*
@@ -206,7 +207,8 @@ isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type);
*
* Notes:
* Events whose sender is 'sender', and whose type is 'type'
* will be purged. A sender of NULL will match any sender.
* will be purged, unless they are marked as unpurgable.
* A sender of NULL will match any sender.
*
* This function is equivalent to
*

View File

@@ -346,7 +346,8 @@ isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
/*
* Events matching 'sender' and whose type is >= first and
* <= last will be purged. sender == NULL means "any sender".
* <= last will be purged, unless they are marked as unpurgable.
* sender == NULL means "any sender".
*
* Purging never changes the state of the task.
*/
@@ -360,7 +361,9 @@ isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
event = next_event) {
next_event = NEXT(event, link);
if ((sender == NULL || event->sender == sender) &&
event->type >= first && event->type <= last) {
event->type >= first &&
event->type <= last &&
(event->attributes & ISC_EVENTATTR_NOPURGE) == 0) {
DEQUEUE(task->events, event, link);
ENQUEUE(purgeable, event, link);
}