mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Various smalle tweaks in preparation for merging.
This commit is contained in:
parent
ec50cad9db
commit
7610aa31b6
26 changed files with 236 additions and 129 deletions
|
@ -1,3 +1,5 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#include "AnalyzerSet.h"
|
||||
#include "File.h"
|
||||
#include "Analyzer.h"
|
||||
|
@ -39,6 +41,7 @@ AnalyzerSet::~AnalyzerSet()
|
|||
delete mod;
|
||||
mod_queue.pop();
|
||||
}
|
||||
|
||||
delete analyzer_hash;
|
||||
}
|
||||
|
||||
|
@ -108,6 +111,7 @@ bool AnalyzerSet::Remove(FA_Tag tag, HashKey* key)
|
|||
{
|
||||
file_analysis::Analyzer* a =
|
||||
(file_analysis::Analyzer*) analyzer_map.Remove(key);
|
||||
|
||||
delete key;
|
||||
|
||||
if ( ! a )
|
||||
|
@ -119,6 +123,7 @@ bool AnalyzerSet::Remove(FA_Tag tag, HashKey* key)
|
|||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Remove analyzer %d for file id %s", a->Tag(),
|
||||
file->GetID().c_str());
|
||||
|
||||
delete a;
|
||||
return true;
|
||||
}
|
||||
|
@ -143,6 +148,7 @@ HashKey* AnalyzerSet::GetKey(const RecordVal* args) const
|
|||
HashKey* key = analyzer_hash->ComputeHash(args, 1);
|
||||
if ( ! key )
|
||||
reporter->InternalError("AnalyzerArgs type mismatch");
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
@ -172,7 +178,8 @@ void AnalyzerSet::Insert(file_analysis::Analyzer* a, HashKey* key)
|
|||
|
||||
void AnalyzerSet::DrainModifications()
|
||||
{
|
||||
if ( mod_queue.empty() ) return;
|
||||
if ( mod_queue.empty() )
|
||||
return;
|
||||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Start analyzer mod queue flush of file id %s",
|
||||
file->GetID().c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue