* SOFTWARE.
*/
-/* $Id: cache.c,v 1.23 2000/06/07 02:38:30 marka Exp $ */
+/* $Id: cache.c,v 1.23.2.1 2000/08/18 21:53:46 bwelling Exp $ */
#include <config.h>
void
dns_cache_setcleaninginterval(dns_cache_t *cache, unsigned int t) {
LOCK(&cache->lock);
+
+ /*
+ * It may be the case that the cache has already shut down.
+ * If so, it has no timer.
+ */
+ if (cache->timer == NULL)
+ goto unlock;
+
cache->cleaner.cleaning_interval = t;
if (t == 0) {
isc_timer_reset(cache->cleaner.cleaning_timer,
isc_timertype_ticker,
NULL, &interval, ISC_FALSE);
}
- UNLOCK(&cache->lock);
+ unlock:
+ UNLOCK(&cache->lock);
}
/*