summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-04-09 13:41:38 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-04-09 13:41:38 +0200
commit0cade5118fbf6b7af6f34b53255e4e73b9578176 (patch)
treeef89b3b3ac9a9314848fcc1895cc8fc3900e4f07
parent0550512b28049c391be424ad518ed0debb77089e (diff)
parentbc471f1d9046bf75a2e27d593ce9b13e4094ffdc (diff)
downloadrsyslog-0cade5118fbf6b7af6f34b53255e4e73b9578176.tar.gz
rsyslog-0cade5118fbf6b7af6f34b53255e4e73b9578176.tar.xz
rsyslog-0cade5118fbf6b7af6f34b53255e4e73b9578176.zip
Merge branch 'v3-stable' into beta
Conflicts: ChangeLog
-rw-r--r--ChangeLog11
-rw-r--r--plugins/imtcp/imtcp.c1
-rw-r--r--runtime/msg.c2
-rw-r--r--tcpsrv.c15
-rw-r--r--tcpsrv.h4
5 files changed, 32 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e22fee6c..ef85dca9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------
+Version 3.22.0 [v3-stable] (rgerhards), 2009-04-??
+- bugfix: $InputTCPMaxSessions config directive was accepted, but not
+ honored. This resulted in a fixed upper limit of 200 connections.
+---------------------------------------------------------------------------
Version 3.21.11 [BETA] (rgerhards), 2009-04-03
- build system improvements contributed by Michael Biebl - thx!
- all patches from 3.20.5 incorporated (see it's ChangeLog entry)
@@ -150,6 +154,10 @@ Version 3.21.0 [DEVEL] (rgerhards), 2008-07-18
- imported all changes from 3.18.1 until today (some quite important,
see below)
---------------------------------------------------------------------------
+Version 3.20.6 [v3-stable] (rgerhards), 2009-04-??
+- bugfix: $InputTCPMaxSessions config directive was accepted, but not
+ honored. This resulted in a fixed upper limit of 200 connections.
+---------------------------------------------------------------------------
Version 3.20.5 [v3-stable] (rgerhards), 2009-04-02
- bugfix: potential abort with DA queue after high watermark is reached
There exists a race condition that can lead to a segfault. Thanks
@@ -1085,6 +1093,9 @@ Version 2.0.7 V2-STABLE (rgerhards), 2008-??-??
The actual code change is heavily based on William's patch.
- bugfix: memory leak in ompgsql
Thanks to Ken for providing the patch
+- bugfix: potential memory leak in msg.c
+ This one did not surface yet and the issue was actually found due to
+ a problem in v4 - but better fix it here, too
---------------------------------------------------------------------------
Version 2.0.6 V2-STABLE (rgerhards), 2008-08-07
- bugfix: memory leaks in rsyslogd, primarily in singlethread mode
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index 89f1dbcf..7b3eeda5 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -160,6 +160,7 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa
if(pOurTcpsrv == NULL) {
CHKiRet(tcpsrv.Construct(&pOurTcpsrv));
+ CHKiRet(tcpsrv.SetSessMax(pOurTcpsrv, iTCPSessMax));
CHKiRet(tcpsrv.SetCBIsPermittedHost(pOurTcpsrv, isPermittedHost));
CHKiRet(tcpsrv.SetCBRcvData(pOurTcpsrv, doRcvData));
CHKiRet(tcpsrv.SetCBOpenLstnSocks(pOurTcpsrv, doOpenLstnSocks));
diff --git a/runtime/msg.c b/runtime/msg.c
index b995ac53..2b58eb88 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1489,6 +1489,8 @@ void MsgAssignHOSTNAME(msg_t *pMsg, char *pBuf)
{
assert(pMsg != NULL);
assert(pBuf != NULL);
+ if(pMsg->pszHOSTNAME != NULL)
+ free(pMsg->pszHOSTNAME);
pMsg->iLenHOSTNAME = strlen(pBuf);
pMsg->pszHOSTNAME = (uchar*) pBuf;
}
diff --git a/tcpsrv.c b/tcpsrv.c
index 885edba3..107d03f4 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -702,6 +702,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
*/
@@ -727,6 +741,7 @@ CODESTARTobjQueryInterface(tcpsrv)
pIf->Run = Run;
pIf->SetUsrP = SetUsrP;
+ pIf->SetSessMax = SetSessMax;
pIf->SetDrvrMode = SetDrvrMode;
pIf->SetDrvrAuthMode = SetDrvrAuthMode;
pIf->SetDrvrPermPeers = SetDrvrPermPeers;
diff --git a/tcpsrv.h b/tcpsrv.h
index 01110866..280f5083 100644
--- a/tcpsrv.h
+++ b/tcpsrv.h
@@ -79,8 +79,10 @@ BEGINinterface(tcpsrv) /* name must also be changed in ENDinterface macro! */
rsRetVal (*SetCBOnSessAccept)(tcpsrv_t*, rsRetVal (*) (tcpsrv_t*, tcps_sess_t*));
rsRetVal (*SetCBOnSessDestruct)(tcpsrv_t*, rsRetVal (*) (void*));
rsRetVal (*SetCBOnSessConstructFinalize)(tcpsrv_t*, rsRetVal (*) (void*));
+ /* added v4 */
+ rsRetVal (*SetSessMax)(tcpsrv_t *pThis, int iMaxSess); /* 2009-04-09 */
ENDinterface(tcpsrv)
-#define tcpsrvCURR_IF_VERSION 3 /* increment whenever you change the interface structure! */
+#define tcpsrvCURR_IF_VERSION 4 /* increment whenever you change the interface structure! */
/* prototypes */