mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Change Input::update_finished lookup to happen at init time.
Also going through the internal_handler() function will set the event as "used" (i.e. it's marked as being raised somewhere) and fixes the core.check-unused-event-handlers test failure (addresses #823).
This commit is contained in:
parent
60875adfc5
commit
eeb1609768
2 changed files with 4 additions and 5 deletions
|
@ -194,6 +194,7 @@ Manager::TableStream::~TableStream()
|
|||
|
||||
Manager::Manager()
|
||||
{
|
||||
update_finished = internal_handler("Input::update_finished");
|
||||
}
|
||||
|
||||
Manager::~Manager()
|
||||
|
@ -1199,11 +1200,7 @@ void Manager::EndCurrentSend(ReaderFrontend* reader)
|
|||
#endif
|
||||
|
||||
// Send event that the current update is indeed finished.
|
||||
EventHandler* handler = event_registry->Lookup("Input::update_finished");
|
||||
if ( handler == 0 )
|
||||
reporter->InternalError("Input::update_finished not found!");
|
||||
|
||||
SendEvent(handler, 2, new StringVal(i->name.c_str()), new StringVal(i->source.c_str()));
|
||||
SendEvent(update_finished, 2, new StringVal(i->name.c_str()), new StringVal(i->source.c_str()));
|
||||
}
|
||||
|
||||
void Manager::Put(ReaderFrontend* reader, Value* *vals)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue