]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Junk the 'callback_meta' idea
authorwessels <>
Wed, 18 Jun 1997 06:19:50 +0000 (06:19 +0000)
committerwessels <>
Wed, 18 Jun 1997 06:19:50 +0000 (06:19 +0000)
Now use a hash table of callback datas.  A callback pointer is added when
the data is created, then callback functions lock and unlock it while
waiting for the operation to complete.

src/Makefile.in
src/acl.cc
src/comm.cc
src/http.cc
src/ipcache.cc
src/main.cc
src/neighbors.cc
src/peer_select.cc
src/send-announce.cc
src/squid.h
src/stat.cc

index 24e121f566976c977e65a35c9faf08e8b1c8e542..a2379f4e923c0c2c92b43a0adfccb05ca9b1eaf0 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.76 1997/06/17 03:03:19 wessels Exp $
+#  $Id: Makefile.in,v 1.77 1997/06/18 00:19:50 wessels Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -78,7 +78,7 @@ OBJS          = \
                aiops.o \
                async_io.o \
                cache_cf.o \
-               callback.o \
+               cbdata.o \
                client_db.o \
                client_side.o \
                comm.o \
index 39506a3f43c6be9b7a6487c83a5debae5c47caa7..8c35c634ab7569de011e713ffa5896d51945307c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.98 1997/06/17 03:03:20 wessels Exp $
+ * $Id: acl.cc,v 1.99 1997/06/18 00:19:51 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -1176,8 +1176,7 @@ aclCheck(aclCheck_t * checklist)
            checklist->state[ACL_DST_IP] = ACL_LOOKUP_PENDING;
            ipcache_nbgethostbyname(checklist->request->host,
                aclLookupDstIPDone,
-               checklist,
-               &checklist->cbm_list);
+               checklist);
            return;
        } else if (checklist->state[ACL_SRC_DOMAIN] == ACL_LOOKUP_NEEDED) {
            checklist->state[ACL_SRC_DOMAIN] = ACL_LOOKUP_PENDING;
@@ -1216,16 +1215,20 @@ aclChecklistFree(aclCheck_t * checklist)
        fqdncacheUnregister(checklist->src_addr, checklist);
     if (checklist->state[ACL_DST_DOMAIN] == ACL_LOOKUP_PENDING)
        fqdncacheUnregister(checklist->dst_addr, checklist);
+    if (checklist->state[ACL_DST_IP] == ACL_LOOKUP_PENDING)
+        ipcacheUnregister(checklist->request->host, checklist);
     requestUnlink(checklist->request);
-    callbackUnlinkList(checklist->cbm_list);
-    xfree(checklist);
+    checklist->request = NULL;
+    cbdataFree(checklist);
 }
 
 static void
 aclCheckCallback(aclCheck_t * checklist, int answer)
 {
     debug(28, 3) ("aclCheckCallback: answer=%d\n", answer);
-    checklist->callback(answer, checklist->callback_data);
+    if (cbdataValid(checklist->callback_data))
+        checklist->callback(answer, checklist->callback_data);
+    cbdataUnlock(checklist->callback_data);
     checklist->callback = NULL;
     checklist->callback_data = NULL;
     aclChecklistFree(checklist);
@@ -1263,6 +1266,7 @@ aclChecklistCreate(const struct _acl_access *A,
     char *ident)
 {
     aclCheck_t *checklist = xcalloc(1, sizeof(aclCheck_t));;
+    cbdataAdd(checklist);
     checklist->access_list = A;
     checklist->request = requestLink(request);
     checklist->src_addr = src_addr;
@@ -1278,6 +1282,7 @@ aclNBCheck(aclCheck_t * checklist, PF callback, void *callback_data)
 {
     checklist->callback = callback;
     checklist->callback_data = callback_data;
+    cbdataLock(callback_data);
     aclCheck(checklist);
 }
 
index 11930bc43564f374760a5f58542a3798f55fb571..8a7c63659d3c25f645d0c7bd613ec176fbb7d92c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.163 1997/06/17 03:03:21 wessels Exp $
+ * $Id: comm.cc,v 1.164 1997/06/18 00:19:52 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -140,7 +140,6 @@ typedef struct {
     struct in_addr in_addr;
     int locks;
     int fd;
-    callback_meta *cbm_list;
 } ConnectStateData;
 
 /* GLOBAL */
@@ -331,14 +330,16 @@ void
 commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data)
 {
     ConnectStateData *cs = xcalloc(1, sizeof(ConnectStateData));
+    cbdataAdd(cs);
     cs->fd = fd;
     cs->host = xstrdup(host);
     cs->port = port;
     cs->callback = callback;
     cs->data = data;
+    cbdataLock(data);
     comm_add_close_handler(fd, commConnectFree, cs);
     cs->locks++;
-    ipcache_nbgethostbyname(host, commConnectDnsHandle, cs, &cs->cbm_list);
+    ipcache_nbgethostbyname(host, commConnectDnsHandle, cs);
 }
 
 static void
@@ -364,16 +365,19 @@ commConnectCallback(ConnectStateData * cs, int status)
     int fd = cs->fd;
     comm_remove_close_handler(fd, commConnectFree, cs);
     commConnectFree(fd, cs);
-    callback(fd, status, data);
+    if (cbdataValid(data))
+        callback(fd, status, data);
+    cbdataUnlock(data);
 }
 
 static void
 commConnectFree(int fdunused, void *data)
 {
     ConnectStateData *cs = data;
-    callbackUnlinkList(cs->cbm_list);
-    xfree(cs->host);
-    xfree(cs);
+    if (cs->locks)
+       ipcacheUnregister(cs->host, cs);
+    safe_free(cs->host);
+    cbdataFree(cs);
 }
 
 static int
