From 4406edb6497bb1fe1a5c194e47d54e6f7fc44774 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 10 Jan 2011 14:32:23 +0100 Subject: fixed regression in tcpflood multiple rounds in single-threaded mode did not work --- tests/tcpflood.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/tcpflood.c') diff --git a/tests/tcpflood.c b/tests/tcpflood.c index 179bbda5..a17c5fbb 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -480,15 +480,16 @@ prepareGenerators() if(runMultithreaded) { bSilent = 1; numThrds = numConnections; - runningThreads = 0; - doRun = 0; - pthread_mutex_init(&thrdMgmt, NULL); - pthread_cond_init(&condStarted, NULL); - pthread_cond_init(&condDoRun, NULL); } else { numThrds = 1; } + runningThreads = 0; + doRun = 0; + pthread_mutex_init(&thrdMgmt, NULL); + pthread_cond_init(&condStarted, NULL); + pthread_cond_init(&condDoRun, NULL); + if(instarray != NULL) { free(instarray); } -- cgit