Enable configuration of INET_SUSPEND_TIME from build system

When sysklogd is built with SYSLOG_INET the user can now optionally also
define the INET_SUSPEND_TIME.  The default is 180 sec, which may be a
bit too long for some systems.

In practice when a system comes up syslogd+klogd starts before all other
processes, even those that bring up the network, so waiting 3 minutes
before trying again to send to a remote syslog server would mean losing
a lot of info from the bootstrapping of a system.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2018-08-02 15:40:59 +02:00
parent a09150a061
commit f4110c8571
1 changed files with 2 additions and 0 deletions

View File

@ -715,7 +715,9 @@ int repeatinterval[] = { 30, 60 }; /* # of secs before flush */
(f)->f_repeatcount = MAXREPEAT; \
}
#ifdef SYSLOG_INET
#ifndef INET_SUSPEND_TIME
#define INET_SUSPEND_TIME 180 /* equal to 3 minutes */
#endif
#define INET_RETRY_MAX 10 /* maximum of retries for getaddrinfo() */
#endif