1996-09-05 23:55:39 +00:00
|
|
|
/* dispatch.c
|
1996-04-11 06:44:12 +00:00
|
|
|
|
1996-09-05 23:55:39 +00:00
|
|
|
Network input dispatcher... */
|
1996-04-11 06:44:12 +00:00
|
|
|
|
|
|
|
/*
|
2022-01-25 16:24:16 +01:00
|
|
|
* Copyright (C) 2004-2022 Internet Systems Consortium, Inc. ("ISC")
|
2005-03-17 20:15:29 +00:00
|
|
|
* Copyright (c) 1995-2003 by Internet Software Consortium
|
1996-04-11 06:44:12 +00:00
|
|
|
*
|
2017-07-12 09:23:23 -04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
1996-04-11 06:44:12 +00:00
|
|
|
*
|
2005-03-17 20:15:29 +00:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
|
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
1996-04-11 06:44:12 +00:00
|
|
|
*
|
2005-03-17 20:15:29 +00:00
|
|
|
* Internet Systems Consortium, Inc.
|
2022-01-19 20:13:19 +01:00
|
|
|
* PO Box 360
|
|
|
|
* Newmarket, NH 03857 USA
|
2005-03-17 20:15:29 +00:00
|
|
|
* <info@isc.org>
|
2009-07-23 18:52:21 +00:00
|
|
|
* https://www.isc.org/
|
2000-03-17 04:00:32 +00:00
|
|
|
*
|
1996-04-11 06:44:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "dhcpd.h"
|
|
|
|
|
2009-10-29 00:46:48 +00:00
|
|
|
#include <sys/time.h>
|
|
|
|
|
1997-02-18 14:33:43 +00:00
|
|
|
struct timeout *timeouts;
|
|
|
|
static struct timeout *free_timeouts;
|
1996-04-11 06:44:12 +00:00
|
|
|
|
2006-02-24 23:16:32 +00:00
|
|
|
void set_time(TIME t)
|
2001-02-12 19:41:30 +00:00
|
|
|
{
|
|
|
|
/* Do any outstanding timeouts. */
|
2008-01-03 00:30:14 +00:00
|
|
|
if (cur_tv . tv_sec != t) {
|
|
|
|
cur_tv . tv_sec = t;
|
|
|
|
cur_tv . tv_usec = 0;
|
2001-02-12 19:41:30 +00:00
|
|
|
process_outstanding_timeouts ((struct timeval *)0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct timeval *process_outstanding_timeouts (struct timeval *tvp)
|
|
|
|
{
|
|
|
|
/* Call any expired timeouts, and then if there's
|
|
|
|
still a timeout registered, time out the select
|
|
|
|
call then. */
|
|
|
|
another:
|
|
|
|
if (timeouts) {
|
|
|
|
struct timeout *t;
|
2008-01-03 00:30:14 +00:00
|
|
|
if ((timeouts -> when . tv_sec < cur_tv . tv_sec) ||
|
|
|
|
((timeouts -> when . tv_sec == cur_tv . tv_sec) &&
|
|
|
|
(timeouts -> when . tv_usec <= cur_tv . tv_usec))) {
|
2001-02-12 19:41:30 +00:00
|
|
|
t = timeouts;
|
|
|
|
timeouts = timeouts -> next;
|
|
|
|
(*(t -> func)) (t -> what);
|
|
|
|
if (t -> unref)
|
|
|
|
(*t -> unref) (&t -> what, MDL);
|
|
|
|
t -> next = free_timeouts;
|
|
|
|
free_timeouts = t;
|
|
|
|
goto another;
|
|
|
|
}
|
|
|
|
if (tvp) {
|
2008-01-03 00:30:14 +00:00
|
|
|
tvp -> tv_sec = timeouts -> when . tv_sec;
|
|
|
|
tvp -> tv_usec = timeouts -> when . tv_usec;
|
2001-02-12 19:41:30 +00:00
|
|
|
}
|
|
|
|
return tvp;
|
|
|
|
} else
|
|
|
|
return (struct timeval *)0;
|
|
|
|
}
|
|
|
|
|
1996-04-11 06:44:12 +00:00
|
|
|
/* Wait for packets to come in using select(). When one does, call
|
|
|
|
receive_packet to receive the packet and possibly strip hardware
|
1999-02-14 18:46:20 +00:00
|
|
|
addressing information from it, and then call through the
|
|
|
|
bootp_packet_handler hook to try to do something with it. */
|
1996-04-11 06:44:12 +00:00
|
|
|
|
2009-10-28 04:12:30 +00:00
|
|
|
/*
|
|
|
|
* Use the DHCP timeout list as a place to store DHCP specific
|
|
|
|
* information, but use the ISC timer system to actually dispatch
|
|
|
|
* the events.
|
|
|
|
*
|
|
|
|
* There are several things that the DHCP timer code does that the
|
|
|
|
* ISC code doesn't:
|
|
|
|
* 1) It allows for negative times
|
|
|
|
* 2) The cancel arguments are different. The DHCP code uses the
|
|
|
|
* function and data to find the proper timer to cancel while the
|
|
|
|
* ISC code uses a pointer to the timer.
|
|
|
|
* 3) The DHCP code includes provision for incrementing and decrementing
|
|
|
|
* a reference counter associated with the data.
|
|
|
|
* The first one is fairly easy to fix but will take some time to go throuh
|
|
|
|
* the callers and update them. The second is also not all that difficult
|
|
|
|
* in concept - add a pointer to the appropriate structures to hold a pointer
|
|
|
|
* to the timer and use that. The complications arise in trying to ensure
|
|
|
|
* that all of the corner cases are covered. The last one is potentially
|
|
|
|
* more painful and requires more investigation.
|
2022-01-19 20:14:16 +01:00
|
|
|
*
|
2009-10-28 04:12:30 +00:00
|
|
|
* The plan is continue with the older DHCP calls and timer list. The
|
|
|
|
* calls will continue to manipulate the list but will also pass a
|
|
|
|
* timer to the ISC timer code for the actual dispatch. Later, if desired,
|
|
|
|
* we can go back and modify the underlying calls to use the ISC
|
|
|
|
* timer functions directly without requiring all of the code to change
|
|
|
|
* at the same time.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
|
|
|
dispatch(void)
|
1996-04-11 06:44:12 +00:00
|
|
|
{
|
1999-09-08 01:44:21 +00:00
|
|
|
isc_result_t status;
|
1996-04-11 06:44:12 +00:00
|
|
|
|
2013-11-14 12:55:10 -08:00
|
|
|
do {
|
|
|
|
status = isc_app_ctxrun(dhcp_gbl_ctx.actx);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* isc_app_ctxrun can be stopped by receiving a
|
|
|
|
* signal. It will return ISC_R_RELOAD in that
|
|
|
|
* case. That is a normal behavior.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (status == ISC_R_RELOAD) {
|
|
|
|
/*
|
|
|
|
* dhcp_set_control_state() will do the job.
|
|
|
|
* Note its first argument is ignored.
|
|
|
|
*/
|
|
|
|
status = dhcp_set_control_state(server_shutdown,
|
|
|
|
server_shutdown);
|
|
|
|
if (status == ISC_R_SUCCESS)
|
|
|
|
status = ISC_R_RELOAD;
|
|
|
|
}
|
|
|
|
} while (status == ISC_R_RELOAD);
|
2013-10-30 13:52:36 -07:00
|
|
|
|
2013-11-14 12:55:10 -08:00
|
|
|
log_fatal ("Dispatch routine failed: %s -- exiting",
|
|
|
|
isc_result_totext (status));
|
1996-04-11 06:44:12 +00:00
|
|
|
}
|
|
|
|
|
2009-10-28 04:12:30 +00:00
|
|
|
void
|
|
|
|
isclib_timer_callback(isc_task_t *taskp,
|
|
|
|
isc_event_t *eventp)
|
|
|
|
{
|
|
|
|
struct timeout *t = (struct timeout *)eventp->ev_arg;
|
|
|
|
struct timeout *q, *r;
|
|
|
|
|
|
|
|
/* Get the current time... */
|
|
|
|
gettimeofday (&cur_tv, (struct timezone *)0);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Find the timeout on the dhcp list and remove it.
|
|
|
|
* As the list isn't ordered we search the entire list
|
|
|
|
*/
|
|
|
|
|
|
|
|
r = NULL;
|
|
|
|
for (q = timeouts; q; q = q->next) {
|
|
|
|
if (q == t) {
|
|
|
|
if (r)
|
|
|
|
r->next = q->next;
|
|
|
|
else
|
|
|
|
timeouts = q->next;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
r = q;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The timer should always be on the list. If it is we do
|
|
|
|
* the work and detach the timer block, if not we log an error.
|
|
|
|
* In both cases we attempt free the ISC event and continue
|
|
|
|
* processing.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (q != NULL) {
|
|
|
|
/* call the callback function */
|
|
|
|
(*(q->func)) (q->what);
|
|
|
|
if (q->unref) {
|
|
|
|
(*q->unref) (&q->what, MDL);
|
|
|
|
}
|
|
|
|
q->next = free_timeouts;
|
|
|
|
isc_timer_detach(&q->isc_timeout);
|
|
|
|
free_timeouts = q;
|
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* Hmm, we should clean up the timer structure but aren't
|
|
|
|
* sure about the pointer to the timer block we got so
|
|
|
|
* don't try to - may change this to a log_fatal
|
|
|
|
*/
|
|
|
|
log_error("Error finding timer structure");
|
|
|
|
}
|
|
|
|
|
|
|
|
isc_event_free(&eventp);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* maximum value for usec */
|
|
|
|
#define USEC_MAX 1000000
|
|
|
|
|
2000-05-16 23:03:49 +00:00
|
|
|
void add_timeout (when, where, what, ref, unref)
|
2008-01-03 00:30:14 +00:00
|
|
|
struct timeval *when;
|
2011-05-11 14:01:25 +00:00
|
|
|
void (*where) (void *);
|
1997-03-06 06:52:30 +00:00
|
|
|
void *what;
|
2000-05-16 23:03:49 +00:00
|
|
|
tvref_t ref;
|
|
|
|
tvunref_t unref;
|
1997-02-18 14:33:43 +00:00
|
|
|
{
|
|
|
|
struct timeout *t, *q;
|
2009-10-28 04:12:30 +00:00
|
|
|
int usereset = 0;
|
|
|
|
isc_result_t status;
|
2010-12-14 23:06:50 +00:00
|
|
|
int64_t sec;
|
|
|
|
int usec;
|
2009-10-28 04:12:30 +00:00
|
|
|
isc_interval_t interval;
|
|
|
|
isc_time_t expires;
|
1997-02-18 14:33:43 +00:00
|
|
|
|
|
|
|
/* See if this timeout supersedes an existing timeout. */
|
|
|
|
t = (struct timeout *)0;
|
2009-10-28 04:12:30 +00:00
|
|
|
for (q = timeouts; q; q = q->next) {
|
|
|
|
if ((where == NULL || q->func == where) &&
|
|
|
|
q->what == what) {
|
1997-02-18 14:33:43 +00:00
|
|
|
if (t)
|
2009-10-28 04:12:30 +00:00
|
|
|
t->next = q->next;
|
1997-02-18 14:33:43 +00:00
|
|
|
else
|
2009-10-28 04:12:30 +00:00
|
|
|
timeouts = q->next;
|
|
|
|
usereset = 1;
|
1997-02-18 14:33:43 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
t = q;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If we didn't supersede a timeout, allocate a timeout
|
|
|
|
structure now. */
|
|
|
|
if (!q) {
|
|
|
|
if (free_timeouts) {
|
|
|
|
q = free_timeouts;
|
2009-10-28 04:12:30 +00:00
|
|
|
free_timeouts = q->next;
|
1997-02-18 14:33:43 +00:00
|
|
|
} else {
|
2000-01-26 14:56:18 +00:00
|
|
|
q = ((struct timeout *)
|
2009-10-28 04:12:30 +00:00
|
|
|
dmalloc(sizeof(struct timeout), MDL));
|
|
|
|
if (!q) {
|
|
|
|
log_fatal("add_timeout: no memory!");
|
|
|
|
}
|
1997-02-18 14:33:43 +00:00
|
|
|
}
|
2009-10-28 04:12:30 +00:00
|
|
|
memset(q, 0, sizeof *q);
|
|
|
|
q->func = where;
|
|
|
|
q->ref = ref;
|
|
|
|
q->unref = unref;
|
|
|
|
if (q->ref)
|
|
|
|
(*q->ref)(&q->what, what, MDL);
|
2000-05-16 23:03:49 +00:00
|
|
|
else
|
2009-10-28 04:12:30 +00:00
|
|
|
q->what = what;
|
1997-02-18 14:33:43 +00:00
|
|
|
}
|
|
|
|
|
2010-12-14 23:06:50 +00:00
|
|
|
/*
|
|
|
|
* The value passed in is a time from an epoch but we need a relative
|
|
|
|
* time so we need to do some math to try and recover the period.
|
|
|
|
* This is complicated by the fact that not all of the calls cared
|
|
|
|
* about the usec value, if it's zero we assume the caller didn't care.
|
|
|
|
*
|
|
|
|
* The ISC timer library doesn't seem to like negative values
|
2017-04-26 15:26:17 -04:00
|
|
|
* and on 64-bit systems, isc_time_nowplusinterval() can generate range
|
|
|
|
* errors on values sufficiently larger than 0x7FFFFFFF (TIME_MAX), so
|
|
|
|
* we'll limit the interval to:
|
|
|
|
*
|
|
|
|
* 0 <= interval <= TIME_MAX - 1
|
|
|
|
*
|
|
|
|
* We do it before checking the trace option so that both the trace
|
|
|
|
* code and * the working code use the same values.
|
2010-12-14 23:06:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
sec = when->tv_sec - cur_tv.tv_sec;
|
|
|
|
usec = when->tv_usec - cur_tv.tv_usec;
|
2022-01-19 20:14:16 +01:00
|
|
|
|
2010-12-14 23:06:50 +00:00
|
|
|
if ((when->tv_usec != 0) && (usec < 0)) {
|
|
|
|
sec--;
|
|
|
|
usec += USEC_MAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sec < 0) {
|
|
|
|
sec = 0;
|
|
|
|
usec = 0;
|
2017-04-26 15:26:17 -04:00
|
|
|
} else if (sec >= TIME_MAX) {
|
2017-04-26 15:59:09 -04:00
|
|
|
log_error("Timeout too large "
|
|
|
|
"reducing to: %lu (TIME_MAX - 1)",
|
2017-04-26 15:26:17 -04:00
|
|
|
(unsigned long)(TIME_MAX - 1));
|
|
|
|
sec = TIME_MAX - 1;
|
2010-12-14 23:06:50 +00:00
|
|
|
usec = 0;
|
|
|
|
} else if (usec < 0) {
|
|
|
|
usec = 0;
|
|
|
|
} else if (usec >= USEC_MAX) {
|
|
|
|
usec = USEC_MAX - 1;
|
|
|
|
}
|
|
|
|
|
2022-01-19 20:14:16 +01:00
|
|
|
/*
|
2010-12-14 23:06:50 +00:00
|
|
|
* This is necessary for the tracing code but we put it
|
|
|
|
* here in case we want to compare timing information
|
|
|
|
* for some reason, like debugging.
|
|
|
|
*/
|
2017-04-26 15:26:17 -04:00
|
|
|
q->when.tv_sec = cur_tv.tv_sec + sec;
|
2010-12-14 23:06:50 +00:00
|
|
|
q->when.tv_usec = usec;
|
2009-10-28 04:12:30 +00:00
|
|
|
|
2010-02-11 23:55:36 +00:00
|
|
|
#if defined (TRACING)
|
|
|
|
if (trace_playback()) {
|
|
|
|
/*
|
|
|
|
* If we are doing playback we need to handle the timers
|
|
|
|
* within this code rather than having the isclib handle
|
|
|
|
* them for us. We need to keep the timer list in order
|
|
|
|
* to allow us to find the ones to timeout.
|
|
|
|
*
|
|
|
|
* By using a different timer setup in the playback we may
|
|
|
|
* have variations between the orginal and the playback but
|
|
|
|
* it's the best we can do for now.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Beginning of list? */
|
|
|
|
if (!timeouts || (timeouts->when.tv_sec > q-> when.tv_sec) ||
|
|
|
|
((timeouts->when.tv_sec == q->when.tv_sec) &&
|
|
|
|
(timeouts->when.tv_usec > q->when.tv_usec))) {
|
|
|
|
q->next = timeouts;
|
|
|
|
timeouts = q;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Middle of list? */
|
|
|
|
for (t = timeouts; t->next; t = t->next) {
|
|
|
|
if ((t->next->when.tv_sec > q->when.tv_sec) ||
|
|
|
|
((t->next->when.tv_sec == q->when.tv_sec) &&
|
|
|
|
(t->next->when.tv_usec > q->when.tv_usec))) {
|
|
|
|
q->next = t->next;
|
|
|
|
t->next = q;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* End of list. */
|
|
|
|
t->next = q;
|
|
|
|
q->next = (struct timeout *)0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
#endif
|
2009-10-28 04:12:30 +00:00
|
|
|
/*
|
|
|
|
* Don't bother sorting the DHCP list, just add it to the front.
|
|
|
|
* Eventually the list should be removed as we migrate the callers
|
|
|
|
* to the native ISC timer functions, if it becomes a performance
|
|
|
|
* problem before then we may need to order the list.
|
|
|
|
*/
|
|
|
|
q->next = timeouts;
|
|
|
|
timeouts = q;
|
|
|
|
|
2017-04-26 15:26:17 -04:00
|
|
|
isc_interval_set(&interval, sec, usec * 1000);
|
2009-10-28 04:12:30 +00:00
|
|
|
status = isc_time_nowplusinterval(&expires, &interval);
|
|
|
|
if (status != ISC_R_SUCCESS) {
|
|
|
|
/*
|
2017-04-26 15:26:17 -04:00
|
|
|
* The system time function isn't happy. Range errors
|
|
|
|
* should not be possible with the check logic above.
|
2009-10-28 04:12:30 +00:00
|
|
|
*/
|
|
|
|
log_fatal("Unable to set up timer: %s",
|
|
|
|
isc_result_totext(status));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (usereset == 0) {
|
|
|
|
status = isc_timer_create(dhcp_gbl_ctx.timermgr,
|
|
|
|
isc_timertype_once, &expires,
|
|
|
|
NULL, dhcp_gbl_ctx.task,
|
|
|
|
isclib_timer_callback,
|
|
|
|
(void *)q, &q->isc_timeout);
|
|
|
|
} else {
|
|
|
|
status = isc_timer_reset(q->isc_timeout,
|
|
|
|
isc_timertype_once, &expires,
|
|
|
|
NULL, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If it fails log an error and die */
|
|
|
|
if (status != ISC_R_SUCCESS) {
|
|
|
|
log_fatal("Unable to add timeout to isclib\n");
|
1997-02-18 14:33:43 +00:00
|
|
|
}
|
|
|
|
|
2009-10-28 04:12:30 +00:00
|
|
|
return;
|
1997-02-18 14:33:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void cancel_timeout (where, what)
|
2011-05-11 14:01:25 +00:00
|
|
|
void (*where) (void *);
|
1997-03-06 06:52:30 +00:00
|
|
|
void *what;
|
1997-02-18 14:33:43 +00:00
|
|
|
{
|
|
|
|
struct timeout *t, *q;
|
|
|
|
|
|
|
|
/* Look for this timeout on the list, and unlink it if we find it. */
|
|
|
|
t = (struct timeout *)0;
|
|
|
|
for (q = timeouts; q; q = q -> next) {
|
2009-10-28 04:12:30 +00:00
|
|
|
if (q->func == where && q->what == what) {
|
1997-02-18 14:33:43 +00:00
|
|
|
if (t)
|
2009-10-28 04:12:30 +00:00
|
|
|
t->next = q->next;
|
1997-02-18 14:33:43 +00:00
|
|
|
else
|
2009-10-28 04:12:30 +00:00
|
|
|
timeouts = q->next;
|
1997-02-18 14:33:43 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
t = q;
|
|
|
|
}
|
|
|
|
|
2010-02-11 23:55:36 +00:00
|
|
|
/*
|
|
|
|
* If we found the timeout, cancel it and put it on the free list.
|
|
|
|
* The TRACING stuff is ugly but we don't add a timer when doing
|
|
|
|
* playback so we don't want to remove them then either.
|
|
|
|
*/
|
1997-02-18 14:33:43 +00:00
|
|
|
if (q) {
|
2010-02-11 23:55:36 +00:00
|
|
|
#if defined (TRACING)
|
|
|
|
if (!trace_playback()) {
|
|
|
|
#endif
|
|
|
|
isc_timer_detach(&q->isc_timeout);
|
|
|
|
#if defined (TRACING)
|
|
|
|
}
|
|
|
|
#endif
|
2009-10-28 04:12:30 +00:00
|
|
|
|
|
|
|
if (q->unref)
|
|
|
|
(*q->unref) (&q->what, MDL);
|
|
|
|
q->next = free_timeouts;
|
1997-02-18 14:33:43 +00:00
|
|
|
free_timeouts = q;
|
|
|
|
}
|
|
|
|
}
|
2001-06-27 00:31:20 +00:00
|
|
|
|
|
|
|
#if defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
|
|
|
void cancel_all_timeouts ()
|
|
|
|
{
|
|
|
|
struct timeout *t, *n;
|
|
|
|
for (t = timeouts; t; t = n) {
|
2009-10-28 04:12:30 +00:00
|
|
|
n = t->next;
|
|
|
|
isc_timer_detach(&t->isc_timeout);
|
|
|
|
if (t->unref && t->what)
|
|
|
|
(*t->unref) (&t->what, MDL);
|
|
|
|
t->next = free_timeouts;
|
2001-06-27 00:31:20 +00:00
|
|
|
free_timeouts = t;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void relinquish_timeouts ()
|
|
|
|
{
|
|
|
|
struct timeout *t, *n;
|
|
|
|
for (t = free_timeouts; t; t = n) {
|
2009-10-28 04:12:30 +00:00
|
|
|
n = t->next;
|
|
|
|
dfree(t, MDL);
|
2001-06-27 00:31:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|