diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 13:53:25 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 13:53:25 +0100 |
commit | 1d0dec9b0cf1203dec0cacc0c6eb38d2ac9271ea (patch) | |
tree | f929f411af355f227b60f7eddd0b031445596953 /runtime/queue.c | |
parent | 2c7604f45b1c416180794f2c4f29ba25504f8d47 (diff) | |
parent | 7d516b0a6c46177c18aea30b4617f1d2712d48fd (diff) | |
download | rsyslog-1d0dec9b0cf1203dec0cacc0c6eb38d2ac9271ea.tar.gz rsyslog-1d0dec9b0cf1203dec0cacc0c6eb38d2ac9271ea.tar.bz2 rsyslog-1d0dec9b0cf1203dec0cacc0c6eb38d2ac9271ea.zip |
Merge branch 'v5-stable-newstats' into v5-devel
Conflicts:
configure.ac
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index fa2ed615..5df748c2 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1985,10 +1985,9 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ CHKiRet(statsobj.Construct(&pThis->statsobj)); CHKiRet(statsobj.SetName(pThis->statsobj, qName)); /* we need to save the queue size, as the stats module initializes it to 0! */ - iQueueSizeSave = pThis->iQueueSize; + /* iQueueSize is a dual-use counter: no init, no mutex! */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("size"), ctrType_Int, &pThis->iQueueSize)); - pThis->iQueueSize = iQueueSizeSave; STATSCOUNTER_INIT(pThis->ctrEnqueued, pThis->mutCtrEnqueued); CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("enqueued"), @@ -2005,7 +2004,7 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("discarded.nf"), ctrType_IntCtr, &pThis->ctrNFDscrd)); - pThis->ctrMaxqsize = 0; + pThis->ctrMaxqsize = 0; /* no mutex needed, thus no init call */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("maxqsize"), ctrType_Int, &pThis->ctrMaxqsize)); |