summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-18 13:15:10 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-18 13:15:10 +0200
commit154747929f87010b444af2d552f980daafe451e6 (patch)
treec54388c14304522f5ed795011d7b3633118b6e96
parent47ed9921b6c9fe49d4aadf244f7df1ce4d05a5b3 (diff)
downloadrsyslog-154747929f87010b444af2d552f980daafe451e6.tar.gz
rsyslog-154747929f87010b444af2d552f980daafe451e6.tar.xz
rsyslog-154747929f87010b444af2d552f980daafe451e6.zip
removed debug code from action.c and runtime/queue.c after testing
-rw-r--r--action.c17
-rw-r--r--runtime/queue.c4
2 files changed, 0 insertions, 21 deletions
diff --git a/action.c b/action.c
index 869185e9..50699c01 100644
--- a/action.c
+++ b/action.c
@@ -962,7 +962,6 @@ tryDoAction(action_t *pAction, batch_t *pBatch, int *pnElem)
iCommittedUpTo = i;
dbgprintf("XXXXX: tryDoAction %p, pnElem %d, nElem %d\n", pAction, *pnElem, pBatch->nElem);
while(iElemProcessed <= *pnElem && i < pBatch->nElem) {
-dbgprintf("XXXXX: pre nElem %d, state %d\n", pBatch->nElem, pBatch->pElem[i].state);
if(*(pBatch->pbShutdownImmediate))
ABORT_FINALIZE(RS_RET_FORCE_TERM);
/* NOTE: do NOT extend the filter below! Anything else must be done on the
@@ -980,7 +979,6 @@ dbgprintf("XXXXX: pre nElem %d, state %d\n", pBatch->nElem, pBatch->pElem[i]
if(localRet == RS_RET_OK) {
/* mark messages as committed */
while(iCommittedUpTo <= i) {
-dbgprintf("XXXXX: setting nElem %d to 3/COMM\n", iCommittedUpTo);
pBatch->pElem[iCommittedUpTo].bPrevWasSuspended = 0; /* we had success! */
batchSetElemState(pBatch, iCommittedUpTo, BATCH_STATE_COMM);
++iCommittedUpTo;
@@ -989,7 +987,6 @@ dbgprintf("XXXXX: setting nElem %d to 3/COMM\n", iCommittedUpTo);
} else if(localRet == RS_RET_PREVIOUS_COMMITTED) {
/* mark messages as committed */
while(iCommittedUpTo < i) {
-dbgprintf("XXXXX: setting2 nElem %d to 3/COMM\n", iCommittedUpTo);
pBatch->pElem[iCommittedUpTo].bPrevWasSuspended = 0; /* we had success! */
batchSetElemState(pBatch, iCommittedUpTo, BATCH_STATE_COMM);
++iCommittedUpTo;
@@ -1007,7 +1004,6 @@ dbgprintf("XXXXX: setting2 nElem %d to 3/COMM\n", iCommittedUpTo);
FINALIZE;
}
}
-dbgprintf("XXXXX: post nElem %d, state %d\n", pBatch->nElem, pBatch->pElem[i].state);
++i;
++iElemProcessed;
}
@@ -1047,8 +1043,6 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem)
assert(pBatch != NULL);
-dbgprintf("XXXX: submitBatch pre:\n");
-displayBatchState(pBatch);
wasDoneTo = pBatch->iDoneUpTo;
bDone = 0;
do {
@@ -1062,23 +1056,16 @@ displayBatchState(pBatch);
/* try commit transaction, once done, we can simply do so as if
* that return state was returned from tryDoAction().
*/
-dbgprintf("XXXX: calling finishBatch\n");
-displayBatchState(pBatch);
localRet = finishBatch(pAction, pBatch);
}
-dbgprintf("XXXX: 10\n");
if( localRet == RS_RET_OK
|| localRet == RS_RET_PREVIOUS_COMMITTED
|| localRet == RS_RET_DEFER_COMMIT) {
-dbgprintf("XXXX: bdone = 1\n");
-displayBatchState(pBatch);
bDone = 1;
} else if(localRet == RS_RET_SUSPENDED) {
-dbgprintf("XXXX: 20\n");
; /* do nothing, this will retry the full batch */
} else if(localRet == RS_RET_ACTION_FAILED) {
-dbgprintf("XXXX: 25\n");
/* in this case, everything not yet committed is BAD */
for(i = pBatch->iDoneUpTo ; i < wasDoneTo + nElem ; ++i) {
if( pBatch->pElem[i].state != BATCH_STATE_DISC
@@ -1089,7 +1076,6 @@ dbgprintf("XXXX: 25\n");
}
bDone = 1;
} else {
-dbgprintf("XXXX: 30\n");
if(nElem == 1) {
batchSetElemState(pBatch, pBatch->iDoneUpTo, BATCH_STATE_BAD);
bDone = 1;
@@ -1108,8 +1094,6 @@ dbgprintf("XXXX: 30\n");
ABORT_FINALIZE(RS_RET_FORCE_TERM);
finalize_it:
-dbgprintf("XXXX: submitBatch post:\n");
-displayBatchState(pBatch);
RETiRet;
}
@@ -1581,7 +1565,6 @@ doQueueEnqObjDirectBatch(action_t *pAction, batch_t *pBatch)
* this is not necessary, because in that case we enqueue only what actually needs
* to be processed.
*/
-dbgprintf("XXXXX: in doQeuueEnqDiretbatch, %d\n", pAction->bExecWhenPrevSusp);
if(pAction->bExecWhenPrevSusp) {
bNeedSubmit = 0;
bModifiedFilter = 0;
diff --git a/runtime/queue.c b/runtime/queue.c
index 554c6a43..9012abeb 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -891,8 +891,6 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch)
ASSERT(pThis != NULL);
-dbgprintf("XXXXX: pre call consumer\n");
-displayBatchState(pBatch);
/* calling the consumer is quite different here than it is from a worker thread */
/* we need to provide the consumer's return value back to the caller because in direct
* mode the consumer probably has a lot to convey (which get's lost in the other modes
@@ -903,8 +901,6 @@ displayBatchState(pBatch);
*/
iRet = pThis->pConsumer(pThis->pUsr, pBatch, &pThis->bShutdownImmediate);
-dbgprintf("XXXXX: post call consumer\n");
-displayBatchState(pBatch);
RETiRet;
}