mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
rename the update_finished event to end_of_data and make it fire in
more cases. It will now not only fire after table-reads have been completed, but also after the last event of a whole-file-read (or whole-db-read, etc.). The interface also has been extended a bit to allow readers to directly fire the event should they so choose. This allows the event to be fired in direct table-setting/event-sending modes, which was previously not possible.
This commit is contained in:
parent
296686d5ca
commit
a6d87fcab7
29 changed files with 101 additions and 94 deletions
|
@ -22,7 +22,6 @@
|
|||
@load frameworks/communication/listen
|
||||
|
||||
global outfile: file;
|
||||
global try: count;
|
||||
|
||||
module A;
|
||||
|
||||
|
@ -37,18 +36,18 @@ event line(description: Input::EventDescription, tpe: Input::Event, i: int, b: b
|
|||
print outfile, tpe;
|
||||
print outfile, i;
|
||||
print outfile, b;
|
||||
try = try + 1;
|
||||
if ( try == 7 )
|
||||
{
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
}
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
try = 0;
|
||||
outfile = open("../out");
|
||||
Input::add_event([$source="../input.log", $name="input", $fields=Val, $ev=line, $want_record=F]);
|
||||
Input::remove("input");
|
||||
}
|
||||
|
||||
event Input::end_of_data(name: string, source:string)
|
||||
{
|
||||
print outfile, "End-of-data";
|
||||
close(outfile);
|
||||
terminate();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue