]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
add ipcacheQueueDrain() to drain pending requests before shutdown
authorwessels <>
Sat, 31 Aug 1996 04:37:58 +0000 (04:37 +0000)
committerwessels <>
Sat, 31 Aug 1996 04:37:58 +0000 (04:37 +0000)
src/ipcache.cc

index 6e4a289cc092eb0eee7cd43570a93a19bf3ed9a5..9c8751b78fe97c579e94fcedaada4083d0e8ee76 100644 (file)
@@ -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;
+}