48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
|
diff -up squid-3.5.2/src/SBufStatsAction.cc.sbufstats squid-3.5.2/src/SBufStatsAction.cc
|
||
|
--- squid-3.5.2/src/SBufStatsAction.cc.sbufstats 2015-03-15 13:48:36.479197186 +0100
|
||
|
+++ squid-3.5.2/src/SBufStatsAction.cc 2015-03-15 13:49:19.559676380 +0100
|
||
|
@@ -82,7 +82,8 @@ SBufStatsAction::unpack(const Ipc::Typed
|
||
|
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);
|
||
|
+}
|
||
|
diff -up squid-3.5.2/src/SBufStatsAction.h.sbufstats squid-3.5.2/src/SBufStatsAction.h
|
||
|
--- squid-3.5.2/src/SBufStatsAction.h.sbufstats 2015-02-18 13:17:02.000000000 +0100
|
||
|
+++ squid-3.5.2/src/SBufStatsAction.h 2015-03-15 13:48:36.479197186 +0100
|
||
|
@@ -21,6 +21,7 @@ class SBufStatsAction: public Mgr::Actio
|
||
|
public:
|
||
|
/// Mgr::ClassActionCreationHandler for Mgr::RegisterAction()
|
||
|
static Pointer Create(const Mgr::CommandPointer &cmd);
|
||
|
+ static void RegisterWithCacheManager(void);
|
||
|
|
||
|
protected:
|
||
|
explicit SBufStatsAction(const Mgr::CommandPointer &cmd);
|
||
|
diff -up squid-3.5.2/src/main.cc.sbufstats squid-3.5.2/src/main.cc
|
||
|
--- squid-3.5.2/src/main.cc.sbufstats 2015-02-18 13:17:02.000000000 +0100
|
||
|
+++ squid-3.5.2/src/main.cc 2015-03-15 13:48:36.479197186 +0100
|
||
|
@@ -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 @@ mainInitialize(void)
|
||
|
/* register the modules in the cache manager menus */
|
||
|
|
||
|
cbdataRegisterWithCacheManager();
|
||
|
+ SBufStatsAction::RegisterWithCacheManager();
|
||
|
+
|
||
|
/* These use separate calls so that the comm loops can eventually
|
||
|
* coexist.
|
||
|
*/
|