]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
More namespace cleanup.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 12 Jul 2008 15:51:24 +0000 (17:51 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 12 Jul 2008 15:51:24 +0000 (17:51 +0200)
13 files changed:
src/ACLASN.h
src/asn.cc
src/authenticate.cc
src/authenticate.h
src/comm_epoll.cc
src/comm_epoll.h
src/comm_kqueue.cc
src/comm_kqueue.h
src/comm_poll.cc
src/comm_poll.h
src/comm_select.cc
src/comm_select.h
src/main.cc

index 478aba6b52062e621bd6ce4268244c5d96bdfc33..63585936d57165710ef805ed689d6198074cbd8c 100644 (file)
@@ -50,9 +50,6 @@ SQUIDCEXTERN int asnMatchIp(CbDataList<int> *, IPAddress &);
 /// \ingroup ACLAPI
 SQUIDCEXTERN void asnInit(void);
 
-/// \ingroup ACLAPI
-extern void asnRegisterWithCacheManager();
-
 /// \ingroup ACLAPI
 SQUIDCEXTERN void asnFreeMemory(void);
 
index cd031c99d5afe8e1d7da2b507a2ff455d7be6f59..8073e73eb2e8c94a4fd9e5fdadfb5b55e9db8e8a 100644 (file)
@@ -179,6 +179,12 @@ ACLASN::prepareForUse()
         asnCacheStart(i->element);
 }
 
+static void
+asnRegisterWithCacheManager(void)
+{
+    CacheManager::GetInstance()->registerAction("asndb", "AS Number Database", asnStats, 0, 1);
+}
+
 /* initialize the radix tree structure */
 
 SQUIDCEXTERN int squid_max_keylen;     /* yuck.. this is in lib/radix.c */
@@ -199,12 +205,6 @@ asnInit(void)
     asnRegisterWithCacheManager();
 }
 
-void
-asnRegisterWithCacheManager()
-{
-    CacheManager::GetInstance()->registerAction("asndb", "AS Number Database", asnStats, 0, 1);
-}
-
 void
 asnFreeMemory(void)
 {
index ea584fa063260998e294c45a355674d2c8ac6fd2..6e4d4143d885c96d19f04370cb56c6f4e0981429 100644 (file)
@@ -73,6 +73,15 @@ authenticateSchemeCount(void)
     return rv;
 }
 
+static void
+authenticateRegisterWithCacheManager(authConfig * config)
+{
+    for (authConfig::iterator i = config->begin(); i != config->end(); ++i) {
+        AuthConfig *scheme = *i;
+        scheme->registerWithCacheManager();
+    }
+}
+
 void
 authenticateInit(authConfig * config)
 {
@@ -91,15 +100,6 @@ authenticateInit(authConfig * config)
     authenticateRegisterWithCacheManager(&Config.authConfiguration);
 }
 
-void
-authenticateRegisterWithCacheManager(authConfig * config)
-{
-    for (authConfig::iterator i = config->begin(); i != config->end(); ++i) {
-        AuthConfig *scheme = *i;
-        scheme->registerWithCacheManager();
-    }
-}
-
 void
 authenticateShutdown(void)
 {
index 6bf8fc9107d92c5f05d6be0a050a67a4d42323b6..c74ba2d66397a763801bd51a514b04150ccfb53f 100644 (file)
@@ -83,8 +83,6 @@ extern void authenticateAuthUserMerge(AuthUser *, AuthUser *);
 /// \ingroup AuthAPI
 extern void authenticateInit(authConfig *);
 /// \ingroup AuthAPI
-extern void authenticateRegisterWithCacheManager(authConfig * config);
-/// \ingroup AuthAPI
 extern void authenticateShutdown(void);
 /// \ingroup AuthAPI
 extern int authenticateAuthUserInuse(AuthUser * auth_user);
index 0163a825ca0d17b3825afcf590088aa93503d452..87f4e9a80a71f502c84792c7a2a5197c80ab93bc 100644 (file)
@@ -70,6 +70,7 @@ static int max_poll_time = 1000;
 
 static struct epoll_event *pevents;
 
+static void commEPollRegisterWithCacheManager(void);
 
 
 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
@@ -216,7 +217,7 @@ commResetSelect(int fd)
 
 static void commIncomingStats(StoreEntry * sentry);
 
-void
+static void
 commEPollRegisterWithCacheManager(void)
 {
     CacheManager::GetInstance()->
index 0e5a54b9f47c224be040b234c4da4037e67da2b4..720570f008ba114ef44e5fe5ad9328e779727ede 100644 (file)
 #ifndef SQUID_COMM_EPOLL_H
 #define SQUID_COMM_EPOLL_H
 
-/* forward decls */
-
-class CacheManager;
-
-extern void commEPollRegisterWithCacheManager(void);
-
 #endif /* SQUID_COMM_EPOLL_H */
index 0bf475463e4874cf7d531683f8756c6899e31a79..391ffab871bdd49e59020bce9ce82a372e908d06 100644 (file)
@@ -91,6 +91,7 @@ static int kqmax;                /* max structs to buffer */
 static int kqoff;                /* offset into the buffer */
 static int max_poll_time = 1000;
 
+static void commKQueueRegisterWithCacheManager(void);
 
 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
 /* Private functions */
@@ -326,7 +327,7 @@ comm_quick_poll_required(void)
     max_poll_time = 10;
 }
 
-void
+static void
 commKQueueRegisterWithCacheManager(void)
 {
 }
index 82833b17beb9c5d5f1c943d2c72c5560aef09b5b..33517c35fc672e642e64757273aa3b8ce7c88301 100644 (file)
 #ifndef SQUID_COMM_KQUEUE_H
 #define SQUID_COMM_KQUEUE_H
 
-/* forward decls */
-
-class CacheManager;
-
-extern void commKQueueRegisterWithCacheManager(void);
-
 #endif /* SQUID_COMM_KQUEUE_H */
index 4675a6c939d86638232c2db75ff0075279e59eb4..dd2be81a9b7efa194b8fa942c87f5d28c9b0570e 100644 (file)
@@ -601,13 +601,8 @@ comm_poll_dns_incoming(void)
     statHistCount(&statCounter.comm_dns_incoming, nevents);
 }
 
