diff --git a/scripts/base/init-bare.bro b/scripts/base/init-bare.bro index b95a5c3823..8d86e8b547 100644 --- a/scripts/base/init-bare.bro +++ b/scripts/base/init-bare.bro @@ -1392,7 +1392,7 @@ const forward_remote_state_changes = F &redef; const PEER_ID_NONE = 0; ## Whether to use the connection tracker. -const use_connection_compressor = T &redef; +const use_connection_compressor = F &redef; ## Whether compressor should handle refused connections itself. const cc_handle_resets = F &redef; diff --git a/src/Debug.cc b/src/Debug.cc index 7b6dcfdb68..3aa805d5bf 100644 --- a/src/Debug.cc +++ b/src/Debug.cc @@ -54,7 +54,7 @@ DebuggerState::~DebuggerState() bool StmtLocMapping::StartsAfter(const StmtLocMapping* m2) { if ( ! m2 ) - reporter->InternalError("Assertion failed: %s", "m2 != 0"); + reporter->InternalError("Assertion failed: m2 != 0"); return loc.first_line > m2->loc.first_line || (loc.first_line == m2->loc.first_line && @@ -603,7 +603,7 @@ int dbg_execute_command(const char* cmd) #endif if ( int(cmd_code) >= num_debug_cmds() ) - reporter->InternalError("Assertion failed: %s", "int(cmd_code) < num_debug_cmds()"); + reporter->InternalError("Assertion failed: int(cmd_code) < num_debug_cmds()"); // Dispatch to the op-specific handler (with args). int retcode = dbg_dispatch_cmd(cmd_code, arguments); @@ -612,7 +612,7 @@ int dbg_execute_command(const char* cmd) const DebugCmdInfo* info = get_debug_cmd_info(cmd_code); if ( ! info ) - reporter->InternalError("Assertion failed: %s", "info"); + reporter->InternalError("Assertion failed: info"); if ( ! info ) return -2; // ### yuck, why -2? @@ -766,7 +766,7 @@ int dbg_handle_debug_input() const Stmt* stmt = curr_frame->GetNextStmt(); if ( ! stmt ) - reporter->InternalError("Assertion failed: %s", "stmt != 0"); + reporter->InternalError("Assertion failed: stmt != 0"); const Location loc = *stmt->GetLocationInfo(); @@ -943,11 +943,11 @@ Val* dbg_eval_expr(const char* expr) (g_frame_stack.size() - 1) - g_debugger_state.curr_frame_idx; if ( ! (frame_idx >= 0 && (unsigned) frame_idx < g_frame_stack.size()) ) - reporter->InternalError("Assertion failed: %s", "frame_idx >= 0 && (unsigned) frame_idx < g_frame_stack.size()"); + reporter->InternalError("Assertion failed: frame_idx >= 0 && (unsigned) frame_idx < g_frame_stack.size()"); Frame* frame = g_frame_stack[frame_idx]; if ( ! (frame) ) - reporter->InternalError("Assertion failed: %s", "frame"); + reporter->InternalError("Assertion failed: frame"); const BroFunc* func = frame->GetFunction(); if ( func ) diff --git a/src/File.cc b/src/File.cc index 674d096fb2..ada75fe401 100644 --- a/src/File.cc +++ b/src/File.cc @@ -300,7 +300,7 @@ FILE* BroFile::BringIntoCache() UpdateFileSize(); if ( fseek(f, position, SEEK_SET) < 0 ) - reporter->Error("reopen seek failed", this); + reporter->Error("reopen seek failed"); InsertAtBeginning(); @@ -313,7 +313,7 @@ FILE* BroFile::Seek(long new_position) return 0; if ( fseek(f, new_position, SEEK_SET) < 0 ) - reporter->Error("seek failed", this); + reporter->Error("seek failed"); return f; } @@ -324,7 +324,7 @@ void BroFile::SetBuf(bool arg_buffered) return; if ( setvbuf(f, NULL, arg_buffered ? _IOFBF : _IOLBF, 0) != 0 ) - reporter->Error("setvbuf failed", this); + reporter->Error("setvbuf failed"); buffered = arg_buffered; } @@ -386,7 +386,7 @@ void BroFile::Suspend() if ( (position = ftell(f)) < 0 ) { - reporter->Error("ftell failed", this); + reporter->Error("ftell failed"); position = 0; } diff --git a/src/RuleMatcher.cc b/src/RuleMatcher.cc index 311d9814f3..ac8f8a867c 100644 --- a/src/RuleMatcher.cc +++ b/src/RuleMatcher.cc @@ -199,7 +199,7 @@ bool RuleMatcher::ReadFiles(const name_list& files) rules_in = search_for_file(files[i], "sig", 0, false, 0); if ( ! rules_in ) { - reporter->Error("Can't open signature file", files[i]); + reporter->Error("Can't open signature file %s", files[i]); return false; } diff --git a/src/Scope.cc b/src/Scope.cc index 081a9e3333..4916cdbfce 100644 --- a/src/Scope.cc +++ b/src/Scope.cc @@ -127,7 +127,7 @@ ID* lookup_ID(const char* name, const char* curr_module, bool no_global, if ( id ) { if ( need_export && ! id->IsExport() && ! in_debug ) - reporter->Error("identifier is not exported:", + reporter->Error("identifier is not exported: %s", fullname.c_str()); Ref(id); diff --git a/src/Type.cc b/src/Type.cc index 2bee9c50b2..cd40583aae 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -930,7 +930,7 @@ void RecordType::Init(TypeList* arg_base) if ( fields->Lookup(tdij->id) ) { - reporter->Error("duplicate field", tdij->id); + reporter->Error("duplicate field %s", tdij->id); continue; } diff --git a/src/Val.cc b/src/Val.cc index 6a844c5df2..2a8df1c3d7 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -1091,7 +1091,7 @@ static uint32 parse_dotted(const char* text, int& dots) { if ( addr[i] < 0 || addr[i] > 255 ) { - reporter->Error("bad dotted address", text); + reporter->Error("bad dotted address %s", text); break; } } diff --git a/src/net_util.cc b/src/net_util.cc index f1cb760f64..233548e34e 100644 --- a/src/net_util.cc +++ b/src/net_util.cc @@ -228,14 +228,14 @@ uint32 dotted_to_addr(const char* addr_text) if ( sscanf(addr_text, "%d.%d.%d.%d", addr+0, addr+1, addr+2, addr+3) != 4 ) { - reporter->Error("bad dotted address:", addr_text ); + reporter->Error("bad dotted address: %s", addr_text ); return 0; } if ( addr[0] < 0 || addr[1] < 0 || addr[2] < 0 || addr[3] < 0 || addr[0] > 255 || addr[1] > 255 || addr[2] > 255 || addr[3] > 255 ) { - reporter->Error("bad dotted address:", addr_text); + reporter->Error("bad dotted address: %s", addr_text); return 0; } @@ -252,7 +252,7 @@ uint32* dotted_to_addr6(const char* addr_text) uint32* addr = new uint32[4]; if ( inet_pton(AF_INET6, addr_text, addr) <= 0 ) { - reporter->Error("bad IPv6 address:", addr_text ); + reporter->Error("bad IPv6 address: %s", addr_text ); addr[0] = addr[1] = addr[2] = addr[3] = 0; } @@ -283,7 +283,7 @@ uint32 mask_addr(uint32 a, uint32 top_bits_to_keep) { if ( top_bits_to_keep > 32 ) { - reporter->Error("bad address mask value", top_bits_to_keep); + reporter->Error("bad address mask value %s", top_bits_to_keep); return a; } @@ -322,7 +322,7 @@ const uint32* mask_addr(const uint32* a, uint32 top_bits_to_keep) if ( top_bits_to_keep == 0 || top_bits_to_keep > max_bits ) { - reporter->Error("bad address mask value", top_bits_to_keep); + reporter->Error("bad address mask value %s", top_bits_to_keep); return addr; } diff --git a/src/util.cc b/src/util.cc index 054eb5b06c..4ef83bb4ad 100644 --- a/src/util.cc +++ b/src/util.cc @@ -85,7 +85,7 @@ int expand_escape(const char*& s) int result; if ( sscanf(start, "%3o", &result) != 1 ) { - reporter->Warning("bad octal escape: ", start); + reporter->Warning("bad octal escape: %s ", start); result = 0; } @@ -104,7 +104,7 @@ int expand_escape(const char*& s) int result; if ( sscanf(start, "%2x", &result) != 1 ) { - reporter->Warning("bad hexadecimal escape: ", start); + reporter->Warning("bad hexadecimal escape: %s", start); result = 0; }