From: maxtors Date: Sun, 24 Apr 2016 09:18:50 +0000 (+0200) Subject: Module specific error code for init ctx error. X-Git-Tag: suricata-3.1RC1~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06d74b5775a92579372dd767c38584586b373e11;p=thirdparty%2Fsuricata.git Module specific error code for init ctx error. --- diff --git a/src/log-stats.c b/src/log-stats.c index 72eb3bd089..e08c6888cd 100644 --- a/src/log-stats.c +++ b/src/log-stats.c @@ -221,7 +221,7 @@ OutputCtx *LogStatsLogInitCtx(ConfNode *conf) { LogFileCtx *file_ctx = LogFileNewCtx(); if (file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_STATS_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/log-tcp-data.c b/src/log-tcp-data.c index 0cf2f225f3..c3dadd4416 100644 --- a/src/log-tcp-data.c +++ b/src/log-tcp-data.c @@ -249,7 +249,7 @@ OutputCtx *LogTcpDataLogInitCtx(ConfNode *conf) LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_TCPDATA_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/output-json-flow.c b/src/output-json-flow.c index 6c500b4660..1ce4b6f2f7 100644 --- a/src/output-json-flow.c +++ b/src/output-json-flow.c @@ -346,7 +346,7 @@ OutputCtx *OutputFlowLogInit(ConfNode *conf) SCLogInfo("hi"); LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_FLOW_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/output-json-netflow.c b/src/output-json-netflow.c index 3a91ec5a3e..52ff013cad 100644 --- a/src/output-json-netflow.c +++ b/src/output-json-netflow.c @@ -329,7 +329,7 @@ OutputCtx *OutputNetFlowLogInit(ConfNode *conf) SCLogInfo("hi"); LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_NETFLOW_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/output-json-smtp.c b/src/output-json-smtp.c index b205b60b03..fd9683b920 100644 --- a/src/output-json-smtp.c +++ b/src/output-json-smtp.c @@ -154,7 +154,7 @@ OutputCtx *OutputSmtpLogInit(ConfNode *conf) { LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_SMTP_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/output-json-ssh.c b/src/output-json-ssh.c index 5218ccb81c..94853c87b0 100644 --- a/src/output-json-ssh.c +++ b/src/output-json-ssh.c @@ -205,7 +205,7 @@ OutputCtx *OutputSshLogInit(ConfNode *conf) LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_SSH_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/output-json-stats.c b/src/output-json-stats.c index 1b2633afe0..3f45732bb4 100644 --- a/src/output-json-stats.c +++ b/src/output-json-stats.c @@ -265,7 +265,7 @@ OutputCtx *OutputStatsLogInit(ConfNode *conf) { LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_STATS_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/output-json-tls.c b/src/output-json-tls.c index cdf03b2839..94f6a3645b 100644 --- a/src/output-json-tls.c +++ b/src/output-json-tls.c @@ -245,7 +245,7 @@ OutputCtx *OutputTlsLogInit(ConfNode *conf) LogFileCtx *file_ctx = LogFileNewCtx(); if(file_ctx == NULL) { - SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx"); + SCLogError(SC_ERR_TLS_LOG_GENERIC, "couldn't create new file_ctx"); return NULL; } diff --git a/src/util-error.c b/src/util-error.c index ea1d74d9d0..2cd58e5c2e 100644 --- a/src/util-error.c +++ b/src/util-error.c @@ -318,6 +318,12 @@ const char * SCErrorToString(SCError err) CASE_CODE (SC_WARN_FASTER_CAPTURE_AVAILABLE); CASE_CODE (SC_WARN_POOR_RULE); CASE_CODE (SC_ERR_ALERT_PAYLOAD_BUFFER); + CASE_CODE (SC_ERR_STATS_LOG_GENERIC); + CASE_CODE (SC_ERR_TCPDATA_LOG_GENERIC); + CASE_CODE (SC_ERR_FLOW_LOG_GENERIC); + CASE_CODE (SC_ERR_NETFLOW_LOG_GENERIC); + CASE_CODE (SC_ERR_SMTP_LOG_GENERIC); + CASE_CODE (SC_ERR_SSH_LOG_GENERIC); } return "UNKNOWN_ERROR"; diff --git a/src/util-error.h b/src/util-error.h index 00eadd09b3..1825b77005 100644 --- a/src/util-error.h +++ b/src/util-error.h @@ -308,6 +308,12 @@ typedef enum { SC_WARN_FASTER_CAPTURE_AVAILABLE, SC_WARN_POOR_RULE, SC_ERR_ALERT_PAYLOAD_BUFFER, + SC_ERR_STATS_LOG_GENERIC, + SC_ERR_TCPDATA_LOG_GENERIC, + SC_ERR_FLOW_LOG_GENERIC, + SC_ERR_NETFLOW_LOG_GENERIC, + SC_ERR_SMTP_LOG_GENERIC, + SC_ERR_SSH_LOG_GENERIC, } SCError; const char *SCErrorToString(SCError);