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:
Robin Sommer 2011-07-01 13:44:28 -07:00
commit 9709b1d522
152 changed files with 2625 additions and 1134 deletions

View file

@ -195,7 +195,7 @@ bool ChunkedIOFd::WriteChunk(Chunk* chunk, bool partial)
assert(chunk->len <= BUFFER_SIZE - sizeof(uint32) );
if ( chunk->len == 0 )
internal_error( "attempt to write 0 bytes chunk");
reporter->InternalError("attempt to write 0 bytes chunk");
if ( partial )
chunk->len |= FLAG_PARTIAL;
@ -285,7 +285,7 @@ bool ChunkedIOFd::FlushWriteBuffer()
}
if ( written == 0 )
internal_error("written==0");
reporter->InternalError("written==0");
// Short write.
write_pos += written;
@ -906,7 +906,7 @@ bool ChunkedIOSSL::WriteData(char* p, uint32 len, bool* error)
return false;
}
internal_error("can't be reached");
reporter->InternalError("can't be reached");
return false;
}
@ -1026,7 +1026,7 @@ bool ChunkedIOSSL::ReadData(char* p, uint32 len, bool* error)
}
// Can't be reached.
internal_error("can't be reached");
reporter->InternalError("can't be reached");
return false;
}