diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 13:44:35 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 13:44:35 +0100 |
commit | e482c13b50b8723f433bc3ff594f28cb2a070818 (patch) | |
tree | 5388158e2939085c6bc8de7323a6aed80546aac7 /runtime/queue.c | |
parent | 5ecfdad17e395570edb78698b4805992368c61b1 (diff) | |
parent | e6aaf19689791c668ea444a21e470e4db3244cb5 (diff) | |
download | rsyslog-e482c13b50b8723f433bc3ff594f28cb2a070818.tar.gz rsyslog-e482c13b50b8723f433bc3ff594f28cb2a070818.tar.xz rsyslog-e482c13b50b8723f433bc3ff594f28cb2a070818.zip |
Merge branch 'v5-stable' into v5-stable-newstats
Conflicts:
plugins/imuxsock/imuxsock.c
runtime/queue.c
runtime/queue.h
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 d1ac96fa..0b717289 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1931,10 +1931,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"), @@ -1951,7 +1950,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)); |