From 81abe635c8026eb04beca228e4d431260fb43609 Mon Sep 17 00:00:00 2001 From: Breno Silva Date: Mon, 5 Apr 2010 17:44:55 -0300 Subject: [PATCH] Global Threshold config --- src/util-error.c | 1 - src/util-error.h | 1 - src/util-threshold-config.c | 7 +++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/util-error.c b/src/util-error.c index 6c545fe685..bf84f36b4d 100644 --- a/src/util-error.c +++ b/src/util-error.c @@ -130,7 +130,6 @@ const char * SCErrorToString(SCError err) CASE_CODE (SC_ERR_CONFLICTING_RULE_KEYWORDS); CASE_CODE (SC_ERR_INITIALIZATION); CASE_CODE (SC_ERR_UNIFIED_LOG_FILE_HEADER); - CASE_CODE (SC_ERR_OPTS_WRONG_ORDER); default: return "UNKNOWN_ERROR"; } diff --git a/src/util-error.h b/src/util-error.h index 7a29f6b59f..7f203e00bf 100644 --- a/src/util-error.h +++ b/src/util-error.h @@ -145,7 +145,6 @@ typedef enum { SC_ERR_INVALID_YAML_CONF_ENTRY, SC_ERR_TMQ_ALREADY_REGISTERED, SC_ERR_CONFLICTING_RULE_KEYWORDS, - SC_ERR_OPTS_WRONG_ORDER, SC_ERR_UNIFIED_LOG_FILE_HEADER, /**< Error to indicate the unified file header writing function has been failed */ diff --git a/src/util-threshold-config.c b/src/util-threshold-config.c index 82e7b50420..3408e1e171 100644 --- a/src/util-threshold-config.c +++ b/src/util-threshold-config.c @@ -152,10 +152,9 @@ inline int SCThresholdConfAddThresholdtype(char *rawstr, DetectEngineCtx *de_ctx return -1; ret = pcre_exec(regex, regex_study, rawstr, strlen(rawstr), 0, 0, ov, 30); - if (ret < 0) { - SCLogError(SC_ERR_OPTS_WRONG_ORDER, "Invalid event type in " - "threshold.config file " - "The valid format is : event_filter gen_id 1, sig_id 10, type limit, track by_src, count 1, seconds 60"); + + if (ret < 8) { + SCLogError(SC_ERR_PCRE_MATCH, "pcre_exec parse error, ret %" PRId32 ", string %s", ret, rawstr); goto error; }