summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-01-10 14:32:23 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-01-10 14:32:23 +0100
commit4406edb6497bb1fe1a5c194e47d54e6f7fc44774 (patch)
tree63c19d096d3442b533946558e1bfc13b98f157b7 /tests
parent1a6b71dff28704e817dfacc1583c1b00bfabaf3e (diff)
downloadrsyslog-4406edb6497bb1fe1a5c194e47d54e6f7fc44774.tar.gz
rsyslog-4406edb6497bb1fe1a5c194e47d54e6f7fc44774.tar.xz
rsyslog-4406edb6497bb1fe1a5c194e47d54e6f7fc44774.zip
fixed regression in tcpflood
multiple rounds in single-threaded mode did not work
Diffstat (limited to 'tests')
-rw-r--r--tests/tcpflood.c11
1 files changed, 6 insertions, 5 deletions
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);
}