From: Eric Leblond Date: Wed, 22 Aug 2012 12:24:30 +0000 (+0200) Subject: defrag: Fix unittest logic. X-Git-Tag: suricata-1.4beta1~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2aa0407c4286fe621cb87619f6f8ec007c53342;p=thirdparty%2Fsuricata.git defrag: Fix unittest logic. We've linked the size of hash with trackers. Thus calling DefragInit() after setting the configuration variable is more logic. --- diff --git a/src/defrag.c b/src/defrag.c index 8e69612909..f619638fa2 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -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;