summaryrefslogtreecommitdiffstats
path: root/tests/tcpflood.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-01-14 08:40:33 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-01-14 08:40:33 +0100
commit88020b001b4e0c852bab39ecb63a2d40ed354558 (patch)
tree83857f25168e90cb0570b7017c67b3751542e8a2 /tests/tcpflood.c
parent614b1fba0a56629579ec9bf1cc07cc19bba35e0c (diff)
parentd435d3426f69af5a90cdac5fa64fd91841b844ea (diff)
downloadrsyslog-88020b001b4e0c852bab39ecb63a2d40ed354558.tar.gz
rsyslog-88020b001b4e0c852bab39ecb63a2d40ed354558.tar.bz2
rsyslog-88020b001b4e0c852bab39ecb63a2d40ed354558.zip
Merge branch 'v5-stable' into v7-stable
Diffstat (limited to 'tests/tcpflood.c')
-rw-r--r--tests/tcpflood.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tcpflood.c b/tests/tcpflood.c
index 8fd347f1..4a3199c8 100644
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -429,6 +429,8 @@ int sendMessages(struct instdata *inst)
}
}
genMsg(buf, sizeof(buf), &lenBuf, inst); /* generate the message to send according to params */
+ if(lenBuf == 0)
+ break; /* terminate when no message could be generated */
if(transport == TP_TCP) {
if(sockArray[socknum] == -1) {
/* connection was dropped, need to re-establish */