]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
json-alert: use getter for appstate 1356/head
authorEric Leblond <eric@regit.org>
Fri, 6 Mar 2015 21:21:12 +0000 (22:21 +0100)
committerEric Leblond <eric@regit.org>
Sat, 7 Mar 2015 09:15:10 +0000 (10:15 +0100)
src/output-json-alert.c

index 22c48963a9d4c027c9e3b22f78209e7204803103..60dbf1fdb6d9f4e0f3bae38b95dd81af2a177293 100644 (file)
@@ -108,7 +108,7 @@ static int AlertJsonPrintStreamSegmentCallback(const Packet *p, void *data, uint
  */
 static void AlertJsonHttp(const Flow *f, json_t *js)
 {
-    HtpState *htp_state = (HtpState *)f->alstate;
+    HtpState *htp_state = (HtpState *)FlowGetAppState(f);
     if (htp_state) {
         uint64_t tx_id = AppLayerParserGetTransactionLogId(f->alparser);
         htp_tx_t *tx = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP, htp_state, tx_id);
@@ -130,7 +130,7 @@ static void AlertJsonHttp(const Flow *f, json_t *js)
 
 static void AlertJsonTls(const Flow *f, json_t *js)
 {
-    SSLState *ssl_state = (SSLState *)f->alstate;
+    SSLState *ssl_state = (SSLState *)FlowGetAppState(f);
     if (ssl_state) {
         json_t *tjs = json_object();
         if (unlikely(tjs == NULL))
@@ -147,7 +147,7 @@ static void AlertJsonTls(const Flow *f, json_t *js)
 
 static void AlertJsonSsh(const Flow *f, json_t *js)
 {
-    SshState *ssh_state = (SshState *)f->alstate;
+    SshState *ssh_state = (SshState *)FlowGetAppState(f);
     if (ssh_state) {
         json_t *tjs = json_object();
         if (unlikely(tjs == NULL))