diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-27 10:44:55 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-27 10:44:55 +0100 |
commit | 386b7cd2f2ae6f9ac8e0b9c8b49934398c159ea4 (patch) | |
tree | c94f00b1a8ec49ef78c0d8985b11d370d3272930 /runtime | |
parent | 796b01036db027077b19b8c183d51bcd93c3948d (diff) | |
download | rsyslog-386b7cd2f2ae6f9ac8e0b9c8b49934398c159ea4.tar.gz rsyslog-386b7cd2f2ae6f9ac8e0b9c8b49934398c159ea4.tar.xz rsyslog-386b7cd2f2ae6f9ac8e0b9c8b49934398c159ea4.zip |
removed no longer needed flag variable
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queue.c | 16 | ||||
-rw-r--r-- | runtime/queue.h | 1 |
2 files changed, 6 insertions, 11 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index d1a97ba6..d219d74d 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -386,8 +386,6 @@ InitDA(qqueue_t *pThis, int bLockMutex) CHKiRet(StartDA(pThis)); } - pThis->bRunsDA = 1; - finalize_it: END_MTX_PROTECTED_OPERATIONS(pThis->mut); RETiRet; @@ -1235,7 +1233,7 @@ finalize_it: /* This function checks if the provided message shall be discarded and does so, if needed. * In DA mode, we do not discard any messages as we assume the disk subsystem is fast enough to * provide real-time creation of spool files. - * Note: cached copies of iQueueSize and bRunsDA are provided so that no mutex locks are required. + * Note: cached copies of iQueueSize is provided so that no mutex locks are required. * The caller must have obtained them while the mutex was locked. Of course, these values may no * longer be current, but that is OK for the discard check. At worst, the message is either processed * or discarded when it should not have been. As discarding is in itself somewhat racy and erratic, @@ -1245,7 +1243,7 @@ finalize_it: * the return state! * rgerhards, 2008-01-24 */ -static int qqueueChkDiscardMsg(qqueue_t *pThis, int iQueueSize, int bRunsDA, void *pUsr) +static int qqueueChkDiscardMsg(qqueue_t *pThis, int iQueueSize, void *pUsr) { DEFiRet; rsRetVal iRetLocal; @@ -1254,7 +1252,7 @@ static int qqueueChkDiscardMsg(qqueue_t *pThis, int iQueueSize, int bRunsDA, voi ISOBJ_TYPE_assert(pThis, qqueue); ISOBJ_assert(pUsr); - if(pThis->iDiscardMrk > 0 && iQueueSize >= pThis->iDiscardMrk && bRunsDA == 0) { + if(pThis->iDiscardMrk > 0 && iQueueSize >= pThis->iDiscardMrk) { iRetLocal = objGetSeverity(pUsr, &iSeverity); if(iRetLocal == RS_RET_OK && iSeverity >= pThis->iDiscardSeverity) { DBGOPRINT((obj_t*) pThis, "queue nearly full (%d entries), discarded severity %d message\n", @@ -1411,7 +1409,7 @@ DequeueConsumableElements(qqueue_t *pThis, wti_t *pWti, int *piRemainingQueueSiz CHKiRet(qqueueDeq(pThis, &pUsr)); /* check if we should discard this element */ - localRet = qqueueChkDiscardMsg(pThis, pThis->iQueueSize, pThis->bRunsDA, pUsr); + localRet = qqueueChkDiscardMsg(pThis, pThis->iQueueSize, pUsr); if(localRet == RS_RET_QUEUE_FULL) { ++nDiscarded; continue; @@ -1734,9 +1732,7 @@ qqueueChkStopWrkrDA(qqueue_t *pThis) /* must only be called when the queue mutex is locked, else results * are not stable! * If we are a child, we have done our duty when the queue is empty. In that case, - * we can terminate. - * Version for the regular worker thread. NOTE: the pThis->bRunsDA is different from - * the DA queue + * we can terminate. Version for the regular worker thread. */ static rsRetVal ChkStopWrkrReg(qqueue_t *pThis) @@ -2135,7 +2131,7 @@ doEnqSingleObj(qqueue_t *pThis, flowControl_t flowCtlType, void *pUsr) /* first check if we need to discard this message (which will cause CHKiRet() to exit) */ - CHKiRet(qqueueChkDiscardMsg(pThis, pThis->iQueueSize, pThis->bRunsDA, pUsr)); + CHKiRet(qqueueChkDiscardMsg(pThis, pThis->iQueueSize, pUsr)); /* handle flow control * There are two different flow control mechanisms: basic and advanced flow control. diff --git a/runtime/queue.h b/runtime/queue.h index 3b5d7038..26c57a50 100644 --- a/runtime/queue.h +++ b/runtime/queue.h @@ -138,7 +138,6 @@ typedef struct queue_s { qDeqID deqIDAdd; /* next dequeue ID to use during add to queue store */ qDeqID deqIDDel; /* queue store delete position */ int bIsDA; /* is this queue disk assisted? */ - int bRunsDA; /* is this queue actually *running* disk assisted? */ struct queue_s *pqDA; /* queue for disk-assisted modes */ struct queue_s *pqParent;/* pointer to the parent (if this is a child queue) */ int bDAEnqOnly; /* EnqOnly setting for DA queue */ |