mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Merge remote branch 'origin/topic/robin/reporting'
* origin/topic/robin/reporting: Syslog BiF now goes through the reporter as well. Avoiding infinite loops when an error message handlers triggers errors itself. Renaming the Logger to Reporter. Overhauling the internal reporting of messages to the user. Updating a bunch of tests/baselines as well. Conflicts: aux/broccoli policy.old/alarm.bro policy/all.bro policy/bro.init policy/frameworks/notice/weird.bro policy/notice.bro src/SSL-binpac.cc src/bro.bif src/main.cc
This commit is contained in:
commit
9709b1d522
152 changed files with 2625 additions and 1134 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "NetVar.h"
|
||||
#include "Scope.h"
|
||||
#include "File.h"
|
||||
#include "Reporter.h"
|
||||
|
||||
// FIXME: Things that are not fully implemented/working yet:
|
||||
//
|
||||
|
@ -200,7 +201,7 @@ bool RuleMatcher::ReadFiles(const name_list& files)
|
|||
rules_in = search_for_file(files[i], "sig", 0, false, 0);
|
||||
if ( ! rules_in )
|
||||
{
|
||||
error("Can't open signature file", files[i]);
|
||||
reporter->Error("Can't open signature file", files[i]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -400,7 +401,7 @@ static inline uint32 getval(const u_char* data, int size)
|
|||
return ntohl(*(uint32*) data);
|
||||
|
||||
default:
|
||||
internal_error("illegal HdrTest size");
|
||||
reporter->InternalError("illegal HdrTest size");
|
||||
}
|
||||
|
||||
// Should not be reached.
|
||||
|
@ -513,7 +514,7 @@ RuleEndpointState* RuleMatcher::InitEndpoint(Analyzer* analyzer,
|
|||
|
||||
default:
|
||||
data = 0;
|
||||
internal_error("unknown protocol");
|
||||
reporter->InternalError("unknown protocol");
|
||||
}
|
||||
|
||||
// ### data can be nil here if it's an
|
||||
|
@ -542,7 +543,7 @@ RuleEndpointState* RuleMatcher::InitEndpoint(Analyzer* analyzer,
|
|||
DO_MATCH_OR(*h->vals, getval(data + h->offset, h->size), >=);
|
||||
|
||||
default:
|
||||
internal_error("unknown comparision type");
|
||||
reporter->InternalError("unknown comparision type");
|
||||
}
|
||||
|
||||
no_match:
|
||||
|
@ -569,7 +570,7 @@ void RuleMatcher::Match(RuleEndpointState* state, Rule::PatternType type,
|
|||
{
|
||||
if ( ! state )
|
||||
{
|
||||
warn("RuleEndpointState not initialized yet.");
|
||||
reporter->Warning("RuleEndpointState not initialized yet.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue