mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Fix return value of hook calls that have no handlers.
For this case, the return value is always true.
This commit is contained in:
parent
4a09c12882
commit
98663fd534
2 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,7 @@ Val* BroFunc::Call(val_list* args, Frame* parent) const
|
|||
assert(Flavor() == FUNC_FLAVOR_EVENT || Flavor() == FUNC_FLAVOR_HOOK);
|
||||
loop_over_list(*args, i)
|
||||
Unref((*args)[i]);
|
||||
return 0 ;
|
||||
return Flavor() == FUNC_FLAVOR_HOOK ? new Val(true, TYPE_BOOL) : 0;
|
||||
}
|
||||
|
||||
SegmentProfiler(segment_logger, location);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue