------------------------------------------------------------ revno: 13604 revision-id: squid3@treenet.co.nz-20140925065032-j31q1ka73p2xb63m parent: squid3@treenet.co.nz-20140924171037-huv53crmtxq2km3y committer: Amos Jeffries branch nick: trunk timestamp: Wed 2014-09-24 23:50:32 -0700 message: SourceLayout: shuffle HelperChildConfig into libhelper.la ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140925065032-j31q1ka73p2xb63m # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 8acd72ac9fafb1e15cf105473797944ac329d73f # timestamp: 2014-09-25 07:06:19 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140924171037-\ # huv53crmtxq2km3y # # Begin patch === modified file 'src/Makefile.am' --- src/Makefile.am 2014-09-24 14:07:55 +0000 +++ src/Makefile.am 2014-09-25 06:50:32 +0000 @@ -373,8 +373,6 @@ gopher.cc \ helper.cc \ helper.h \ - HelperChildConfig.h \ - HelperChildConfig.cc \ hier_code.h \ HierarchyLogEntry.h \ $(HTCPSOURCE) \ @@ -745,7 +743,7 @@ ufsdump.cc \ dlink.h \ dlink.cc \ - HelperChildConfig.h \ + helper/ChildConfig.h \ tests/stub_HelperChildConfig.cc \ HttpRequestMethod.cc \ RemovalPolicy.cc \ @@ -1245,8 +1243,6 @@ tests/stub_fatal.cc \ FileMap.h \ filemap.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ HttpBody.cc \ HttpHeader.h \ HttpHeader.cc \ @@ -1348,6 +1344,7 @@ nodist_tests_testACLMaxUserIP_SOURCES= \ $(TESTSOURCES) tests_testACLMaxUserIP_LDADD= \ + helper/libhelper.la \ http/libsquid-http.la \ $(AUTH_ACL_LIBS) \ ident/libident.la \ @@ -1474,8 +1471,6 @@ gopher.cc \ hier_code.h \ helper.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ $(HTCPSOURCE) \ HttpStateFlags.h \ http.cc \ @@ -1892,8 +1887,6 @@ gopher.h \ gopher.cc \ helper.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ hier_code.h \ $(HTCPSOURCE) \ http.cc \ @@ -2142,8 +2135,6 @@ gopher.h \ gopher.cc \ helper.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ hier_code.h \ $(HTCPSOURCE) \ http.cc \ @@ -2388,8 +2379,6 @@ gopher.h \ gopher.cc \ helper.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ hier_code.h \ $(HTCPSOURCE) \ http.cc \ @@ -2696,8 +2685,6 @@ gopher.h \ gopher.cc \ helper.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ hier_code.h \ $(HTCPSOURCE) \ http.cc \ @@ -3516,8 +3503,6 @@ gopher.h \ gopher.cc \ helper.cc \ - HelperChildConfig.h \ - HelperChildConfig.cc \ hier_code.h \ $(HTCPSOURCE) \ http.cc \ === modified file 'src/SquidConfig.h' --- src/SquidConfig.h 2014-09-13 13:59:43 +0000 +++ src/SquidConfig.h 2014-09-25 06:50:32 +0000 @@ -13,7 +13,7 @@ #include "base/RefCount.h" #include "ClientDelayConfig.h" #include "DelayConfig.h" -#include "HelperChildConfig.h" +#include "helper/ChildConfig.h" #include "HttpHeaderTools.h" #include "icmp/IcmpConfig.h" #include "ip/Address.h" @@ -184,8 +184,8 @@ } Program; - HelperChildConfig redirectChildren; - HelperChildConfig storeIdChildren; + Helper::ChildConfig redirectChildren; + Helper::ChildConfig storeIdChildren; time_t authenticateGCInterval; time_t authenticateTTL; time_t authenticateIpTTL; === modified file 'src/auth/Config.h' --- src/auth/Config.h 2014-09-13 13:59:43 +0000 +++ src/auth/Config.h 2014-09-25 06:50:32 +0000 @@ -13,7 +13,7 @@ #include "AccessLogEntry.h" #include "auth/UserRequest.h" -#include "HelperChildConfig.h" +#include "helper/ChildConfig.h" class StoreEntry; class HttpReply; @@ -124,7 +124,7 @@ virtual const char * type() const = 0; public: - HelperChildConfig authenticateChildren; + Helper::ChildConfig authenticateChildren; wordlist *authenticateProgram; ///< Helper program to run, includes all parameters String keyExtrasLine; ///< The format of the request to the auth helper Format::Format *keyExtras; ///< The compiled request format === modified file 'src/external_acl.cc' --- src/external_acl.cc 2014-09-24 14:07:55 +0000 +++ src/external_acl.cc 2014-09-25 06:50:32 +0000 @@ -90,7 +90,7 @@ wordlist *cmdline; - HelperChildConfig children; + Helper::ChildConfig children; helper *theHelper; === modified file 'src/helper.h' --- src/helper.h 2014-09-24 14:07:55 +0000 +++ src/helper.h 2014-09-25 06:50:32 +0000 @@ -16,8 +16,8 @@ #include "cbdata.h" #include "comm/forward.h" #include "dlink.h" +#include "helper/ChildConfig.h" #include "helper/forward.h" -#include "HelperChildConfig.h" #include "ip/Address.h" class helper @@ -39,7 +39,7 @@ dlink_list servers; dlink_list queue; const char *id_name; - HelperChildConfig childs; ///< Configuration settings for number running. + Helper::ChildConfig childs; ///< Configuration settings for number running. int ipc_type; Ip::Address addr; time_t last_queue_warn; === renamed file 'src/HelperChildConfig.cc' => 'src/helper/ChildConfig.cc' --- src/HelperChildConfig.cc 2014-09-13 13:59:43 +0000 +++ src/helper/ChildConfig.cc 2014-09-25 06:50:32 +0000 @@ -11,12 +11,12 @@ #include "ConfigParser.h" #include "Debug.h" #include "globals.h" -#include "HelperChildConfig.h" +#include "helper/ChildConfig.h" #include "Parsing.h" #include -HelperChildConfig::HelperChildConfig(const unsigned int m): +Helper::ChildConfig::ChildConfig(const unsigned int m): n_max(m), n_startup(0), n_idle(1), @@ -25,8 +25,8 @@ n_active(0) {} -HelperChildConfig & -HelperChildConfig::updateLimits(const HelperChildConfig &rhs) +Helper::ChildConfig & +Helper::ChildConfig::updateLimits(const Helper::ChildConfig &rhs) { // Copy the limits only. // Preserve the local state values (n_running and n_active) @@ -38,7 +38,7 @@ } int -HelperChildConfig::needNew() const +Helper::ChildConfig::needNew() const { /* during the startup and reconfigure use our special amount... */ if (starting_up || reconfiguring) return n_startup; @@ -51,7 +51,7 @@ } void -HelperChildConfig::parseConfig() +Helper::ChildConfig::parseConfig() { char const *token = ConfigParser::NextToken(); === renamed file 'src/HelperChildConfig.h' => 'src/helper/ChildConfig.h' --- src/HelperChildConfig.h 2014-09-13 13:59:43 +0000 +++ src/helper/ChildConfig.h 2014-09-25 06:50:32 +0000 @@ -6,8 +6,11 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -#ifndef _SQUID_SRC_HELPERCHILDCONFIG_H -#define _SQUID_SRC_HELPERCHILDCONFIG_H +#ifndef _SQUID_SRC_HELPER_CHILDCONFIG_H +#define _SQUID_SRC_HELPER_CHILDCONFIG_H + +namespace Helper +{ /** * Contains statistics of a particular type of child helper. @@ -15,10 +18,10 @@ * Some derived from a helper children configuration option, * some from runtime stats on the currently active children. */ -class HelperChildConfig +class ChildConfig { public: - explicit HelperChildConfig(const unsigned int m = 0); + explicit ChildConfig(const unsigned int m = 0); /** * When new helpers are needed call this to find out how many more @@ -35,7 +38,7 @@ * This is for parsing new child settings into an object incrementally then updating * the running set without loosing any of the active state or causing races. */ - HelperChildConfig &updateLimits(const HelperChildConfig &rhs); + ChildConfig &updateLimits(const ChildConfig &rhs); /* values from squid.conf */ public: @@ -82,9 +85,11 @@ unsigned int n_active; }; +} // namespace Helper + /* Legacy parser interface */ #define parse_HelperChildConfig(c) (c)->parseConfig() #define dump_HelperChildConfig(e,n,c) storeAppendPrintf((e), "\n%s %d startup=%d idle=%d concurrency=%d\n", (n), (c).n_max, (c).n_startup, (c).n_idle, (c).concurrency) #define free_HelperChildConfig(dummy) // NO. -#endif /* _SQUID_SRC_HELPERCHILDCONFIG_H */ +#endif /* _SQUID_SRC_HELPER_CHILDCONFIG_H */ === modified file 'src/helper/Makefile.am' --- src/helper/Makefile.am 2014-09-24 14:07:55 +0000 +++ src/helper/Makefile.am 2014-09-25 06:50:32 +0000 @@ -11,6 +11,8 @@ noinst_LTLIBRARIES = libhelper.la libhelper_la_SOURCES = \ + ChildConfig.cc \ + ChildConfig.h \ forward.h \ Reply.cc \ Reply.h \ === modified file 'src/ssl/Config.h' --- src/ssl/Config.h 2014-09-13 13:59:43 +0000 +++ src/ssl/Config.h 2014-09-25 06:50:32 +0000 @@ -9,7 +9,7 @@ #ifndef SQUID_SSL_CONFIG_H #define SQUID_SSL_CONFIG_H -#include "HelperChildConfig.h" +#include "helper/ChildConfig.h" namespace Ssl { @@ -20,10 +20,10 @@ #if USE_SSL_CRTD char *ssl_crtd; ///< Name of external ssl_crtd application. /// The number of processes spawn for ssl_crtd. - HelperChildConfig ssl_crtdChildren; + ::Helper::ChildConfig ssl_crtdChildren; #endif char *ssl_crt_validator; - HelperChildConfig ssl_crt_validator_Children; + ::Helper::ChildConfig ssl_crt_validator_Children; Config(); ~Config(); private: === modified file 'src/tests/stub_HelperChildConfig.cc' --- src/tests/stub_HelperChildConfig.cc 2014-09-12 23:00:48 +0000 +++ src/tests/stub_HelperChildConfig.cc 2014-09-25 06:50:32 +0000 @@ -8,14 +8,14 @@ #include "squid.h" #include "globals.h" -#include "HelperChildConfig.h" +#include "helper/ChildConfig.h" #define STUB_API "stub_HelperChildconfig.cc" #include "tests/STUB.h" #include -HelperChildConfig::HelperChildConfig(const unsigned int m): +Helper::ChildConfig::ChildConfig(const unsigned int m): n_max(m), n_startup(0), n_idle(1), @@ -25,7 +25,7 @@ {} int -HelperChildConfig::needNew() const +Helper::ChildConfig::needNew() const { /* during the startup and reconfigure use our special amount... */ if (starting_up || reconfiguring) return n_startup; @@ -37,4 +37,4 @@ return (n_max - n_active); } -void HelperChildConfig::parseConfig() STUB +void Helper::ChildConfig::parseConfig() STUB