@@ -425,7 +429,7 @@ commConnectHandle(int fd, void *data)
            cs->S.sin_addr.s_addr = 0;
            ipcacheCycleAddr(cs->host);
            cs->locks++;
-           ipcache_nbgethostbyname(cs->host, commConnectDnsHandle, cs, &cs->cbm_list);
+           ipcache_nbgethostbyname(cs->host, commConnectDnsHandle, cs);
        } else {
            ipcacheRemoveBadAddr(cs->host, cs->S.sin_addr);
            commConnectCallback(cs, COMM_ERR_CONNECT);
index cc44365e61e65bfd1f051e7b6adc045b75eaaf77..d6c612629d4ba0f196a96fbc30e71bdd88ff2206 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: http.cc,v 1.170 1997/06/04 06:15:57 wessels Exp $
+ * $Id: http.cc,v 1.171 1997/06/18 00:19:53 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -750,6 +750,9 @@ httpBuildRequestHeader(request_t * request,
        url = entry ? entry->url : urlCanonical(orig_request, NULL);
        sprintf(ybuf, "Cache-control: Max-age=%d", (int) getMaxAge(url));
        httpAppendRequestHeader(hdr_out, ybuf, &len, out_sz);
+if (request->urlpath) {
+       assert(strstr(url, request->urlpath));
+}
     }
     httpAppendRequestHeader(hdr_out, null_string, &len, out_sz);
     put_free_4k_page(xbuf);
index 06693e4d995800395d4c8d37f9c7bec83342ff76..d378dd724ed424385c6e21863103d8f336856027 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.123 1997/06/17 04:54:11 wessels Exp $
+ * $Id: ipcache.cc,v 1.124 1997/06/18 00:19:56 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
 
 struct _ip_pending {
     IPH *handler;
-    callback_meta *cbm;
+    void *handlerData;
     struct _ip_pending *next;
 };
 
@@ -147,7 +147,7 @@ static int ipcacheHasPending _PARAMS((ipcache_entry *));
 static ipcache_entry *ipcache_get _PARAMS((const char *));
 static IPH dummy_handler;
 static int ipcacheExpiredEntry _PARAMS((ipcache_entry *));
-static void ipcacheAddPending _PARAMS((ipcache_entry *, IPH *, void *, callback_meta **));
+static void ipcacheAddPending _PARAMS((ipcache_entry *, IPH *, void *));
 static void ipcacheEnqueue _PARAMS((ipcache_entry *));
 static void *ipcacheDequeue _PARAMS((void));
 static void ipcache_dnsDispatch _PARAMS((dnsserver_t *, ipcache_entry *));
@@ -156,7 +156,6 @@ static void ipcacheUnlockEntry _PARAMS((ipcache_entry *));
 static void ipcacheLockEntry _PARAMS((ipcache_entry *));
 static void ipcacheNudgeQueue _PARAMS((void));
 static void ipcacheChangeKey _PARAMS((ipcache_entry * i));
-static UNREG ipcacheUnregister;
 
 static ipcache_addrs static_addrs;
 static hash_table * ip_table = NULL;
@@ -448,26 +447,28 @@ ipcache_call_pending(ipcache_entry * i)
 {
     struct _ip_pending *p = NULL;
     int nhandler = 0;
-    void *handlerData;
     i->lastref = squid_curtime;
     ipcacheLockEntry(i);
     while (i->pending_head != NULL) {
-       p = i->pending_head;
-       i->pending_head = p->next;
-       handlerData = callbackCheck(p->cbm);
-       if (p->handler && handlerData) {
-           nhandler++;
-           dns_error_message = i->error_message;
-           p->handler(i->status == IP_CACHED ? &i->addrs : NULL, handlerData);
-       }
-        callbackUnlink(p->cbm);
-       safe_free(p);
+        p = i->pending_head;
+        i->pending_head = p->next;
+        if (p->handler) {
+            nhandler++;
+            dns_error_message = i->error_message;
+           if (cbdataValid(p->handlerData)) {
+                p->handler(i->status == IP_CACHED ? &i->addrs : NULL,
+                    p->handlerData);
+           }
+            cbdataUnlock(p->handlerData);
+        }
+        safe_free(p);
     }
-    i->pending_head = NULL;    /* nuke list */
+    i->pending_head = NULL;     /* nuke list */
     debug(14, 10) ("ipcache_call_pending: Called %d handlers.\n", nhandler);
     ipcacheUnlockEntry(i);
 }
 
+
 static ipcache_entry *
 ipcache_parsebuffer(const char *inbuf, dnsserver_t * dnsData)
 {
@@ -627,13 +628,14 @@ ipcache_dnsHandleRead(int fd, void *data)
 }
 
 static void
-ipcacheAddPending(ipcache_entry * i, IPH * handler, void *handlerData, callback_meta **head)
+ipcacheAddPending(ipcache_entry * i, IPH * handler, void *handlerData)
 {
     struct _ip_pending *pending = xcalloc(1, sizeof(struct _ip_pending));
     struct _ip_pending **I = NULL;
     i->lastref = squid_curtime;
     pending->handler = handler;
-    pending->cbm = callbackRegister(handlerData, ipcacheUnregister, pending, head);
+    pending->handlerData = handlerData;
+    cbdataLock(handlerData);
     for (I = &(i->pending_head); *I; I = &((*I)->next));
     *I = pending;
     if (i->status == IP_PENDING)
@@ -641,7 +643,7 @@ ipcacheAddPending(ipcache_entry * i, IPH * handler, void *handlerData, callback_
 }
 
 void
-ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData, callback_meta **cbmhead)
+ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData)
 {
     ipcache_entry *i = NULL;
     dnsserver_t *dnsData = NULL;
@@ -673,7 +675,7 @@ ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData, call
        debug(14, 5) ("ipcache_nbgethostbyname: MISS for '%s'\n", name);
        IpcacheStats.misses++;
        i = ipcacheAddNew(name, NULL, IP_PENDING);
-       ipcacheAddPending(i, handler, handlerData, cbmhead);
+       ipcacheAddPending(i, handler, handlerData);
     } else if (i->status == IP_CACHED || i->status == IP_NEGATIVE_CACHED) {
        /* HIT */
        debug(14, 4) ("ipcache_nbgethostbyname: HIT for '%s'\n", name);
@@ -681,13 +683,13 @@ ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData, call
            IpcacheStats.negative_hits++;
        else
            IpcacheStats.hits++;
-       ipcacheAddPending(i, handler, handlerData, cbmhead);
+       ipcacheAddPending(i, handler, handlerData);
        ipcache_call_pending(i);
        return;
     } else if (i->status == IP_PENDING || i->status == IP_DISPATCHED) {
        debug(14, 4) ("ipcache_nbgethostbyname: PENDING for '%s'\n", name);
        IpcacheStats.pending_hits++;
-       ipcacheAddPending(i, handler, handlerData, cbmhead);
+       ipcacheAddPending(i, handler, handlerData);
        if (squid_curtime - i->expires > 600) {
            debug(14, 0) ("ipcache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n", name, squid_curtime + Config.negativeDnsTtl - i->expires);
            ipcacheChangeKey(i);
@@ -778,12 +780,27 @@ ipcache_init(void)
            (float) Config.ipcache.low) / (float) 100);
 }
 
-static void
-ipcacheUnregister(void *data)
+int
+ipcacheUnregister(const char *name, void *data)
 {
-    struct _ip_pending *p = data;
-    p->handler = NULL;
-    debug(14, 3) ("ipcacheUnregister: unregistered something\n");
+    ipcache_entry *i = NULL;
+    struct _ip_pending *p = NULL;
+    int n = 0;
+    debug(14, 3) ("ipcacheUnregister: FD %d, name '%s'\n", name);
+    if ((i = ipcache_get(name)) == NULL)
+        return 0;
+    if (i->status == IP_PENDING || i->status == IP_DISPATCHED) {
+        for (p = i->pending_head; p; p = p->next) {
+            if (p->handlerData != data)
+                continue;
+            p->handler = NULL;
+            n++;
+        }
+    }
+    if (n == 0)
+        debug_trap("ipcacheUnregister: callback data not found");
+    debug(14, 3) ("ipcacheUnregister: unregistered %d handlers\n", n);
+    return n;
 }
 
 const ipcache_addrs *
@@ -858,7 +875,7 @@ ipcache_gethostbyname(const char *name, int flags)
        }
     }
     if (flags & IP_LOOKUP_IF_MISS)
-       ipcache_nbgethostbyname(name, dummy_handler, NULL, NULL);
+       ipcache_nbgethostbyname(name, dummy_handler, NULL);
     return NULL;
 }
 
index 430e5fa05b9b0c651b4e929f16b9ec0da28e2fc8..21c9883e07e5753c5a9230cb49a120d747df9d4c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.154 1997/06/17 03:03:23 wessels Exp $
+ * $Id: main.cc,v 1.155 1997/06/18 00:19:57 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -390,7 +390,7 @@ serverConnectionsOpen(void)
                icpHandleUdp,
                NULL, 0);
            for (s = Config.mcast_group_list; s; s = s->next)
-               ipcache_nbgethostbyname(s->key, mcastJoinGroups, NULL, NULL);
+               ipcache_nbgethostbyname(s->key, mcastJoinGroups, NULL);
            debug(1, 1) ("Accepting ICP connections on port %d, FD %d.\n",
                (int) port, theInIcpConnection);
 
@@ -513,6 +513,8 @@ mainInitialize(void)
     squid_signal(SIGPIPE, SIG_IGN, SA_RESTART);
     squid_signal(SIGCHLD, sig_child, SA_NODEFER | SA_RESTART);
 
+    if (!configured_once)
+       cbdataInit();
     if (ConfigFile == NULL)
        ConfigFile = xstrdup(DefaultConfigFile);
     parseConfigFile(ConfigFile);
index c0b584b06c93008a13e1a7d0c32449a3783c807e..0185c859373c197f1e589827572a88b08eec96ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.145 1997/06/17 03:03:24 wessels Exp $
+ * $Id: neighbors.cc,v 1.146 1997/06/18 00:19:58 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -757,6 +757,7 @@ neighborAdd(const char *host,
        }
     }
     p = xcalloc(1, sizeof(peer));
+    cbdataAdd(p);
     p->http_port = http_port;
     p->icp_port = icp_port;
     p->mcast.ttl = mcast_ttl;
@@ -923,9 +924,10 @@ peerDestroy(peer * p)
        safe_free(l->domain);
        safe_free(l);
     }
-    callbackUnlinkList(p->cbm_list);
+    if (p->ip_lookup_pending)
+        ipcacheUnregister(p->host, p);
     safe_free(p->host);
-    safe_free(p);
+    cbdataFree(p);
 }
 
 static void
@@ -934,6 +936,7 @@ peerDNSConfigure(const ipcache_addrs * ia, void *data)
     peer *p = data;
     struct sockaddr_in *ap;
     int j;
+    p->ip_lookup_pending = 0;
     if (p->n_addresses == 0) {
        debug(15, 1) ("Configuring %s %s/%d/%d\n", neighborTypeStr(p),
            p->host, p->http_port, p->icp_port);
@@ -970,9 +973,10 @@ peerRefreshDNS(void *junk)
     peer *next = Peers.peers_head;
     while ((p = next)) {
        next = p->next;
+        p->ip_lookup_pending = 1;
        /* some random, bogus FD for ipcache */
        p->test_fd = Squid_MaxFD + current_time.tv_usec;
-       ipcache_nbgethostbyname(p->host, peerDNSConfigure, p, &p->cbm_list);
+       ipcache_nbgethostbyname(p->host, peerDNSConfigure, p);
     }
     /* Reconfigure the peers every hour */
     eventAdd("peerRefreshDNS", peerRefreshDNS, NULL, 3600);
@@ -987,14 +991,16 @@ peerCheckConnect(void *data)
        0, COMM_NONBLOCKING, p->host);
     if (fd < 0)
        return;
+    p->ip_lookup_pending = 1;
     p->test_fd = fd;
-    ipcache_nbgethostbyname(p->host, peerCheckConnect2, p, &p->cbm_list);
+    ipcache_nbgethostbyname(p->host, peerCheckConnect2, p);
 }
 
 static void
 peerCheckConnect2(const ipcache_addrs * ia, void *data)
 {
     peer *p = data;
+    p->ip_lookup_pending = 0;
     commConnectStart(p->test_fd,
        p->host,
        p->http_port,
index b77d24193d1846992a5bef07181f167c03628ee5..6ac01aa57d44b40c2b410f92153c7e860ec93371 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.13 1997/06/04 06:16:05 wessels Exp $
+ * $Id: peer_select.cc,v 1.14 1997/06/18 00:20:01 wessels Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -73,7 +73,8 @@ peerSelectStateFree(ps_state * psstate)
        aclChecklistFree(psstate->acl_checklist);
     }
     requestUnlink(psstate->request);
-    xfree(psstate);
+    psstate->request = NULL;
+    cbdataFree(psstate);
 }
 
 int
@@ -138,11 +139,13 @@ peerSelect(request_t * request,
     void *callback_data)
 {
     ps_state *psstate = xcalloc(1, sizeof(ps_state));
+    cbdataAdd(psstate);
     psstate->request = requestLink(request);
     psstate->entry = entry;
     psstate->callback = callback;
     psstate->fail_callback = fail_callback;
     psstate->callback_data = callback_data;
+    cbdataLock(callback_data);
     psstate->icp.start = current_time;
     peerSelectFoo(psstate);
 }
@@ -171,12 +174,15 @@ static void
 peerSelectCallback(ps_state * psstate, peer * p)
 {
     StoreEntry *entry = psstate->entry;
+    void *data = psstate->callback_data;
     if (entry) {
        if (entry->ping_status == PING_WAITING)
            eventDelete(peerPingTimeout, psstate);
        entry->ping_status = PING_DONE;
     }
-    psstate->callback(p, psstate->callback_data);
+    if (cbdataValid(data))
+        psstate->callback(p, data);
+    cbdataUnlock(data);
     peerSelectStateFree(psstate);
 }
 
@@ -184,12 +190,15 @@ static void
 peerSelectCallbackFail(ps_state * psstate)
 {
     request_t *request = psstate->request;
+    void *data = psstate->callback_data;
     char *url = psstate->entry ? psstate->entry->url : urlCanonical(request, NULL);
     debug(44, 1) ("Failed to select source for '%s'\n", url);
     debug(44, 1) ("  always_direct = %d\n", psstate->always_direct);
     debug(44, 1) ("   never_direct = %d\n", psstate->never_direct);
     debug(44, 1) ("        timeout = %d\n", psstate->icp.timeout);
-    psstate->fail_callback(NULL, psstate->callback_data);
+    if (cbdataValid(data))
+        psstate->fail_callback(NULL, data);
+    cbdataUnlock(data);
     peerSelectStateFree(psstate);
 }
 
index aa543f7417c94c43569c3d4910c0eca4f359f1c6..6a2edbcf22753cdbe0ad3629c7c005e0f72cfbb4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: send-announce.cc,v 1.38 1997/06/17 03:03:26 wessels Exp $
+ * $Id: send-announce.cc,v 1.39 1997/06/18 00:20:02 wessels Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -38,7 +38,7 @@ start_announce(void *unused)
 {
     if (!Config.Announce.on)
        return;
-    ipcache_nbgethostbyname(Config.Announce.host, send_announce, NULL, NULL);
+    ipcache_nbgethostbyname(Config.Announce.host, send_announce, NULL);
     eventAdd("send_announce", start_announce, NULL, Config.Announce.rate);
 }
 
index d6fec7fe0145c5257e15c279360bca4268a6b13c..ab910e94705801fad1e765253f54b88c94484870 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.121 1997/06/17 03:03:26 wessels Exp $
+ * $Id: squid.h,v 1.122 1997/06/18 00:20:03 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -273,7 +273,6 @@ typedef void STCB _PARAMS((void *, char *, size_t));        /* store callback */
 
 #include "cache_cf.h"
 #include "fd.h"
-#include "callback.h"
 #include "comm.h"
 #include "disk.h"
 #include "debug.h"
@@ -312,6 +311,7 @@ typedef void STCB _PARAMS((void *, char *, size_t));        /* store callback */
 #include "refresh.h"
 #include "unlinkd.h"
 #include "multicast.h"
+#include "cbdata.h"
 
 #if !HAVE_TEMPNAM
 #include "tempnam.h"
index ab4890b9171c1d600d9b99b9c8a6e66a08d04618..72a9a6961ac78f339aa3f11989fe4fed13c4a84f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.142 1997/06/04 07:00:33 wessels Exp $
+ * $Id: stat.cc,v 1.143 1997/06/18 00:20:04 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -441,6 +441,8 @@ stat_get(const cacheinfo * obj, const char *req, StoreEntry * sentry)
        netdbDump(sentry);
     } else if (strcmp(req, "storedir") == 0) {
        storeDirStats(sentry);
+    } else if (strcmp(req, "cbdata") == 0) {
+       cbdataDump(sentry);
     }
 }