From: wessels <> Date: Sat, 31 Aug 1996 04:37:58 +0000 (+0000) Subject: add ipcacheQueueDrain() to drain pending requests before shutdown X-Git-Tag: SQUID_3_0_PRE1~5874 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8905d949e61bfb8c0ff46c434e3f0d433643af03;p=thirdparty%2Fsquid.git add ipcacheQueueDrain() to drain pending requests before shutdown --- diff --git a/src/ipcache.cc b/src/ipcache.cc index 6e4a289cc0..9c8751b78f 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,5 +1,5 @@ /* - * $Id: ipcache.cc,v 1.52 1996/08/29 17:59:05 wessels Exp $ + * $Id: ipcache.cc,v 1.53 1996/08/30 22:37:58 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -1011,3 +1011,14 @@ static struct hostent *ipcacheCheckNumeric(name) strncpy(static_result->h_name, name, MAX_HOST_NAME); return static_result; } + +int ipcacheQueueDrain() +{ + ipcache_entry *i; + dnsserver_t *dnsData; + if (!ipcacheQueueHead) + return 0; + while ((dnsData = dnsGetFirstAvailable()) && (i = ipcacheDequeue())) + ipcache_dnsDispatch(dnsData, i); + return 1; +}