From: Francesco Chemolli Date: Fri, 11 Jul 2008 12:34:04 +0000 (+0200) Subject: Cache Manager initialization reshuffling. X-Git-Tag: SQUID_3_1_0_1~49^2~143^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cb183ec7305d4d49c047326ccf7e8470891572c;p=thirdparty%2Fsquid.git Cache Manager initialization reshuffling. --- diff --git a/src/carp.cc b/src/carp.cc index da7679b988..aff67baa93 100644 --- a/src/carp.cc +++ b/src/carp.cc @@ -72,6 +72,10 @@ carpInit(void) safe_free(carp_peers); n_carp_peers = 0; + + /* initialize cache manager before we have a chance to leave the execution path */ + carpRegisterWithCacheManager(); + /* find out which peers we have */ for (p = Config.peers; p; p = p->next) { diff --git a/src/comm_epoll.cc b/src/comm_epoll.cc index 6eedd357c2..0163a825ca 100644 --- a/src/comm_epoll.cc +++ b/src/comm_epoll.cc @@ -97,6 +97,8 @@ comm_select_init(void) if (kdpfd < 0) { fatalf("comm_select_init: epoll_create(): %s\n",xstrerror()); } + + commEPollRegisterWithCacheManager(); } static const char* epolltype_atoi(int x) diff --git a/src/main.cc b/src/main.cc index 34057204a5..aef3fbe41d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -968,8 +968,7 @@ mainInitialize(void) // asnRegisterWithCacheManager(); //moved to asnInit() authenticateRegisterWithCacheManager(&Config.authConfiguration); #if USE_CARP - - carpRegisterWithCacheManager(); + // carpRegisterWithCacheManager(); //moved to carpInit() #endif cbdataRegisterWithCacheManager(); @@ -977,8 +976,7 @@ mainInitialize(void) * coexist. */ #ifdef USE_EPOLL - - commEPollRegisterWithCacheManager(); + //commEPollRegisterWithCacheManager(); //moved to comm_epoll::comm_select_init() #endif #ifdef USE_KQUEUE