mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Fix packet analyzer replacement.
Also reworking the existing test, which was pretty odd/broken.
This commit is contained in:
parent
3a469b3619
commit
ccfeffaf2b
5 changed files with 26 additions and 26 deletions
|
@ -42,7 +42,7 @@ void Dispatcher::Register(uint32_t identifier, AnalyzerPtr analyzer) {
|
|||
}
|
||||
|
||||
int64_t index = identifier - lowest_identifier;
|
||||
if ( table[index] != nullptr )
|
||||
if ( table[index] != nullptr && table[index] != analyzer )
|
||||
reporter->Info("Overwriting packet analyzer mapping %#8" PRIx64 " => %s with %s", index + lowest_identifier,
|
||||
table[index]->GetAnalyzerName(), analyzer->GetAnalyzerName());
|
||||
table[index] = std::move(analyzer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue