diff options
| author | 2007-01-10 18:17:52 +0000 | |
|---|---|---|
| committer | 2007-01-10 18:17:52 +0000 | |
| commit | 7a0a28154a40752182092c50e60616f64dcbbcd5 (patch) | |
| tree | 88861cc0f13838369f6e795afdb0c5de83c09937 /usr.sbin/bind/lib/isc/timer.c | |
| parent | change firmware byte order to be same on all architectures (diff) | |
| download | wireguard-openbsd-7a0a28154a40752182092c50e60616f64dcbbcd5.tar.xz wireguard-openbsd-7a0a28154a40752182092c50e60616f64dcbbcd5.zip | |
ISC BIND release 9.3.3
Diffstat (limited to 'usr.sbin/bind/lib/isc/timer.c')
| -rw-r--r-- | usr.sbin/bind/lib/isc/timer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/bind/lib/isc/timer.c b/usr.sbin/bind/lib/isc/timer.c index 422684848a5..326d03328a9 100644 --- a/usr.sbin/bind/lib/isc/timer.c +++ b/usr.sbin/bind/lib/isc/timer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2002 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: timer.c,v 1.64.12.11 2005/10/27 00:27:29 marka Exp $ */ +/* $ISC: timer.c,v 1.64.12.13 2006/01/04 23:50:21 marka Exp $ */ #include <config.h> @@ -212,9 +212,10 @@ schedule(isc_timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) { isc_time_t then; isc_interval_set(&fifteen, 15, 0); - isc_time_add(&manager->due, &fifteen, &then); + result = isc_time_add(&manager->due, &fifteen, &then); - if (isc_time_compare(&then, now) < 0) { + if (result == ISC_R_SUCCESS && + isc_time_compare(&then, now) < 0) { SIGNAL(&manager->wakeup); signal_ok = ISC_FALSE; isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL, @@ -347,8 +348,10 @@ isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type, if (type == isc_timertype_once && !isc_interval_iszero(interval)) { result = isc_time_add(&now, interval, &timer->idle); - if (result != ISC_R_SUCCESS) + if (result != ISC_R_SUCCESS) { + isc_mem_put(manager->mctx, timer, sizeof(*timer)); return (result); + } } else isc_time_settoepoch(&timer->idle); |
