summaryrefslogtreecommitdiffstats
path: root/tcpsrv.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-04-09 13:36:44 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-04-09 13:36:44 +0200
commitbc471f1d9046bf75a2e27d593ce9b13e4094ffdc (patch)
tree7ac9b6f0f3e21bba00f86ccf354014c5babc5c15 /tcpsrv.c
parent5e4fc93dd523f209f78cef8a231e24975910e5ca (diff)
downloadrsyslog-bc471f1d9046bf75a2e27d593ce9b13e4094ffdc.tar.gz
rsyslog-bc471f1d9046bf75a2e27d593ce9b13e4094ffdc.tar.xz
rsyslog-bc471f1d9046bf75a2e27d593ce9b13e4094ffdc.zip
bugfix: $InputTCPMaxSessions config directive was accepted, but not honored
This resulted in a fixed upper limit of 200 connections.
Diffstat (limited to 'tcpsrv.c')
-rw-r--r--tcpsrv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tcpsrv.c b/tcpsrv.c
index 85b34947..7f72cf1e 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -703,6 +703,20 @@ SetDrvrPermPeers(tcpsrv_t *pThis, permittedPeers_t *pPermPeers)
* -------------------------------------------------------------------------- */
+/* set max number of sessions
+ * this must be called before ConstructFinalize, or it will have no effect!
+ * rgerhards, 2009-04-09
+ */
+static rsRetVal
+SetSessMax(tcpsrv_t *pThis, int iMax)
+{
+ DEFiRet;
+ ISOBJ_TYPE_assert(pThis, tcpsrv);
+ pThis->iSessMax = iMax;
+ RETiRet;
+}
+
+
/* queryInterface function
* rgerhards, 2008-02-29
*/
@@ -728,6 +742,7 @@ CODESTARTobjQueryInterface(tcpsrv)
pIf->Run = Run;
pIf->SetUsrP = SetUsrP;
+ pIf->SetSessMax = SetSessMax;
pIf->SetDrvrMode = SetDrvrMode;
pIf->SetDrvrAuthMode = SetDrvrAuthMode;
pIf->SetDrvrPermPeers = SetDrvrPermPeers;