]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Module specific error code for init ctx error.
authormaxtors <moe.andreas@gmail.com>
Sun, 24 Apr 2016 09:18:50 +0000 (11:18 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 25 Apr 2016 12:04:29 +0000 (14:04 +0200)
src/log-stats.c
src/log-tcp-data.c
src/output-json-flow.c
src/output-json-netflow.c
src/output-json-smtp.c
src/output-json-ssh.c
src/output-json-stats.c
src/output-json-tls.c
src/util-error.c
src/util-error.h

index 72eb3bd0891d2c26cf4d6d4bc8e22c23dd06f935..e08c6888cdedc8a99ee8dc60c2438748d7c302e7 100644 (file)
@@ -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;
     }
 
index 0cf2f225f392fe8a5091178c85f752396d7babb9..c3dadd4416b770ece5c83db76517b99c5cf3efa4 100644 (file)
@@ -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;
     }
 
index 6c500b466096444e683608292c8169b0adc0246e..1ce4b6f2f73b926e0f87d38b6aaeee3e962adfaf 100644 (file)
@@ -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;
     }
 
index 3a91ec5a3ed3c616db11bc659eeaefff38011137..52ff013cada36e8506d3d775b08829982e7f0311 100644 (file)
@@ -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;
     }
 
index b205b60b039a8d03f3607c19b10af3f013979da3..fd9683b920b9e5b2b8e315beb1048f3d96bfb004 100644 (file)
@@ -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;
     }
 
index 5218ccb81c36de09548937d7e4690368b59016fd..94853c87b05550374419533f139d1f15bad6e22f 100644 (file)
@@ -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;
     }
 
index 1b2633afe016966532961082c4b3ad1f300d78e6..3f45732bb4438943fd394078af439d6450905046 100644 (file)
@@ -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;
     }
 
index cdf03b283924c047feb170016ef89463d1fbcebe..94f6a3645b76c458c894acdca01e60f71591893c 100644 (file)
@@ -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;
     }
 
index ea1d74d9d08976b42c68bf548adca4eba4893e7e..2cd58e5c2ec1fb6080d46714dc3bcac1a6e7ba45 100644 (file)
@@ -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";
index 00eadd09b3840ca5e290240904b8d1ea40720251..1825b77005ea2c714a81e2ba7cf86954824419d9 100644 (file)
@@ -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);