]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cache Manager initialization reshuffling.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 11 Jul 2008 12:34:04 +0000 (14:34 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 11 Jul 2008 12:34:04 +0000 (14:34 +0200)
src/carp.cc
src/comm_epoll.cc
src/main.cc

index da7679b988abb3070a869d0cd75f0be7332e66c8..aff67baa933ef84b68bf5442b14019a0e8513938 100644 (file)
@@ -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) {
index 6eedd357c264c5160c060adab9f8aec20398e46c..0163a825ca0d17b3825afcf590088aa93503d452 100644 (file)
@@ -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)
index 34057204a5c0389fb35864191051253e2c2965a6..aef3fbe41d13f1876d8f1b2db3d1f4c43494b9de 100644 (file)
@@ -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