mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
FileAnalysis: refactor add/remove/stop BIFs, add BOF triggers/fields.
The add_action, remove_action, and stop BIFs now go through a queue to ensure that modifications are made at well-defined times and don't end up invalidating loop iterators.
This commit is contained in:
parent
691622b3aa
commit
720858fb36
13 changed files with 517 additions and 169 deletions
|
@ -16,15 +16,11 @@ Hash::Hash(RecordVal* args, Info* info, HashVal* hv, const char* field)
|
|||
|
||||
Hash::~Hash()
|
||||
{
|
||||
// maybe it's all there...
|
||||
Finalize();
|
||||
Unref(hash);
|
||||
}
|
||||
|
||||
bool Hash::DeliverStream(const u_char* data, uint64 len)
|
||||
{
|
||||
Action::DeliverStream(data, len);
|
||||
|
||||
if ( ! hash->IsValid() ) return false;
|
||||
|
||||
hash->Feed(data, len);
|
||||
|
@ -33,7 +29,6 @@ bool Hash::DeliverStream(const u_char* data, uint64 len)
|
|||
|
||||
bool Hash::EndOfFile()
|
||||
{
|
||||
Action::EndOfFile();
|
||||
Finalize();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue