From: Francesco Chemolli Date: Wed, 9 Jul 2008 20:24:31 +0000 (+0200) Subject: Refactored actions for cbdata to Cache Manager singleton API. X-Git-Tag: SQUID_3_1_0_1~49^2~143^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a08f1b5a3857c9cf77a991ec93ca3b7915408958;p=thirdparty%2Fsquid.git Refactored actions for cbdata to Cache Manager singleton API. --- diff --git a/src/cbdata.cc b/src/cbdata.cc index 3ff8bd94af..ddd6467985 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -271,16 +271,17 @@ cbdataInternalAddType(cbdata_type type, const char *name, int size, FREE * free_ } void -cbdataRegisterWithCacheManager(CacheManager & manager) +cbdataRegisterWithCacheManager() { - manager.registerAction("cbdata", - "Callback Data Registry Contents", - cbdataDump, 0, 1); + CacheManager *manager=CacheManager::GetInstance(); + manager->registerAction("cbdata", + "Callback Data Registry Contents", + cbdataDump, 0, 1); #if CBDATA_DEBUG - manager.registerAction("cbdatahistory", - "Detailed call history for all current cbdata contents", - cbdataDumpHistory, 0, 1); + manager->registerAction("cbdatahistory", + "Detailed call history for all current cbdata contents", + cbdataDumpHistory, 0, 1); #endif } diff --git a/src/cbdata.h b/src/cbdata.h index e758143560..5e4e9b3cab 100644 --- a/src/cbdata.h +++ b/src/cbdata.h @@ -236,7 +236,7 @@ typedef enum { } cbdata_type; /// \ingroup CBDATAAPI -extern void cbdataRegisterWithCacheManager(CacheManager & manager); +extern void cbdataRegisterWithCacheManager(); #if CBDATA_DEBUG extern void *cbdataInternalAllocDbg(cbdata_type type, const char *, int); diff --git a/src/main.cc b/src/main.cc index 72947fa6fb..921a036031 100644 --- a/src/main.cc +++ b/src/main.cc @@ -975,7 +975,7 @@ mainInitialize(void) carpRegisterWithCacheManager(); #endif - cbdataRegisterWithCacheManager(*manager); + cbdataRegisterWithCacheManager(); /* These use separate calls so that the comm loops can eventually * coexist. */