Module specific error code for init ctx error.

pull/2028/head
maxtors 9 years ago committed by Victor Julien
parent 69863f7b1c
commit 06d74b5775

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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";

@ -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);

Loading…
Cancel
Save