mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Implement the zeek_init handler.
Implements the change and a test.
This commit is contained in:
parent
f96bc81f85
commit
8cefb9be42
118 changed files with 229 additions and 165 deletions
|
@ -1171,6 +1171,12 @@ func_hdr:
|
|||
}
|
||||
| TOK_EVENT event_id func_params opt_attr
|
||||
{
|
||||
// Gracefully handle the deprecation of bro_init and bro_done
|
||||
if ( strncmp("bro_init", $2->Name(), 8) == 0 )
|
||||
$2 = lookup_ID("zeek_init", "GLOBAL");
|
||||
if ( strncmp("bro_done", $2->Name(), 8) == 0 )
|
||||
$2 = lookup_ID("zeek_done", "GLOBAL");
|
||||
|
||||
begin_func($2, current_module.c_str(),
|
||||
FUNC_FLAVOR_EVENT, 0, $3, $4);
|
||||
$$ = $3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue