From 65b56479d2c0ee89231f2b3e9c21533f410bdddb Mon Sep 17 00:00:00 2001 From: Bernhard Amann Date: Fri, 17 May 2013 14:08:43 -0700 Subject: [PATCH] (hopefully) fix mutex lock problem. log writers were removed on shutdown while frontends still had pointers to it. A similar fix will be necessary for the input framework (tomorrow :) ) --- src/logging/Manager.cc | 10 ++-------- src/logging/Manager.h | 6 ------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/logging/Manager.cc b/src/logging/Manager.cc index 37cc90cd78..61e15a334f 100644 --- a/src/logging/Manager.cc +++ b/src/logging/Manager.cc @@ -1271,9 +1271,8 @@ bool Manager::Flush(EnumVal* id) return true; } -void Manager::FlushBuffers() +void Manager::Terminate() { - // Flush out cached entries in Frontend for ( vector::iterator s = streams.begin(); s != streams.end(); ++s ) { if ( ! *s ) @@ -1281,15 +1280,10 @@ void Manager::FlushBuffers() for ( Stream::WriterMap::iterator i = (*s)->writers.begin(); i != (*s)->writers.end(); i++ ) - i->second->writer->FlushWriteBuffer(); + i->second->writer->Stop(); } } -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 5ee4318f65..61f6dcd8a7 100644 --- a/src/logging/Manager.h +++ b/src/logging/Manager.h @@ -149,12 +149,6 @@ public: */ bool Flush(EnumVal* id); - /** - * Flushes all buffers that are currently held by writer frontends - * out to the threads. Does not call the thread flush operation. - */ - void FlushBuffers(); - /** * Signals the manager to shutdown at Bro's termination. */