mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
fixed overly narrow Spicy test for manipulating packet analyzers
This commit is contained in:
parent
11a7ef42ef
commit
ed905c33cd
1 changed files with 3 additions and 3 deletions
|
@ -458,21 +458,21 @@ bool Manager::togglePacketAnalyzer(const Tag& tag, bool enable) {
|
|||
}
|
||||
|
||||
bool Manager::toggleAnalyzer(EnumVal* tag, bool enable) {
|
||||
if ( tag->GetType() == analyzer_mgr->GetTagType() ) {
|
||||
if ( tag->GetType()->GetName() == analyzer_mgr->GetTagType()->GetName() ) {
|
||||
if ( auto analyzer = analyzer_mgr->Lookup(tag, false) )
|
||||
return toggleProtocolAnalyzer(analyzer->Tag(), enable);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( tag->GetType() == file_mgr->GetTagType() ) {
|
||||
if ( tag->GetType()->GetName() == file_mgr->GetTagType()->GetName() ) {
|
||||
if ( auto analyzer = file_mgr->Lookup(tag, false) )
|
||||
return toggleFileAnalyzer(analyzer->Tag(), enable);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( tag->GetType() == packet_mgr->GetTagType() ) {
|
||||
if ( tag->GetType()->GetName() == packet_mgr->GetTagType()->GetName() ) {
|
||||
if ( auto analyzer = packet_mgr->Lookup(tag, false) )
|
||||
return togglePacketAnalyzer(analyzer->Tag(), enable);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue