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.
This commit is contained in:
Robin Sommer 2013-05-15 17:19:52 -07:00
parent 639a6410c6
commit 4b86730ef2
3 changed files with 11 additions and 1 deletions

View file

@ -1285,6 +1285,11 @@ void Manager::FlushBuffers()
} }
} }
void Manager::Terminate()
{
FlushBuffers();
}
// Timer which on dispatching rotates the filter. // Timer which on dispatching rotates the filter.
class RotationTimer : public Timer { class RotationTimer : public Timer {
public: public:

View file

@ -155,6 +155,11 @@ public:
*/ */
void FlushBuffers(); void FlushBuffers();
/**
* Signals the manager to shutdown at Bro's termination.
*/
void Terminate();
/** /**
* Returns a list of supported output formats. * Returns a list of supported output formats.
*/ */

View file

@ -330,7 +330,7 @@ void terminate_bro()
mgr.Drain(); mgr.Drain();
file_mgr->Terminate(); file_mgr->Terminate();
log_mgr->FlushBuffers(); log_mgr->Terminate();
thread_mgr->Terminate(); thread_mgr->Terminate();
mgr.Drain(); mgr.Drain();