summaryrefslogtreecommitdiffstats
path: root/omfwd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-02 13:22:23 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-02 13:22:23 +0000
commit2b2cdb5a6c2e8659771451571c77844488c6fa92 (patch)
tree003a80adf06626daaa4effa81fe63a50383642b0 /omfwd.c
parent9f7b03b801ed82e499666e5c29b4dda094fb1d57 (diff)
downloadrsyslog-2b2cdb5a6c2e8659771451571c77844488c6fa92.tar.gz
rsyslog-2b2cdb5a6c2e8659771451571c77844488c6fa92.tar.xz
rsyslog-2b2cdb5a6c2e8659771451571c77844488c6fa92.zip
added tryResume() API to module interface
Diffstat (limited to 'omfwd.c')
-rw-r--r--omfwd.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/omfwd.c b/omfwd.c
index 0a7fa0c8..a3770cad 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -56,6 +56,23 @@
#include "tcpsyslog.h"
#include "module-template.h"
+#ifdef SYSLOG_INET
+#define INET_SUSPEND_TIME 60 /* equal to 1 minute
+ * rgerhards, 2005-07-26: This was 3 minutes. As the
+ * same timer is used for tcp based syslog, we have
+ * reduced it. However, it might actually be worth
+ * thinking about a buffered tcp sender, which would be
+ * a much better alternative. When that happens, this
+ * time here can be re-adjusted to 3 minutes (or,
+ * even better, made configurable).
+ */
+#define INET_RETRY_MAX 30 /* maximum of retries for gethostbyname() */
+ /* was 10, changed to 30 because we reduced INET_SUSPEND_TIME by one third. So
+ * this "fixes" some of implications of it (see comment on INET_SUSPEND_TIME).
+ * rgerhards, 2005-07-26
+ */
+#endif
+
/*
* This table contains plain text for h_errno errors used by the
* net subsystem.
@@ -525,6 +542,10 @@ static char *getFwdSyslogPt(instanceData *pData)
}
+BEGINtryResume
+CODESTARTtryResume
+ENDtryResume
+
BEGINdoAction
char *psz; /* temporary buffering */
register unsigned l;