From: Victor Julien Date: Wed, 15 Jan 2014 13:25:32 +0000 (+0100) Subject: tx-logger: speed up X-Git-Tag: suricata-2.0rc1~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38249398a3d0b26bae8dc25fee7c91a9a65f444c;p=thirdparty%2Fsuricata.git tx-logger: speed up By bailing out early in case no logger is enabled for the protocol, a significant speed up is reached. --- diff --git a/src/output-tx.c b/src/output-tx.c index e9b7643bf6..0293775f69 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -103,6 +103,8 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQ if (AppLayerParserProtocolIsTxAware(p->proto, alproto) == 0) goto end; + if (AppLayerParserProtocolHasLogger(p->proto, alproto) == 0) + goto end; void *alstate = f->alstate;//AppLayerGetProtoStateFromPacket((const Packet *)p); if (alstate == NULL) {