diff options
author | dougb <dougb@FreeBSD.org> | 2008-09-01 22:54:49 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2008-09-01 22:54:49 +0000 |
commit | 1f3acabb1896f89a0f69765b488a0e125ddb728c (patch) | |
tree | 76dd11ff82e0b16f834088d4e670d19e3c291dfe /contrib/bind9/lib/isc/timer.c | |
parent | 188674d6caab2e4ab108c0bf07a4cc26aae1f038 (diff) | |
download | FreeBSD-src-1f3acabb1896f89a0f69765b488a0e125ddb728c.zip FreeBSD-src-1f3acabb1896f89a0f69765b488a0e125ddb728c.tar.gz |
Merge from vendor/bind9/dist as of the 9.4.2-P2 import
Diffstat (limited to 'contrib/bind9/lib/isc/timer.c')
-rw-r--r-- | contrib/bind9/lib/isc/timer.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/bind9/lib/isc/timer.c b/contrib/bind9/lib/isc/timer.c index f67d091..d594307 100644 --- a/contrib/bind9/lib/isc/timer.c +++ b/contrib/bind9/lib/isc/timer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: timer.c,v 1.73.18.7 2007/10/24 23:46:26 tbox Exp $ */ +/* $Id: timer.c,v 1.73.18.7.10.3 2008/07/29 18:35:53 jinmei Exp $ */ /*! \file */ @@ -577,7 +577,7 @@ isc_timer_detach(isc_timer_t **timerp) { static void dispatch(isc_timermgr_t *manager, isc_time_t *now) { isc_boolean_t done = ISC_FALSE, post_event, need_schedule; - isc_event_t *event; + isc_timerevent_t *event; isc_eventtype_t type = 0; isc_timer_t *timer; isc_result_t result; @@ -650,16 +650,18 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) { /* * XXX We could preallocate this event. */ - event = isc_event_allocate(manager->mctx, + event = (isc_timerevent_t *)isc_event_allocate(manager->mctx, timer, type, timer->action, timer->arg, sizeof(*event)); - if (event != NULL) - isc_task_send(timer->task, &event); - else + if (event != NULL) { + event->due = timer->due; + isc_task_send(timer->task, + ISC_EVENT_PTR(&event)); + } else UNEXPECTED_ERROR(__FILE__, __LINE__, isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER, |