summaryrefslogtreecommitdiffstats
path: root/runtime/glbl.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-17 09:10:24 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-17 09:10:24 +0100
commitf94a3034b6c2218f51be5ab84bae591269e07215 (patch)
tree687ef09644b4c315790becfff8088a05b1d9896e /runtime/glbl.c
parent4af3a1d72d658a83b6b891ef37b0cd0471ba0e15 (diff)
parent30c2e42ec305bb97bd04172e5c02b89eeea53e35 (diff)
downloadrsyslog-f94a3034b6c2218f51be5ab84bae591269e07215.tar.gz
rsyslog-f94a3034b6c2218f51be5ab84bae591269e07215.tar.xz
rsyslog-f94a3034b6c2218f51be5ab84bae591269e07215.zip
integrating varmojfekoj's "unlimited select()" patch into v4-devel
Diffstat (limited to 'runtime/glbl.c')
-rw-r--r--runtime/glbl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 7fa61963..58558ed2 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -72,6 +72,9 @@ static uchar *pszDfltNetstrmDrvr = NULL; /* module name of default netstream dri
static uchar *pszDfltNetstrmDrvrCAF = NULL; /* default CA file for the netstrm driver */
static uchar *pszDfltNetstrmDrvrKeyFile = NULL; /* default key file for the netstrm driver (server) */
static uchar *pszDfltNetstrmDrvrCertFile = NULL; /* default cert file for the netstrm driver (server) */
+#ifdef USE_UNLIMITED_SELECT
+static int iFdSetSize = howmany(FD_SETSIZE, __NFDBITS) * sizeof (fd_mask); /* size of select() bitmask in bytes */
+#endif
/* define a macro for the simple properties' set and get functions
@@ -104,6 +107,9 @@ SIMP_PROP(DisableDNS, bDisableDNS, int)
SIMP_PROP(LocalDomain, LocalDomain, uchar*)
SIMP_PROP(StripDomains, StripDomains, char**)
SIMP_PROP(LocalHosts, LocalHosts, char**)
+#ifdef USE_UNLIMITED_SELECT
+SIMP_PROP(FdSetSize, iFdSetSize, int)
+#endif
SIMP_PROP_SET(LocalFQDNName, LocalFQDNName, uchar*)
SIMP_PROP_SET(LocalHostName, LocalHostName, uchar*)
@@ -261,6 +267,9 @@ CODESTARTobjQueryInterface(glbl)
SIMP_PROP(DfltNetstrmDrvrCAF)
SIMP_PROP(DfltNetstrmDrvrKeyFile)
SIMP_PROP(DfltNetstrmDrvrCertFile)
+#ifdef USE_UNLIMITED_SELECT
+ SIMP_PROP(FdSetSize)
+#endif
#undef SIMP_PROP
finalize_it:
ENDobjQueryInterface(glbl)
@@ -295,6 +304,9 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
bOptimizeUniProc = 1;
bHUPisRestart = 0;
bPreserveFQDN = 0;
+#ifdef USE_UNLIMITED_SELECT
+ iFdSetSize = howmany(FD_SETSIZE, __NFDBITS) * sizeof (fd_mask);
+#endif
return RS_RET_OK;
}