From: Jason Ish Date: Tue, 19 Dec 2017 21:49:27 +0000 (-0600) Subject: eve: fix context datatype used in init functions X-Git-Tag: suricata-4.1.0-beta1~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4d30ddaf98e4f52878f165a8bfdf58e2b7c3bbd;p=thirdparty%2Fsuricata.git eve: fix context datatype used in init functions Many were using AlertJsonThread instead of OutputJsonCtx, but as the datatypes were similar enough no harm was done. Now that they are using their proper datatype, removed AlertJsonThread from output.h as its no longer used. --- diff --git a/src/output-json-dnp3.c b/src/output-json-dnp3.c index 1691b664b9..45efbfc771 100644 --- a/src/output-json-dnp3.c +++ b/src/output-json-dnp3.c @@ -364,7 +364,7 @@ static void OutputDNP3LogDeInitCtxSub(OutputCtx *output_ctx) static OutputCtx *OutputDNP3LogInitSub(ConfNode *conf, OutputCtx *parent_ctx) { - AlertJsonThread *ajt = parent_ctx->data; + OutputJsonCtx *ajt = parent_ctx->data; LogDNP3FileCtx *dnp3log_ctx = SCCalloc(1, sizeof(*dnp3log_ctx)); if (unlikely(dnp3log_ctx == NULL)) { diff --git a/src/output-json-drop.c b/src/output-json-drop.c index 471a2c5de8..38065f700e 100644 --- a/src/output-json-drop.c +++ b/src/output-json-drop.c @@ -312,7 +312,7 @@ static OutputCtx *JsonDropLogInitCtxSub(ConfNode *conf, OutputCtx *parent_ctx) return NULL; } - AlertJsonThread *ajt = parent_ctx->data; + OutputJsonCtx *ajt = parent_ctx->data; JsonDropOutputCtx *drop_ctx = SCCalloc(1, sizeof(*drop_ctx)); if (drop_ctx == NULL) diff --git a/src/output-json-nfs.c b/src/output-json-nfs.c index 2515605964..1087fe76c9 100644 --- a/src/output-json-nfs.c +++ b/src/output-json-nfs.c @@ -136,7 +136,7 @@ static void OutputNFSLogDeInitCtxSub(OutputCtx *output_ctx) static OutputCtx *OutputNFSLogInitSub(ConfNode *conf, OutputCtx *parent_ctx) { - AlertJsonThread *ajt = parent_ctx->data; + OutputJsonCtx *ajt = parent_ctx->data; LogNFSFileCtx *nfslog_ctx = SCCalloc(1, sizeof(*nfslog_ctx)); if (unlikely(nfslog_ctx == NULL)) { diff --git a/src/output-json-stats.c b/src/output-json-stats.c index 1e3dc8dc9a..b42030cf0a 100644 --- a/src/output-json-stats.c +++ b/src/output-json-stats.c @@ -440,7 +440,7 @@ static void OutputStatsLogDeinitSub(OutputCtx *output_ctx) static OutputCtx *OutputStatsLogInitSub(ConfNode *conf, OutputCtx *parent_ctx) { - AlertJsonThread *ajt = parent_ctx->data; + OutputJsonCtx *ajt = parent_ctx->data; OutputStatsCtx *stats_ctx = SCMalloc(sizeof(OutputStatsCtx)); if (unlikely(stats_ctx == NULL)) diff --git a/src/output-json-template.c b/src/output-json-template.c index 6ff28f1a08..17fd6dfd3d 100644 --- a/src/output-json-template.c +++ b/src/output-json-template.c @@ -125,7 +125,7 @@ static void OutputTemplateLogDeInitCtxSub(OutputCtx *output_ctx) static OutputCtx *OutputTemplateLogInitSub(ConfNode *conf, OutputCtx *parent_ctx) { - AlertJsonThread *ajt = parent_ctx->data; + OutputJsonCtx *ajt = parent_ctx->data; LogTemplateFileCtx *templatelog_ctx = SCCalloc(1, sizeof(*templatelog_ctx)); if (unlikely(templatelog_ctx == NULL)) { diff --git a/src/output-json.h b/src/output-json.h index 2386224e5a..fcd98538c2 100644 --- a/src/output-json.h +++ b/src/output-json.h @@ -59,11 +59,6 @@ typedef struct OutputJsonCtx_ { enum JsonFormat format; } OutputJsonCtx; -typedef struct AlertJsonThread_ { - /** LogFileCtx has the pointer to the file and a mutex to allow multithreading */ - LogFileCtx *file_ctx; -} AlertJsonThread; - json_t *SCJsonBool(int val); #endif /* HAVE_LIBJANSSON */