From 16884a0dead935e515cd199dcb1a161f1e55846d Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Thu, 15 Sep 2011 18:39:06 +0530 Subject: [PATCH] refix failing unittest --- src/flow.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/flow.c b/src/flow.c index fd23856a09..df38578f50 100644 --- a/src/flow.c +++ b/src/flow.c @@ -599,12 +599,14 @@ static int FlowPrune(FlowQueue *q, struct timeval *ts, int try_cnt) continue; } -#ifndef UNITTESTS - if (FlowForceReassemblyForFlowV2(f) == 1) { - Flow *prev_f = f; - f = f->lnext; - SCMutexUnlock(&prev_f->m); - continue; +#ifdef UNITTESTS + if (run_mode != RUNMODE_UNITTEST) { + if (FlowForceReassemblyForFlowV2(f) == 1) { + Flow *prev_f = f; + f = f->lnext; + SCMutexUnlock(&prev_f->m); + continue; + } } #endif