mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
hooks to support event tracing
This commit is contained in:
parent
25e096b50a
commit
39cbd7a9dc
4 changed files with 40 additions and 1 deletions
15
src/Expr.cc
15
src/Expr.cc
|
@ -8,6 +8,7 @@
|
|||
#include "zeek/Desc.h"
|
||||
#include "zeek/Event.h"
|
||||
#include "zeek/EventRegistry.h"
|
||||
#include "zeek/EventTrace.h"
|
||||
#include "zeek/Frame.h"
|
||||
#include "zeek/Func.h"
|
||||
#include "zeek/Hash.h"
|
||||
|
@ -4323,7 +4324,14 @@ ValPtr ScheduleExpr::Eval(Frame* f) const
|
|||
auto args = eval_list(f, event->Args());
|
||||
|
||||
if ( args )
|
||||
timer_mgr->Add(new ScheduleTimer(event->Handler(), std::move(*args), dt));
|
||||
{
|
||||
auto handler = event->Handler();
|
||||
|
||||
if ( etm )
|
||||
etm->ScriptEventQueued(handler);
|
||||
|
||||
timer_mgr->Add(new ScheduleTimer(handler, std::move(*args), dt));
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -4862,7 +4870,12 @@ ValPtr EventExpr::Eval(Frame* f) const
|
|||
auto v = eval_list(f, args.get());
|
||||
|
||||
if ( handler )
|
||||
{
|
||||
if ( etm )
|
||||
etm->ScriptEventQueued(handler);
|
||||
|
||||
event_mgr.Enqueue(handler, std::move(*v));
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue