summaryrefslogtreecommitdiffstats
path: root/plugins/imgssapi/imgssapi.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-09-15 15:17:47 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-09-15 15:17:47 +0200
commit1d0e4ba3b34464343c388ccef3ca8b08df42076a (patch)
treed17f746f7c8cb2f00aa3ab956740fd616e2390c0 /plugins/imgssapi/imgssapi.c
parentb7e69a240037277e77685af5ea5623cdd89ec2d2 (diff)
parent11ee5cbdfb08ba3e42a853c08144fa24cd55d6da (diff)
downloadrsyslog-1d0e4ba3b34464343c388ccef3ca8b08df42076a.tar.gz
rsyslog-1d0e4ba3b34464343c388ccef3ca8b08df42076a.tar.bz2
rsyslog-1d0e4ba3b34464343c388ccef3ca8b08df42076a.zip
Merge branch 'v4-stable' of git+ssh://git.adiscon.com/git/rsyslog into v4-stable
Diffstat (limited to 'plugins/imgssapi/imgssapi.c')
-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 d8791880..1aad6622 100644
--- a/plugins/imgssapi/imgssapi.c
+++ b/plugins/imgssapi/imgssapi.c
@@ -56,6 +56,7 @@
#include "errmsg.h"
#include "netstrm.h"
#include "glbl.h"
+#include "unlimited_select.h"
MODULE_TYPE_INPUT
@@ -414,15 +415,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);
@@ -475,6 +481,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;