From 38249398a3d0b26bae8dc25fee7c91a9a65f444c Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 15 Jan 2014 14:25:32 +0100 Subject: [PATCH] tx-logger: speed up By bailing out early in case no logger is enabled for the protocol, a significant speed up is reached. --- src/output-tx.c | 2 ++ 1 file changed, 2 insertions(+) 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) {