-void
-comm_select_init(void)
-{
-    commPollRegisterWithCacheManager();
-}
 
-void
+static void
 commPollRegisterWithCacheManager(void)
 {
     CacheManager::GetInstance()->
@@ -616,6 +611,11 @@ commPollRegisterWithCacheManager(void)
                        commIncomingStats, 0, 1);
 }
 
+void
+comm_select_init(void)
+{
+    commPollRegisterWithCacheManager();
+}
 
 static void
 commIncomingStats(StoreEntry * sentry)
index 93f7b7a72fb4d7790bc3964d5aa44686990ec56c..e3ee514daf6cc0786990ed599e4451ff39368c3e 100644 (file)
 #ifndef SQUID_COMM_POLL_H
 #define SQUID_COMM_POLL_H
 
-/* forward decls */
-
-class CacheManager;
-
-extern void commPollRegisterWithCacheManager(void);
 
 #endif /* SQUID_COMM_POLL_H */
index e29aeada87c05420f10b584fbbceaa706f5016db..aa96b3ec207bca4d788308a784f8ec170a1a7d09 100644 (file)
@@ -654,6 +654,15 @@ comm_select_dns_incoming(void)
     statHistCount(&statCounter.comm_dns_incoming, nevents);
 }
 
+static void
+commSelectRegisterWithCacheManager(void)
+{
+    CacheManager::GetInstance()->
+        registerAction("comm_select_incoming",
+                       "comm_incoming() stats",
+                       commIncomingStats, 0, 1);
+}
+
 void
 comm_select_init(void)
 {
@@ -666,15 +675,6 @@ comm_select_init(void)
     commSelectRegisterWithCacheManager();
 }
 
-void
-commSelectRegisterWithCacheManager(void)
-{
-    CacheManager::GetInstance()->
-        registerAction("comm_select_incoming",
-                       "comm_incoming() stats",
-                       commIncomingStats, 0, 1);
-}
-
 /*
  * examine_select - debug routine.
  *
index 9f95ef57085bb2c8fe466f137172da98fe6c6e51..c80ac3108bd46f5d6384a505c03c9b1d35a99248 100644 (file)
 #ifndef SQUID_COMM_SELECT_H
 #define SQUID_COMM_SELECT_H
 
-/* forward decls */
-
-class CacheManager;
-
-extern void commSelectRegisterWithCacheManager(void);
 
 #endif /* SQUID_COMM_SELECT_H */
index 7970463d964eac90972a98daf02ae3fc196a755c..8ff5dcc07ff527c7de74dc39498ae0a5dfd62200 100644 (file)
@@ -962,26 +962,11 @@ mainInitialize(void)
 
         FwdState::initModule();
         /* register the modules in the cache manager menus */
-        // asnRegisterWithCacheManager(); //moved to asnInit()
-        // authenticateRegisterWithCacheManager(&Config.authConfiguration);
-       //   moved authenticateInit()
 
         cbdataRegisterWithCacheManager();
         /* These use separate calls so that the comm loops can eventually
          * coexist.
          */
-#ifdef USE_EPOLL
-        //commEPollRegisterWithCacheManager(); //moved to comm_epoll::comm_select_init()
-#endif
-#ifdef USE_KQUEUE
-        // commKQueueRegisterWithCacheManager(); //moved to comm_kqueue::comm_select_init
-#endif
-#ifdef USE_POLL
-        // commPollRegisterWithCacheManager(); //moved to comm_poll::comm_select_init()
-#endif
-#if defined(USE_SELECT) || defined(USE_SELECT_WIN32)
-        // commSelectRegisterWithCacheManager(); //moved to comm_select::comm_select_init
-#endif
 
         //clientdbRegisterWithCacheManager(); //moved to clientdbInit()
 #if DELAY_POOLS