From: Victor Julien Date: Fri, 7 Feb 2014 10:04:32 +0000 (+0100) Subject: app-layer: fix AppLayerParserProtocolIsTxEventAware X-Git-Tag: suricata-2.0rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F831%2Fhead;p=thirdparty%2Fsuricata.git app-layer: fix AppLayerParserProtocolIsTxEventAware 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. --- diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index b33a0144f7..2665648739 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -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); }