]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: fix AppLayerParserProtocolIsTxEventAware 831/head
authorVictor Julien <victor@inliniac.net>
Fri, 7 Feb 2014 10:04:32 +0000 (11:04 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 7 Feb 2014 11:47:01 +0000 (12:47 +0100)
AppLayerParserProtocolIsTxEventAware would check if a proto is tx
event aware by checking if it had registered a StateHasEvents function.
However, this is an optimization function. This patch changes it to
use the StateGetEvents function instead, which is a better indicator.

src/app-layer-parser.c

index b33a0144f7b2a1ac797f1905e239d172299c4d8e..2665648739d46ee1276996136c3ff175a6c5b25d 100644 (file)
@@ -931,7 +931,7 @@ int AppLayerParserProtocolIsTxEventAware(uint8_t ipproto, AppProto alproto)
 {
     SCEnter();
     int ipproto_map = FlowGetProtoMapping(ipproto);
-    int r = (alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ? 0 : 1;
+    int r = (alp_ctx.ctxs[ipproto_map][alproto].StateGetEvents == NULL) ? 0 : 1;
     SCReturnInt(r);
 }