]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
More cache manager initialization calls reshuffling.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 12 Jul 2008 06:07:28 +0000 (08:07 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 12 Jul 2008 06:07:28 +0000 (08:07 +0200)
12 files changed:
src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc
src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h
src/DiskIO/DiskIOModule.cc
src/DiskIO/DiskIOModule.h
src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc
src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h
src/authenticate.cc
src/delay_pools.cc
src/main.cc
src/neighbors.cc

index 4f1848a278638ae8234164054959ad3fa231a2c1..0097fd79219127406cde8697d09df64e8f45c2c8 100644 (file)
@@ -69,6 +69,8 @@ DiskDaemonDiskIOModule::init()
     debugs(47, 1, "diskd started");
 #endif
     initialised = true;
+
+    registerWithCacheManager();
 }
 
 void
index a47395ed5a7d85a3f4d5a829bf5a080a1f3c965a..0b7fca389b95672048f06eb662936b0db3a2660f 100644 (file)
@@ -43,7 +43,6 @@ public:
     static DiskDaemonDiskIOModule &GetInstance();
     DiskDaemonDiskIOModule();
     virtual void init();
-    virtual void registerWithCacheManager(void);
     virtual void shutdown();
     virtual char const *type () const;
     virtual DiskIOStrategy* createStrategy();
@@ -52,6 +51,7 @@ private:
     static void Stats(StoreEntry * sentry);
     static DiskDaemonDiskIOModule Instance;
     bool initialised;
+    void registerWithCacheManager(void);
 };
 
 #endif /* SQUID_DISKDAEMONDISKIOMODULE_H */
index 71e1c4e3e0bc0b034f7efc90bb8229c8fc631c75..a9d77cd1b6c2bebd72d92e847033fb911bafa5f1 100644 (file)
@@ -48,13 +48,6 @@ DiskIOModule::DiskIOModule()
      */
 }
 
-void
-DiskIOModule::RegisterAllModulesWithCacheManager(void)
-{
-    for (iterator i = GetModules().begin(); i != GetModules().end(); ++i)
-        (*i)->registerWithCacheManager();
-}
-
 void
 DiskIOModule::SetupAllModules()
 {
@@ -130,7 +123,3 @@ DiskIOModule::FindDefault()
     return result;
 }
 
-/* disk modules dont export anything by default */
-void
-DiskIOModule::registerWithCacheManager(void)
-{}
index a0b33322f32a3e2227f34952beab87a3f17e6645..a766e1c907638b4e5987494d49666ccd84cac54f 100644 (file)
@@ -63,7 +63,7 @@ public:
     virtual ~DiskIOModule(){}
 
     virtual void init() = 0;
-    virtual void registerWithCacheManager(void);
+    //virtual void registerWithCacheManager(void);
     virtual void shutdown() = 0;
     virtual DiskIOStrategy *createStrategy() = 0;
 
index 2dff881a028cf439160e7af211ed9826ba963951..5a07b426d5ecc727b9c3c96c34f77c2aef436f97 100644 (file)
@@ -53,12 +53,6 @@ DiskThreadsDiskIOModule::init()
     DiskThreadsIOStrategy::Instance.init();
 }
 
-void
-DiskThreadsDiskIOModule::registerWithCacheManager(void)
-{
-    DiskThreadsIOStrategy::Instance.registerWithCacheManager();
-}
-
 void
 DiskThreadsDiskIOModule::shutdown()
 {
index 0435841d730173ba61ed8cff0c5f2f37c8b3e09d..6f186191b39a7cb8f67b42defe08f2e289109f4e 100644 (file)
@@ -43,7 +43,7 @@ public:
     static DiskThreadsDiskIOModule &GetInstance();
     DiskThreadsDiskIOModule();
     virtual void init();
-    virtual void registerWithCacheManager(void);
+    //virtual void registerWithCacheManager(void);
     virtual void shutdown();
     virtual char const *type () const;
     virtual DiskIOStrategy* createStrategy();
index ab1f101b8aa9ebcef22533db65271e1fdf79ad77..bbc5580cd396c1a9477af8596dfcc3499649b00a 100644 (file)
@@ -58,6 +58,8 @@ DiskThreadsIOStrategy::init(void)
      * hasn't been parsed yet and we don't know how many cache_dirs
      * there are, which means we don't know how many threads to start.
      */
+
+     registerWithCacheManager();
 }
 
 void
