summaryrefslogtreecommitdiffstats
path: root/plugins/imgssapi
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-17 10:38:46 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-17 10:38:46 +0100
commit0957820a1076d7fcf182ba60c12e5946c193545f (patch)
tree2339489d05441895d1b221cab59fae36816c33eb /plugins/imgssapi
parentc9841fbd368e58674cc166e6186b2a29f9895211 (diff)
parent9e28d47aaa506709a9e80e318527ceb4443cbffe (diff)
downloadrsyslog-0957820a1076d7fcf182ba60c12e5946c193545f.tar.gz
rsyslog-0957820a1076d7fcf182ba60c12e5946c193545f.tar.xz
rsyslog-0957820a1076d7fcf182ba60c12e5946c193545f.zip
Merge branch 'v4-devel'
Conflicts: doc/rsyslog_conf_modules.html gss-misc.c plugins/imgssapi/imgssapi.c plugins/imudp/imudp.c plugins/imuxsock/imuxsock.c runtime/glbl.c runtime/glbl.h runtime/net.c
Diffstat (limited to 'plugins/imgssapi')
-rw-r--r--plugins/imgssapi/imgssapi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c
index 14830ce2..fb3c3536 100644
--- a/plugins/imgssapi/imgssapi.c
+++ b/plugins/imgssapi/imgssapi.c
@@ -57,6 +57,7 @@
#include "netstrm.h"
#include "glbl.h"
#include "debug.h"
+#include "unlimited_select.h"
MODULE_TYPE_INPUT
@@ -415,15 +416,20 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess)
CHKiRet(netstrm.GetSock(pSess->pStrm, &fdSess)); // TODO: method access!
if (allowedMethods & ALLOWEDMETHOD_TCP) {
int len;
- fd_set fds;
struct timeval tv;
+#ifdef USE_UNLIMITED_SELECT
+ fd_set *pFds = malloc(glbl.GetFdSetSize());
+#else
+ fd_set fds;
+ fd_set *pFds = &fds;
+#endif
do {
- FD_ZERO(&fds);
- FD_SET(fdSess, &fds);
+ FD_ZERO(pFds);
+ FD_SET(fdSess, pFds);
tv.tv_sec = 1;
tv.tv_usec = 0;
- ret = select(fdSess + 1, &fds, NULL, NULL, &tv);
+ ret = select(fdSess + 1, pFds, NULL, NULL, &tv);
} while (ret < 0 && errno == EINTR);
if (ret < 0) {
errmsg.LogError(0, RS_RET_ERR, "TCP session %p will be closed, error ignored\n", pSess);
@@ -476,6 +482,8 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess)
pGSess->allowedMethods = ALLOWEDMETHOD_TCP;
ABORT_FINALIZE(RS_RET_OK); // TODO: define good error codes
}
+
+ freeFdSet(pFds);
}
context = &pGSess->gss_context;