------------------------------------------------------------ revno: 13782 revision-id: squid3@treenet.co.nz-20150321081646-mdw4523ykjbolwzt parent: squid3@treenet.co.nz-20150321075313-9wmg1n402l5huh8j author: Henrik Nordstrom committer: Amos Jeffries branch nick: 3.5 timestamp: Sat 2015-03-21 01:16:46 -0700 message: Rework SBufStatsAction registration to use explicit code path GCC was not happy about the global level registration "variable" not being used ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150321081646-mdw4523ykjbolwzt # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: cc6c43ada1c10df0b24e9ad62c43077adac18d90 # timestamp: 2015-03-21 08:17:43 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20150321075313-\ # 9wmg1n402l5huh8j # # Begin patch === modified file 'src/SBufStatsAction.cc' --- src/SBufStatsAction.cc 2015-01-13 09:13:49 +0000 +++ src/SBufStatsAction.cc 2015-03-21 08:16:46 +0000 @@ -82,7 +82,9 @@ msg.getPod(mbdata); } -static const bool Registered = (Mgr::RegisterAction("sbuf", - "String-Buffer statistics", &SBufStatsAction::Create, 0 , 1), - true); +void +SBufStatsAction::RegisterWithCacheManager() +{ + Mgr::RegisterAction("sbuf", "String-Buffer statistics", &SBufStatsAction::Create, 0 , 1); +} === modified file 'src/SBufStatsAction.h' --- src/SBufStatsAction.h 2015-01-13 09:13:49 +0000 +++ src/SBufStatsAction.h 2015-03-21 08:16:46 +0000 @@ -21,6 +21,7 @@ public: /// Mgr::ClassActionCreationHandler for Mgr::RegisterAction() static Pointer Create(const Mgr::CommandPointer &cmd); + static void RegisterWithCacheManager(void); protected: explicit SBufStatsAction(const Mgr::CommandPointer &cmd); === modified file 'src/main.cc' --- src/main.cc 2015-01-13 09:13:49 +0000 +++ src/main.cc 2015-03-21 08:16:46 +0000 @@ -59,6 +59,7 @@ #include "profiler/Profiler.h" #include "redirect.h" #include "refresh.h" +#include "SBufStatsAction.h" #include "send-announce.h" #include "SquidConfig.h" #include "SquidDns.h" @@ -1089,6 +1090,8 @@ /* register the modules in the cache manager menus */ cbdataRegisterWithCacheManager(); + SBufStatsAction::RegisterWithCacheManager(); + /* These use separate calls so that the comm loops can eventually * coexist. */