index 1ff47da0c9414a70407e3b5e140e85b8c5ccfceb..73bb5802755db1df1b090a8d5a714a0bd0d2528e 100644 (file)
@@ -58,7 +58,6 @@ public:
     virtual int callback();
     virtual void sync();
     virtual void init();
-    virtual void registerWithCacheManager(void);
     void done();
     /* Todo: add access limitations */
     bool initialised;
@@ -67,6 +66,7 @@ public:
 
 private:
     static void aioStats(StoreEntry * sentry);
+    void registerWithCacheManager(void);
 };
 
 #endif
index 394ba765a992d8e6a86e3fe41c2e607b234344f8..ea584fa063260998e294c45a355674d2c8ac6fd2 100644 (file)
@@ -87,6 +87,8 @@ authenticateInit(authConfig * config)
         AuthUser::cacheInit();
     else
         AuthUser::CachedACLsReset();
+
+    authenticateRegisterWithCacheManager(&Config.authConfiguration);
 }
 
 void
index 254ac6e2f6bfe5ebf49430c6635089bf335f2e3c..c593fce3b4246a58ccda4ed1ef2e254cdf7eb76b 100644 (file)
@@ -553,6 +553,7 @@ void
 DelayPools::Init()
 {
     LastUpdate = getCurrentTime();
+    RegisterWithCacheManager();
 }
 
 void
index bb0fd913a21984269452da998f13d28f9844a0c1..7d0ea9cd380ca17951d8f33ea8837e85faf55b86 100644 (file)
@@ -728,7 +728,7 @@ mainReconfigure(void)
     serverConnectionsOpen();
 
     neighbors_init();
-    neighborsRegisterWithCacheManager();
+    // neighborsRegisterWithCacheManager(); //moved to neighbors_init()
 
     storeDirOpenSwapLogs();
 
@@ -966,7 +966,8 @@ mainInitialize(void)
         /* register the modules in the cache manager menus */
         // accessLogRegisterWithCacheManager(); //moved to accessLogInit()
         // asnRegisterWithCacheManager(); //moved to asnInit()
-        authenticateRegisterWithCacheManager(&Config.authConfiguration);
+        // authenticateRegisterWithCacheManager(&Config.authConfiguration);
+       //   moved authenticateInit()
 #if USE_CARP
         // carpRegisterWithCacheManager(); //moved to carpInit()
 #endif
@@ -991,10 +992,11 @@ mainInitialize(void)
         //clientdbRegisterWithCacheManager(); //moved to clientdbInit()
 #if DELAY_POOLS
 
-        DelayPools::RegisterWithCacheManager();
+        //DelayPools::RegisterWithCacheManager(); //moved to DelayPools::Init()
 #endif
 
-        DiskIOModule::RegisterAllModulesWithCacheManager();
+        //DiskIOModule::RegisterAllModulesWithCacheManager();
+       //  moved to each module's init() function
 #if USE_DNSSERVERS
 
         dnsRegisterWithCacheManager();
index 0eaf23707f3daaf74fa1a91b1ef0cb3bfe5ba293..3ffcb4751fc0fafd80b404179c8ae7576977decf 100644 (file)
@@ -499,6 +499,8 @@ neighbors_init(void)
     peer *next = NULL;
     int fd = theInIcpConnection;
 
+    neighborsRegisterWithCacheManager();
+
     /* setup addrinfo for use */
     nul.InitAddrInfo(AI);