mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +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
|
@ -8,6 +8,7 @@
|
|||
#include "zeek/Debug.h"
|
||||
#include "zeek/Desc.h"
|
||||
#include "zeek/Event.h"
|
||||
#include "zeek/EventTrace.h"
|
||||
#include "zeek/Expr.h"
|
||||
#include "zeek/File.h"
|
||||
#include "zeek/Frame.h"
|
||||
|
@ -1076,11 +1077,17 @@ EventStmt::EventStmt(EventExprPtr arg_e) : ExprStmt(STMT_EVENT, arg_e), event_ex
|
|||
ValPtr EventStmt::Exec(Frame* f, StmtFlowType& flow)
|
||||
{
|
||||
RegisterAccess();
|
||||
|
||||
auto args = eval_list(f, event_expr->Args());
|
||||
auto h = event_expr->Handler();
|
||||
|
||||
if ( args && h )
|
||||
{
|
||||
if ( etm )
|
||||
etm->ScriptEventQueued(h);
|
||||
|
||||
event_mgr.Enqueue(h, std::move(*args));
|
||||
}
|
||||
|
||||
flow = FLOW_NEXT;
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue