-- tweaked stats output - no section if all counts zero
-- fixed pause/resume
-- comment out assert that doesn't apply to alert_sf_socket
+-- split parse warning count out of error count
+-- added workaround and FIXIT-T for nhttp test
122
-- pulled thread pinning from Josh
FatalError("see prior %d errors\n", k);
return false;
}
+ if ( ScConfErrorOut() )
+ {
+ if ( int k = get_parse_warnings() )
+ {
+ FatalError("see prior %d warnings\n", k);
+ return false;
+ }
+ }
+
if ( ScTestMode() ||
(!Trough_GetQCount() && !(snort_conf->run_flags & RUN_FLAG__SHELL)) )
{
#include "target_based/sftarget_reader.h"
static unsigned parse_errors = 0;
+static unsigned parse_warnings = 0;
rule_index_map_t *ruleIndexMap = NULL; /* rule index -> sid:gid map */
return tmp;
}
+unsigned get_parse_warnings()
+{
+ unsigned tmp = parse_warnings;
+ parse_warnings = 0;
+ return tmp;
+}
+
//-------------------------------------------------------------------------
// private / implementation methods
//-------------------------------------------------------------------------
else
LogMessage("WARNING: %s\n", buf);
- if ( ScConfErrorOut() )
- parse_errors++;
+ parse_warnings++;
}
void ParseMessage(const char *format, ...)
#include "detection/sfrim.h"
unsigned get_parse_errors();
+unsigned get_parse_warnings();
+
const char* get_parse_file();
void get_parse_location(const char*& name, unsigned& line);
void push_parse_location(const char* name, unsigned line = 1);
+
void pop_parse_location();
void inc_parse_position();
using namespace NHttpEnums;
NHttpTestInput::NHttpTestInput(const char *file_name) {
+ if ( !NHttpTestManager::use_test_input() ) // FIXIT-T workaround
+ return;
if ((test_data_file = fopen(file_name, "r")) == nullptr) throw std::runtime_error("Cannot open test input file");
}
{ "session_timeout", Parameter::PT_INT, "1:86400", "30",
"session tracking timeout" },
- { "footprint", Parameter::PT_INT, "0:", "false",
+ { "footprint", Parameter::PT_INT, "0:", "0",
"use zero for production, non-zero for testing at given size" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }