From 02fe78a03f538bdfbb617678dba8ce010fee2df0 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Wed, 3 Nov 2021 15:23:17 -0700 Subject: [PATCH] bifcl: Allow analyzer to be passed as nullptr for enqueue methods This allows the methods to be used in contexts where the analyzer ID is not available or when the ID doesn't matter, such as in packet analyzers. --- tools/bifcl/builtin-func.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bifcl/builtin-func.y b/tools/bifcl/builtin-func.y index 0aad969649..ce4b8c0bf2 100644 --- a/tools/bifcl/builtin-func.y +++ b/tools/bifcl/builtin-func.y @@ -276,7 +276,7 @@ static void print_event_c_body(FILE* fp) } } - fprintf(fp, "\t },\n\t zeek::util::detail::SOURCE_LOCAL, analyzer->GetID()"); + fprintf(fp, "\t },\n\t zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0"); if ( connection_arg ) // Pass the connection to the EventMgr as the "cookie"