mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
FileAnalysis: insert explicit event queue flush points.
And added an event called "event_queue_flush_point" to mark where that occured in the event stream. The FAF now uses an explicit event queue flush instead of buffering input in order to wait for a file handle to be returned from script-layer.
This commit is contained in:
parent
d9321e2203
commit
2747e839fb
15 changed files with 128 additions and 382 deletions
|
@ -47,7 +47,8 @@ bool DataEvent::DeliverChunk(const u_char* data, uint64 len, uint64 offset)
|
|||
args->append(file->GetVal()->Ref());
|
||||
args->append(new StringVal(new BroString(data, len, 0)));
|
||||
args->append(new Val(offset, TYPE_COUNT));
|
||||
mgr.Dispatch(new Event(chunk_event, args));
|
||||
|
||||
mgr.QueueEvent(chunk_event, args);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -59,7 +60,8 @@ bool DataEvent::DeliverStream(const u_char* data, uint64 len)
|
|||
val_list* args = new val_list;
|
||||
args->append(file->GetVal()->Ref());
|
||||
args->append(new StringVal(new BroString(data, len, 0)));
|
||||
mgr.Dispatch(new Event(stream_event, args));
|
||||
|
||||
mgr.QueueEvent(stream_event, args);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue