diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 13:56:56 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 13:56:56 +0100 |
commit | d94ba2a5468089b657e0779ddd2f4585face37e3 (patch) | |
tree | 7bd4885fbacb8e83be0bfce71bc5ff2d5ea8b9a3 /runtime/queue.c | |
parent | 0b5fe246b55635d8eaf3182ddad8961c7d3757c2 (diff) | |
parent | e6aaf19689791c668ea444a21e470e4db3244cb5 (diff) | |
download | rsyslog-d94ba2a5468089b657e0779ddd2f4585face37e3.tar.gz rsyslog-d94ba2a5468089b657e0779ddd2f4585face37e3.tar.bz2 rsyslog-d94ba2a5468089b657e0779ddd2f4585face37e3.zip |
Merge branch 'v5-stable' into v6-stable
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 5b25fcf7..621a4eed 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1930,10 +1930,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"), @@ -1943,7 +1942,7 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("full"), ctrType_IntCtr, &pThis->ctrFull)); - 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)); |