mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
explicitly provide the frame for evaluating a "when" timeout expression
This commit is contained in:
parent
fa848167bb
commit
98a05538b7
2 changed files with 5 additions and 5 deletions
|
@ -102,7 +102,7 @@ protected:
|
|||
Trigger::Trigger(ExprPtr cond, StmtPtr body, StmtPtr timeout_stmts, ExprPtr timeout_expr,
|
||||
Frame* frame, bool is_return, const Location* location)
|
||||
{
|
||||
GetTimeout(timeout_expr);
|
||||
GetTimeout(timeout_expr, frame);
|
||||
Init(cond, body, timeout_stmts, frame, is_return, location);
|
||||
}
|
||||
|
||||
|
@ -120,12 +120,12 @@ Trigger::Trigger(WhenInfo* wi, const IDSet& _globals, std::vector<ValPtr> _local
|
|||
local_aggrs = std::move(_local_aggrs);
|
||||
have_trigger_elems = true;
|
||||
|
||||
GetTimeout(wi->TimeoutExpr());
|
||||
GetTimeout(wi->TimeoutExpr(), f);
|
||||
|
||||
Init(wi->Cond(), wi->WhenBody(), wi->TimeoutStmt(), f, wi->IsReturn(), loc);
|
||||
}
|
||||
|
||||
void Trigger::GetTimeout(const ExprPtr& timeout_expr)
|
||||
void Trigger::GetTimeout(const ExprPtr& timeout_expr, Frame* f)
|
||||
{
|
||||
timeout_value = -1.0;
|
||||
|
||||
|
@ -135,7 +135,7 @@ void Trigger::GetTimeout(const ExprPtr& timeout_expr)
|
|||
|
||||
try
|
||||
{
|
||||
timeout_val = timeout_expr->Eval(frame);
|
||||
timeout_val = timeout_expr->Eval(f);
|
||||
}
|
||||
catch ( InterpreterException& )
|
||||
{ /* Already reported */
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
private:
|
||||
friend class TriggerTimer;
|
||||
|
||||
void GetTimeout(const ExprPtr& timeout_expr);
|
||||
void GetTimeout(const ExprPtr& timeout_expr, Frame* f);
|
||||
|
||||
void Init(ExprPtr cond, StmtPtr body, StmtPtr timeout_stmts, Frame* frame, bool is_return,
|
||||
const Location* location);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue