Skip to content

Commit

Permalink
marked the schedule with dead before the function is called.
Browse files Browse the repository at this point in the history
  • Loading branch information
sakane committed Oct 8, 2001
1 parent 536c62f commit 0580c81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kame/kame/racoon/schedule.c
@@ -1,4 +1,4 @@
/* $KAME: schedule.c,v 1.16 2001/10/02 01:59:40 sakane Exp $ */
/* $KAME: schedule.c,v 1.17 2001/10/08 23:42:35 sakane Exp $ */

/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Expand Down Expand Up @@ -78,14 +78,18 @@ schedular()
now = current_time();

for (p = TAILQ_FIRST(&sctree); p; p = next) {
/* if the entry has been daed, remove it */
if (p->dead)
goto next_schedule;

/* if the time hasn't come, proceed to the next entry */
if (now < p->xtime) {
next = TAILQ_NEXT(p, chain);
continue;
}

/* mark it with dead. and call the function. */
p->dead = 1;
if (p->func != NULL)
(p->func)(p->param);

Expand Down

0 comments on commit 0580c81

Please sign in to comment.