From 17d48fc49986af1e8e1cc2150213fe4f6111d7c6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sun, 13 Jan 2013 12:14:58 +0100 Subject: added capability to output thread-id-to-function debug info This is a useful debug aid, but nothing of concern for regular users. --- tests/tcpflood.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/tcpflood.c') diff --git a/tests/tcpflood.c b/tests/tcpflood.c index c3e5b57e..b3cef2e0 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -347,7 +347,7 @@ genMsg(char *buf, size_t maxBuf, int *pLenBuf, struct instdata *inst) /* get message from file */ do { done = 1; - *pLenBuf = fread(buf, 1, 1024, dataFP); + *pLenBuf = fread(buf, 1, MAX_EXTRADATA_LEN + 1024, dataFP); if(*pLenBuf == 0) { if(--numFileIterations > 0) { rewind(dataFP); @@ -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 */ -- cgit v1.2.3