]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
defrag: Fix unittest logic.
authorEric Leblond <eric@regit.org>
Wed, 22 Aug 2012 12:24:30 +0000 (14:24 +0200)
committerEric Leblond <eric@regit.org>
Wed, 22 Aug 2012 12:31:04 +0000 (14:31 +0200)
We've linked the size of hash with trackers. Thus calling DefragInit()
after setting the configuration variable is more logic.

src/defrag.c

index 8e6961290947355091dd3a67b6bade0b1d249219..f619638fa2f4d5f1d829f5ee1d42d141094f738a 100644 (file)
@@ -2411,14 +2411,14 @@ DefragTimeoutTest(void)
     int ret = 0;
     DefragContext *dc = NULL;
 
-    DefragInit();
-
     /* Setup a small numberr of trackers. */
     if (ConfSet("defrag.trackers", "16", 1) != 1) {
         printf("ConfSet failed: ");
         goto end;
     }
 
+    DefragInit();
+
     dc = DefragContextNew();
     if (dc == NULL)
         goto end;