From: Francesco Chemolli Date: Sat, 12 Jul 2008 08:47:19 +0000 (+0200) Subject: More cache manager initialization calls reshuffling. X-Git-Tag: SQUID_3_1_0_1~49^2~143^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea391f187f43268859ee41c3f0c73576471860e9;p=thirdparty%2Fsquid.git More cache manager initialization calls reshuffling. --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 29f629e16a..062088c176 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -326,6 +326,8 @@ httpHeaderInitModule(void) httpHdrCcInitModule(); httpHdrScInitModule(); + + httpHeaderRegisterWithCacheManager(); } void diff --git a/src/Mem.h b/src/Mem.h index 032c364ad5..ba2d3cc7b7 100644 --- a/src/Mem.h +++ b/src/Mem.h @@ -48,11 +48,13 @@ class Mem public: static void Init(); static void Report(); - static void RegisterWithCacheManager(void); static void Stats(StoreEntry *); static void CleanIdlePools(void *unused); static void Report(std::ostream &); static void PoolReport(const MemPoolStats * mp_st, const MemPoolMeter * AllMeter, std::ostream &); + +protected: + static void RegisterWithCacheManager(void); }; #endif /* SQUID_MEM */ diff --git a/src/external_acl.cc b/src/external_acl.cc index 5ae7156ab4..0abe123468 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1323,6 +1323,8 @@ externalAclInit(void) firstTimeInit = 0; CBDATA_INIT_TYPE_FREECB(externalAclState, free_externalAclState); } + + externalAclRegisterWithCacheManager(); } void diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 1e55b60049..6c5b21adda 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -593,6 +593,8 @@ fqdncache_init(void) { int n; + fqdncacheRegisterWithCacheManager(); + if (fqdn_table) return; diff --git a/src/main.cc b/src/main.cc index 62d732d2ab..a1f1a4ce87 100644 --- a/src/main.cc +++ b/src/main.cc @@ -999,10 +999,10 @@ mainInitialize(void) #endif eventInit(); - externalAclRegisterWithCacheManager(); - fqdncacheRegisterWithCacheManager(); + // externalAclRegisterWithCacheManager(); //moved to externalAclInit() + // fqdncacheRegisterWithCacheManager(); //moved to fqdncache_init() FwdState::RegisterWithCacheManager(); - httpHeaderRegisterWithCacheManager(); + // httpHeaderRegisterWithCacheManager(); //moved to httpHeaderInitModule #if !USE_DNSSERVERS //TODO: remove cache manager registration functions from namespace // (protos.h and make them static where appropriate) @@ -1010,7 +1010,7 @@ mainInitialize(void) #endif // ipcacheRegisterWithCacheManager(); //moved to ipcache_init() - Mem::RegisterWithCacheManager(); + // Mem::RegisterWithCacheManager(); //moved to Mem::Init() // netdbRegisterWitHCacheManager(); //moved to netdbInit() PconnModule::GetInstance()->registerWithCacheManager(); // redirectRegisterWithCacheManager(); //moved to redirectInit() diff --git a/src/mem.cc b/src/mem.cc index 3cc0b59f53..21b748d279 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -428,6 +428,8 @@ Mem::Init(void) if (StrPools[i].pool->objectSize() != StrPoolsAttrs[i].obj_size) debugs(13, 1, "Notice: " << StrPoolsAttrs[i].name << " is " << StrPools[i].pool->objectSize() << " bytes instead of requested " << StrPoolsAttrs[i].obj_size << " bytes"); } + + RegisterWithCacheManager(); } void