From bc471f1d9046bf75a2e27d593ce9b13e4094ffdc Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Apr 2009 13:36:44 +0200 Subject: bugfix: $InputTCPMaxSessions config directive was accepted, but not honored This resulted in a fixed upper limit of 200 connections. --- tcpsrv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tcpsrv.c') 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; -- cgit