diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-09-13 02:39:42 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-09-13 02:39:42 +0200 |
commit | 7903677bfba6fd897010d9c5dbb56531bfe0d825 (patch) | |
tree | 110e409834bab0fb1edd8f869e911c8d8d510493 /tests/tcpflood.c | |
parent | ad777330629c31447018e47b4033a7ebaa9fe655 (diff) | |
parent | 15921d4e4e9d03e0cfd4ca5a9745c89b5dcd37c3 (diff) | |
download | rsyslog-7903677bfba6fd897010d9c5dbb56531bfe0d825.tar.gz rsyslog-7903677bfba6fd897010d9c5dbb56531bfe0d825.tar.bz2 rsyslog-7903677bfba6fd897010d9c5dbb56531bfe0d825.zip |
Merge branch 'v7-stable' into v7-stable-tlsfix
Conflicts:
ChangeLog
runtime/rsyslog.h
Diffstat (limited to 'tests/tcpflood.c')
-rw-r--r-- | tests/tcpflood.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/tcpflood.c b/tests/tcpflood.c index 4a3199c8..b3cef2e0 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -258,7 +258,7 @@ int openConnections(void) return setupUDP(); if(bShowProgress) - write(1, " open connections", sizeof(" open connections")-1); + if(write(1, " open connections", sizeof(" open connections")-1)){} # ifdef ENABLE_GNUTLS sessArray = calloc(numConnections, sizeof(gnutls_session_t)); # endif @@ -278,7 +278,7 @@ int openConnections(void) } if(bShowProgress) { lenMsg = sprintf(msgBuf, "\r%5.5d open connections\n", i); - write(1, msgBuf, lenMsg); + if(write(1, msgBuf, lenMsg)) {} } return 0; @@ -303,12 +303,12 @@ void closeConnections(void) return; if(bShowProgress) - write(1, " close connections", sizeof(" close connections")-1); + if(write(1, " close connections", sizeof(" close connections")-1)){} for(i = 0 ; i < numConnections ; ++i) { if(i % 10 == 0) { if(bShowProgress) { lenMsg = sprintf(msgBuf, "\r%5.5d", i); - write(1, msgBuf, lenMsg); + if(write(1, msgBuf, lenMsg)){} } } if(sockArray[i] != -1) { @@ -325,7 +325,7 @@ void closeConnections(void) } if(bShowProgress) { lenMsg = sprintf(msgBuf, "\r%5.5d close connections\n", i); - write(1, msgBuf, lenMsg); + if(write(1, msgBuf, lenMsg)){} } } @@ -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); |