diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-13 12:14:58 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-13 12:14:58 +0100 |
commit | 17d48fc49986af1e8e1cc2150213fe4f6111d7c6 (patch) | |
tree | ed8d4b549bf8a595a03355f9f7996dfe408faee3 /tests/tcpflood.c | |
parent | 25dd212bd0bbd68edf774221429bc59001794a7e (diff) | |
download | rsyslog-17d48fc49986af1e8e1cc2150213fe4f6111d7c6.tar.gz rsyslog-17d48fc49986af1e8e1cc2150213fe4f6111d7c6.tar.bz2 rsyslog-17d48fc49986af1e8e1cc2150213fe4f6111d7c6.zip |
added capability to output thread-id-to-function debug info
This is a useful debug aid, but nothing of concern for regular users.
Diffstat (limited to 'tests/tcpflood.c')
-rw-r--r-- | tests/tcpflood.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 */ |