]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
tx-logger: speed up
authorVictor Julien <victor@inliniac.net>
Wed, 15 Jan 2014 13:25:32 +0000 (14:25 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Jan 2014 14:20:59 +0000 (15:20 +0100)
By bailing out early in case no logger is enabled for the protocol,
a significant speed up is reached.

src/output-tx.c

index e9b7643bf6ce14e113980630cbe05e3463d1f297..0293775f69d6efd69ecfa9b139cc8e7c1acfc0da 100644 (file)
@@ -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) {