summaryrefslogtreecommitdiffstats
path: root/runtime/glbl.c
diff options
context:
space:
mode:
authorvarmojfekoj <theinric@redhat.com>2009-11-17 09:00:01 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-17 09:00:01 +0100
commit30c2e42ec305bb97bd04172e5c02b89eeea53e35 (patch)
tree9a4752ef46da708ff1e6172376851d16a8c68bf8 /runtime/glbl.c
parentc104eea4e5d0aeb4c87ee23fab8532530d5fe0e9 (diff)
downloadrsyslog-30c2e42ec305bb97bd04172e5c02b89eeea53e35.tar.gz
rsyslog-30c2e42ec305bb97bd04172e5c02b89eeea53e35.tar.xz
rsyslog-30c2e42ec305bb97bd04172e5c02b89eeea53e35.zip
added option to use unlimited-size select() calls
Thanks to varmjofekoj for the patch Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
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 28f14320..a443b948 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -68,6 +68,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
@@ -100,6 +103,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*)
@@ -217,6 +223,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)
@@ -251,6 +260,9 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
bOptimizeUniProc = 1;
bHUPisRestart = 1;
bPreserveFQDN = 0;
+#ifdef USE_UNLIMITED_SELECT
+ iFdSetSize = howmany(FD_SETSIZE, __NFDBITS) * sizeof (fd_mask);
+#endif
return RS_RET_OK;
}