switch cached Trigger values to be opaque-and-generic, rather than assuming CallExpr's

This commit is contained in:
Vern Paxson 2022-05-12 13:54:46 -07:00
parent 9ada7ac4e7
commit 5eb37e4c78
9 changed files with 50 additions and 40 deletions

View file

@ -4605,7 +4605,7 @@ ValPtr CallExpr::Eval(Frame* f) const
if ( func_val && v )
{
const zeek::Func* funcv = func_val->AsFunc();
const CallExpr* current_call = f ? f->GetCall() : nullptr;
auto current_assoc = f ? f->GetTriggerAssoc() : nullptr;
if ( f )
f->SetCall(this);
@ -4614,7 +4614,7 @@ ValPtr CallExpr::Eval(Frame* f) const
ret = funcv->Invoke(&args, f);
if ( f )
f->SetCall(current_call);
f->SetTriggerAssoc(current_assoc);
}
return ret;