summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-29 11:37:29 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-29 11:37:29 +0200
commit4822715a6e1ecc48d50a5450f93f02f785b8745a (patch)
tree6597c734b5bcddb963c1cccaed29ec5289ae87a6
parent6a29afc83f16c57d243b39b8e8d47f2ed909bae0 (diff)
downloadrsyslog-4822715a6e1ecc48d50a5450f93f02f785b8745a.tar.gz
rsyslog-4822715a6e1ecc48d50a5450f93f02f785b8745a.tar.xz
rsyslog-4822715a6e1ecc48d50a5450f93f02f785b8745a.zip
updated testbench to new init() behavior
the deferred activation of input modules broke part of the testbench - but this was a testbench issue, not one of the patch
-rw-r--r--ChangeLog2
-rw-r--r--tests/nettester.c18
2 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d7c6e408..2c4d1145 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
---------------------------------------------------------------------------
Version 4.5.0 [DEVEL] (rgerhards), 2009-??-??
+- activation order of inputs changed, they are now activated only after
+ privileges are dropped. Thanks to Michael Terry for the patch.
- greatly improved performance
- greatly reduced memory requirements of msg object
to around half of the previous demand. This means that more messages can
diff --git a/tests/nettester.c b/tests/nettester.c
index b8816b7c..c9a978c5 100644
--- a/tests/nettester.c
+++ b/tests/nettester.c
@@ -107,6 +107,7 @@ tcpSend(char *buf, int lenBuf)
{
static int sock = INVALID_SOCKET;
struct sockaddr_in addr;
+ int retries;
if(sock == INVALID_SOCKET) {
/* first time, need to connect to target */
@@ -122,10 +123,19 @@ tcpSend(char *buf, int lenBuf)
fprintf(stderr, "inet_aton() failed\n");
return(1);
}
- if(connect(sock, (struct sockaddr*)&addr, sizeof(addr)) != 0) {
- fprintf(stderr, "connect() failed\n");
- return(1);
- }
+ retries = 0;
+ while(1) { /* loop broken inside */
+ if(connect(sock, (struct sockaddr*)&addr, sizeof(addr)) == 0) {
+ break;
+ } else {
+ if(retries++ == 3) {
+ fprintf(stderr, "connect() failed\n");
+ return(1);
+ } else {
+ sleep(1);
+ }
+ }
+ }
}
/* send test data */