]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Moved Auth::Init to new specific header file.i
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 31 Aug 2012 16:28:10 +0000 (18:28 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 31 Aug 2012 16:28:10 +0000 (18:28 +0200)
src/AuthReg.cc
src/AuthReg.h [new file with mode: 0644]
src/Makefile.am
src/cache_cf.cc
src/main.cc
src/protos.h

index 3cde9893724d4515238b370e7aaa6d12518c3b5f..86d59df5f21b1cd1fd2d2d4b1837115bd2481b12 100644 (file)
@@ -1,6 +1,7 @@
 #include "squid.h"
 
 #if USE_AUTH
+#include "AuthReg.h"
 
 #if HAVE_AUTH_MODULE_BASIC
 #include "auth/basic/Scheme.h"
diff --git a/src/AuthReg.h b/src/AuthReg.h
new file mode 100644 (file)
index 0000000..4662eba
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef SQUID_AUTHREG_H_
+#define SQUID_AUTHREG_H_
+/*
+ * DEBUG: section 
+ * AUTHOR: 
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+namespace Auth {
+
+#if USE_AUTH
+    /// Initialize Auth subsystem
+    extern void Init(void);
+#else /* USE_AUTH */
+    inline void Init(void) {} /* NOP if not USE_AUTH */
+#endif /* USE_AUTH */
+
+} // namespace Auth
+#endif /* SQUID_AUTHREG_H_ */
index 7b9c23a62f0a35e5e9d80065fb3e01942e3af04f..e1633b0a2111f2c189fc76b980c1098749a36664 100644 (file)
@@ -265,6 +265,7 @@ squid_SOURCES = \
        AsyncEngine.cc \
        AsyncEngine.h \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        CacheDigest.h \
        CacheDigest.cc \
@@ -1361,6 +1362,7 @@ tests_testCacheManager_SOURCES = \
        BodyPipe.cc \
        cache_manager.cc \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        CacheDigest.h \
        CacheDigest.cc \
@@ -1743,6 +1745,7 @@ tests_testEvent_SOURCES = \
        CacheDigest.h \
        CacheDigest.cc \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        cache_manager.cc \
        carp.h \
@@ -1975,6 +1978,7 @@ tests_testEventLoop_SOURCES = \
        CacheDigest.cc \
        cache_manager.cc \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        carp.h \
        carp.cc \
@@ -2202,6 +2206,7 @@ tests_test_http_range_SOURCES = \
        $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        cache_manager.cc \
        CacheDigest.h \
@@ -2484,6 +2489,7 @@ tests_testHttpRequest_SOURCES = \
        BodyPipe.cc \
        cache_manager.cc \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        debug.cc \
        CacheDigest.h \
@@ -3521,6 +3527,7 @@ tests_testURL_SOURCES = \
        $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        cache_cf.h \
+       AuthReg.h \
        cache_cf.cc \
        cache_manager.cc \
        CacheDigest.h \
index 96c650fbb10a020d48b613a01a958eb7c9f44148..1c74ca2dbdb28d1b43b73a1201677ea537de571e 100644 (file)
@@ -37,6 +37,7 @@
 #include "acl/Gadgets.h"
 #include "acl/MethodData.h"
 #include "anyp/PortCfg.h"
+#include "AuthReg.h"
 #include "base/RunnersRegistry.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
index 824105acc1665f4a71d09d6142bea10ef1a7f66b..e15d9137ae6f1ad113520b0fb0b3af61f5fa931a 100644 (file)
@@ -34,6 +34,7 @@
 #include "AccessLogEntry.h"
 #include "acl/Acl.h"
 #include "acl/Asn.h"
+#include "AuthReg.h"
 #include "base/RunnersRegistry.h"
 #include "base/Subscription.h"
 #include "base/TextException.h"
@@ -1385,9 +1386,7 @@ SquidMain(int argc, char **argv)
 
         /* we may want the parsing process to set this up in the future */
         Store::Root(new StoreController);
-#if USE_AUTH
-        Auth::Init();      /* required for config parsing */
-#endif
+        Auth::Init();      /* required for config parsing. NOP if !USE_AUTH */
         Ip::ProbeTransport(); // determine IPv4 or IPv6 capabilities before parsing.
 
         Format::Token::Init(); // XXX: temporary. Use a runners registry of pre-parse runners instead.
index 4163dc4bdfed4433f633d7554d9e71ed79b966ae..476f528fc816dde67309f5a5dabb963b86641534 100644 (file)
@@ -71,14 +71,5 @@ extern void reconfigure(int);
 #endif
 
 
-#if USE_AUTH
-
-
-    namespace Auth {
-    /* call to ensure the auth component schemes exist. */
-    extern void Init(void);
-    } // namespace Auth
-
-#endif /* USE_AUTH */
 
 #endif /* SQUID_PROTOS_H */