mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
automatically delete disabled input streams
This commit is contained in:
parent
18f07d3a46
commit
852de4700c
4 changed files with 39 additions and 11 deletions
|
@ -689,16 +689,14 @@ bool Manager::IsCompatibleType(BroType* t, bool atomic_only)
|
|||
}
|
||||
|
||||
|
||||
bool Manager::RemoveStream(const string &name)
|
||||
bool Manager::RemoveStream(Stream *i)
|
||||
{
|
||||
Stream *i = FindStream(name);
|
||||
|
||||
if ( i == 0 )
|
||||
return false; // not found
|
||||
|
||||
if ( i->removed )
|
||||
{
|
||||
reporter->Error("Stream %s is already queued for removal. Ignoring remove.", name.c_str());
|
||||
reporter->Error("Stream %s is already queued for removal. Ignoring remove.", i->name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -708,12 +706,24 @@ bool Manager::RemoveStream(const string &name)
|
|||
|
||||
#ifdef DEBUG
|
||||
DBG_LOG(DBG_INPUT, "Successfully queued removal of stream %s",
|
||||
name.c_str());
|
||||
i->name.c_str());
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Manager::RemoveStream(ReaderFrontend* frontend)
|
||||
{
|
||||
return RemoveStream(FindStream(frontend));
|
||||
}
|
||||
|
||||
|
||||
bool Manager::RemoveStream(const string &name)
|
||||
{
|
||||
return RemoveStream(FindStream(name));
|
||||
}
|
||||
|
||||
|
||||
bool Manager::RemoveStreamContinuation(ReaderFrontend* reader)
|
||||
{
|
||||
Stream *i = FindStream(reader);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue