summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-03-12 17:11:59 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-03-12 17:11:59 +0100
commit32df7bf254f8e82f4857d9d0f5eeb49d678d08c8 (patch)
treee4de394adc42e7ac52669fa0467dc94506e36781 /runtime/queue.c
parent7d509d53df75bc2146bddebcbab14583474ac543 (diff)
parent0b5fe246b55635d8eaf3182ddad8961c7d3757c2 (diff)
downloadrsyslog-32df7bf254f8e82f4857d9d0f5eeb49d678d08c8.tar.gz
rsyslog-32df7bf254f8e82f4857d9d0f5eeb49d678d08c8.tar.bz2
rsyslog-32df7bf254f8e82f4857d9d0f5eeb49d678d08c8.zip
Merge branch 'v6-stable'
Conflicts: runtime/queue.c
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index a1ac3eff..5286f23d 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -1873,6 +1873,8 @@ qqueueChkStopWrkrDA(qqueue_t *pThis)
{
DEFiRet;
+ /*DBGPRINTF("XXXX: chkStopWrkrDA called, low watermark %d, log Size %d, phys Size %d, bEnqOnly %d\n",
+ pThis->iLowWtrMrk, getLogicalQueueSize(pThis), getPhysicalQueueSize(pThis), pThis->bEnqOnly);*/
if(pThis->bEnqOnly) {
iRet = RS_RET_TERMINATE_WHEN_IDLE;
}
@@ -1893,6 +1895,8 @@ static rsRetVal
ChkStopWrkrReg(qqueue_t *pThis)
{
DEFiRet;
+ /*DBGPRINTF("XXXX: chkStopWrkrReg called, low watermark %d, log Size %d, phys Size %d, bEnqOnly %d\n",
+ pThis->iLowWtrMrk, getLogicalQueueSize(pThis), getPhysicalQueueSize(pThis), pThis->bEnqOnly);*/
if(pThis->bEnqOnly) {
iRet = RS_RET_TERMINATE_NOW;
} else if(pThis->pqParent != NULL) {
@@ -1929,6 +1933,7 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
int wrk;
uchar *qName;
size_t lenBuf;
+ int iQueueSizeSave;
ASSERT(pThis != NULL);
@@ -2056,8 +2061,11 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
qName = obj.GetName((obj_t*)pThis);
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;
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"),