diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-12-16 16:21:52 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-12-16 16:21:52 +0100 |
commit | d3592db45bfc4939c2d72c73a42ed9f79cb64052 (patch) | |
tree | 3634b6b5c0f522eb2ca9471744032d9a9103fd0a /action.c | |
parent | b61be5dccaacfdfa7878e5e497022e073081f5f8 (diff) | |
download | rsyslog-d3592db45bfc4939c2d72c73a42ed9f79cb64052.tar.gz rsyslog-d3592db45bfc4939c2d72c73a42ed9f79cb64052.tar.xz rsyslog-d3592db45bfc4939c2d72c73a42ed9f79cb64052.zip |
bugfix: ompgsql did not properly check the server connection in tryResume()
what could lead to rsyslog running in a thight loop.
Also did some code cleanup of previous patch.
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -491,17 +491,14 @@ static rsRetVal actionDoRetry(action_t *pThis, time_t ttNow) ASSERT(pThis != NULL); -dbgprintf("XXX: we are doing a retry, action state %d\n", pThis->eState); iRetries = 0; while(pThis->eState == ACT_STATE_RTRY) { iRet = pThis->pMod->tryResume(pThis->pModData); -dbgprintf("XXX: result of tryResume %d\n", iRet); if(iRet == RS_RET_OK) { actionSetState(pThis, ACT_STATE_RDY); } else if(iRet == RS_RET_SUSPENDED) { /* max retries reached? */ if((pThis->iResumeRetryCount != -1 && iRetries >= pThis->iResumeRetryCount)) { -dbgprintf("XXX: action suspeneded!\n"); actionSuspend(pThis, ttNow); } else { ++pThis->iNbrResRtry; @@ -533,7 +530,6 @@ static rsRetVal actionTryResume(action_t *pThis) ASSERT(pThis != NULL); -dbgprintf("XXX: actionTryResume, action state %d\n", pThis->eState); if(pThis->eState == ACT_STATE_SUSP) { /* if we are suspended, we need to check if the timeout expired. * for this handling, we must always obtain a fresh timestamp. We used @@ -580,7 +576,6 @@ static rsRetVal actionPrepare(action_t *pThis) */ if(pThis->eState == ACT_STATE_RDY) { iRet = pThis->pMod->mod.om.beginTransaction(pThis->pModData); -dbgprintf("XXX: actionPrepare, result of beginTranscation %d\n", iRet); switch(iRet) { case RS_RET_OK: actionSetState(pThis, ACT_STATE_ITX); @@ -717,7 +712,6 @@ actionCallDoAction(action_t *pThis, msg_t *pMsg) pThis->bHadAutoCommit = 0; iRet = pThis->pMod->mod.om.doAction(pThis->ppMsgs, pMsg->msgFlags, pThis->pModData); -dbgprintf("XXX: result of doAction: %d\n", iRet); switch(iRet) { case RS_RET_OK: actionCommitted(pThis); @@ -790,7 +784,6 @@ finishBatch(action_t *pThis, batch_t *pBatch) CHKiRet(actionPrepare(pThis)); if(pThis->eState == ACT_STATE_ITX) { iRet = pThis->pMod->mod.om.endTransaction(pThis->pModData); -dbgprintf("XXX: finishBatch, result of endTranscation %d\n", iRet); switch(iRet) { case RS_RET_OK: actionCommitted(pThis); @@ -908,7 +901,6 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem, int *pbShutdownImmedi bDone = 0; do { localRet = tryDoAction(pAction, pBatch, &nElem, pbShutdownImmediate); -dbgprintf("submitBatch: localRet %d\n", localRet); if(localRet == RS_RET_FORCE_TERM) FINALIZE; if( localRet == RS_RET_OK |