From 4b86730ef2d75232fe6a1c78b25236007dbcd962 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Wed, 15 May 2013 17:19:52 -0700 Subject: [PATCH] Reintroducing the logging::Manager's Terminate() method. It doesn't do anything else than simply forwarding to FlushBuffers(). This is just for consistency in terminate_bro() where components get their Terminate() called so that the main code doesn't need to know anything more specific about what particular action to take at shutdown. --- src/logging/Manager.cc | 5 +++++ src/logging/Manager.h | 5 +++++ src/main.cc | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/logging/Manager.cc b/src/logging/Manager.cc index 7848f97c68..37cc90cd78 100644 --- a/src/logging/Manager.cc +++ b/src/logging/Manager.cc @@ -1285,6 +1285,11 @@ void Manager::FlushBuffers() } } +void Manager::Terminate() + { + FlushBuffers(); + } + // Timer which on dispatching rotates the filter. class RotationTimer : public Timer { public: diff --git a/src/logging/Manager.h b/src/logging/Manager.h index bd68bc603f..5ee4318f65 100644 --- a/src/logging/Manager.h +++ b/src/logging/Manager.h @@ -155,6 +155,11 @@ public: */ void FlushBuffers(); + /** + * Signals the manager to shutdown at Bro's termination. + */ + void Terminate(); + /** * Returns a list of supported output formats. */ diff --git a/src/main.cc b/src/main.cc index ff10afb1ee..b330f36509 100644 --- a/src/main.cc +++ b/src/main.cc @@ -330,7 +330,7 @@ void terminate_bro() mgr.Drain(); file_mgr->Terminate(); - log_mgr->FlushBuffers(); + log_mgr->Terminate(); thread_mgr->Terminate(); mgr.Drain();