mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
(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 :) )
This commit is contained in:
parent
bd02da8a0c
commit
65b56479d2
2 changed files with 2 additions and 14 deletions
|
@ -1271,9 +1271,8 @@ bool Manager::Flush(EnumVal* id)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::FlushBuffers()
|
void Manager::Terminate()
|
||||||
{
|
{
|
||||||
// Flush out cached entries in Frontend
|
|
||||||
for ( vector<Stream *>::iterator s = streams.begin(); s != streams.end(); ++s )
|
for ( vector<Stream *>::iterator s = streams.begin(); s != streams.end(); ++s )
|
||||||
{
|
{
|
||||||
if ( ! *s )
|
if ( ! *s )
|
||||||
|
@ -1281,15 +1280,10 @@ void Manager::FlushBuffers()
|
||||||
|
|
||||||
for ( Stream::WriterMap::iterator i = (*s)->writers.begin();
|
for ( Stream::WriterMap::iterator i = (*s)->writers.begin();
|
||||||
i != (*s)->writers.end(); i++ )
|
i != (*s)->writers.end(); i++ )
|
||||||
i->second->writer->FlushWriteBuffer();
|
i->second->writer->Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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:
|
||||||
|
|
|
@ -149,12 +149,6 @@ public:
|
||||||
*/
|
*/
|
||||||
bool Flush(EnumVal* id);
|
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.
|
* Signals the manager to shutdown at Bro's termination.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue