summaryrefslogtreecommitdiffstats
path: root/tcpsrv.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-03-14 13:51:18 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-03-14 13:51:18 +0100
commit7d516b0a6c46177c18aea30b4617f1d2712d48fd (patch)
tree34332bbd36a1cff4fa7c1d5c7a9696672889017b /tcpsrv.c
parente482c13b50b8723f433bc3ff594f28cb2a070818 (diff)
downloadrsyslog-7d516b0a6c46177c18aea30b4617f1d2712d48fd.tar.gz
rsyslog-7d516b0a6c46177c18aea30b4617f1d2712d48fd.tar.xz
rsyslog-7d516b0a6c46177c18aea30b4617f1d2712d48fd.zip
added missing initialization of stats counters
this was necessary due to refactoring of the stats subsystem ... but should have been done in the first place when this code was written. Thanks to Kaiwang Chen for his analysis of the stats subsystem, which ultimately lead to this patch!
Diffstat (limited to 'tcpsrv.c')
-rw-r--r--tcpsrv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tcpsrv.c b/tcpsrv.c
index 86175ff4..dcf407c0 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -128,6 +128,7 @@ addNewLstnPort(tcpsrv_t *pThis, uchar *pszPort)
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));
+ STATSCOUNTER_INIT(pEntry->ctrSubmit, pEntry->mutCtrSubmit);
CHKiRet(statsobj.AddCounter(pEntry->stats, UCHAR_CONSTANT("submitted"),
ctrType_IntCtr, &(pEntry->ctrSubmit)));
CHKiRet(statsobj.ConstructFinalize(pEntry->stats));