]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve: fix context datatype used in init functions
authorJason Ish <ish@unx.ca>
Tue, 19 Dec 2017 21:49:27 +0000 (15:49 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 20 Dec 2017 15:01:19 +0000 (16:01 +0100)
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.

src/output-json-dnp3.c
src/output-json-drop.c
src/output-json-nfs.c
src/output-json-stats.c
src/output-json-template.c
src/output-json.h

index 1691b664b9f1afbb8add54b9c91686d668876ec9..45efbfc771e49a2baf92573b1d5b1d47e9ffa0c4 100644 (file)
@@ -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)) {
index 471a2c5de86d7699645c53bef7d7dffc64c0d975..38065f700e4c02f0653d52b5701b8396ad46333a 100644 (file)
@@ -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)
index 2515605964dc6655e2fbc39b82cb9c079358eba5..1087fe76c92af2bfd049e77ee2437d5ce1cc3429 100644 (file)
@@ -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)) {
index 1e3dc8dc9a9bd81045ea4edeb21b8b5216a9b42f..b42030cf0a69da8bc2534541ee93d8ceb1809bbc 100644 (file)
@@ -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))
index 6ff28f1a0807a0f1b0da08c08de716faab438738..17fd6dfd3d357c18608e5a7b5af90f5c23f9ef10 100644 (file)
@@ -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)) {
index 2386224e5a46719fa2c828adf6e0b48b64dc2892..fcd98538c2b160c76b997cbe33b283fdcd4ac911 100644 (file)
@@ -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 */