]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix PmqSetup calls in Liveswap thread init. Func was out of sync with normal thread...
authorVictor Julien <victor@inliniac.net>
Wed, 10 Apr 2013 08:06:30 +0000 (10:06 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 10 Apr 2013 08:06:30 +0000 (10:06 +0200)
src/detect-engine.c

index 11a06d969cd24e3a66eab50d9a1bfb38d8bb8c57..02aade3e298d2365d8d316f81d4493172cd06c67 100644 (file)
@@ -1074,12 +1074,9 @@ TmEcode DetectEngineThreadCtxInit(ThreadVars *tv, void *initdata, void **data) {
     PatternMatchThreadPrepare(&det_ctx->mtcs, de_ctx->mpm_matcher, DetectContentMaxId(de_ctx));
     PatternMatchThreadPrepare(&det_ctx->mtcu, de_ctx->mpm_matcher, DetectUricontentMaxId(de_ctx));
 
-    //PmqSetup(&det_ctx->pmq, DetectEngineGetMaxSigId(de_ctx), DetectContentMaxId(de_ctx));
     PmqSetup(&det_ctx->pmq, 0, de_ctx->max_fp_id);
-    //PmqSetup(&det_ctx->pmq, 0, DetectContentMaxId(de_ctx));
     int i;
     for (i = 0; i < 256; i++) {
-        //PmqSetup(&det_ctx->smsg_pmq[i], 0, DetectContentMaxId(de_ctx));
         PmqSetup(&det_ctx->smsg_pmq[i], 0, de_ctx->max_fp_id);
     }
 
@@ -1163,11 +1160,10 @@ static TmEcode DetectEngineThreadCtxInitForLiveRuleSwap(ThreadVars *tv, void *in
     PatternMatchThreadPrepare(&det_ctx->mtcs, de_ctx->mpm_matcher, DetectContentMaxId(de_ctx));
     PatternMatchThreadPrepare(&det_ctx->mtcu, de_ctx->mpm_matcher, DetectUricontentMaxId(de_ctx));
 
-    //PmqSetup(&det_ctx->pmq, DetectEngineGetMaxSigId(de_ctx), DetectContentMaxId(de_ctx));
-    PmqSetup(&det_ctx->pmq, 0, DetectContentMaxId(de_ctx));
+    PmqSetup(&det_ctx->pmq, 0, de_ctx->max_fp_id);
     int i;
     for (i = 0; i < 256; i++) {
-        PmqSetup(&det_ctx->smsg_pmq[i], 0, DetectContentMaxId(de_ctx));
+        PmqSetup(&det_ctx->smsg_pmq[i], 0, de_ctx->max_fp_id);
     }
 
     /* IP-ONLY */