summaryrefslogtreecommitdiffstats
path: root/tcpsrv.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-10-15 12:09:37 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-15 12:09:37 +0200
commit0d60901e6e404419b06ad0d20429edf7ea3053ce (patch)
treebffb9ab667312a0e142ba8746b3ec3f3030f50f7 /tcpsrv.c
parent25a8496a6ae79480e8601cbdab5b45ad613a8dcd (diff)
downloadrsyslog-0d60901e6e404419b06ad0d20429edf7ea3053ce.tar.gz
rsyslog-0d60901e6e404419b06ad0d20429edf7ea3053ce.tar.bz2
rsyslog-0d60901e6e404419b06ad0d20429edf7ea3053ce.zip
ratelimit: imtcp (and gssapi) converted to new interface
Diffstat (limited to 'tcpsrv.c')
-rw-r--r--tcpsrv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tcpsrv.c b/tcpsrv.c
index bf12f1fa..6b134017 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -72,6 +72,7 @@
#include "nspoll.h"
#include "errmsg.h"
#include "ruleset.h"
+#include "ratelimit.h"
#include "unicode-helper.h"
@@ -151,6 +152,7 @@ addNewLstnPort(tcpsrv_t *pThis, uchar *pszPort, int bSuppOctetFram)
snprintf((char*)statname, sizeof(statname), "%s(%s)", pThis->pszInputName, pszPort);
statname[sizeof(statname)-1] = '\0'; /* just to be on the save side... */
CHKiRet(statsobj.SetName(pEntry->stats, statname));
+ CHKiRet(ratelimitNew(&pEntry->ratelimiter));
STATSCOUNTER_INIT(pEntry->ctrSubmit, pEntry->mutCtrSubmit);
CHKiRet(statsobj.AddCounter(pEntry->stats, UCHAR_CONSTANT("submitted"),
ctrType_IntCtr, &(pEntry->ctrSubmit)));
@@ -295,6 +297,7 @@ static void deinit_tcp_listener(tcpsrv_t *pThis)
while(pEntry != NULL) {
free(pEntry->pszPort);
prop.Destruct(&pEntry->pInputName);
+ ratelimitDestruct(pEntry->ratelimiter);
pDel = pEntry;
pEntry = pEntry->pNext;
free(pDel);