summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorSteffen Sledz <sledz@dresearch.de>2010-08-05 07:48:36 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-08-05 07:48:36 +0200
commit676939f61671f96e80323cf929ee506f3844fcfc (patch)
tree89f2546350e27c8550fd0ec97475023aafd3331c /action.c
parent58924bd011a46000a933933037e5db795ad6708f (diff)
downloadrsyslog-676939f61671f96e80323cf929ee506f3844fcfc.tar.gz
rsyslog-676939f61671f96e80323cf929ee506f3844fcfc.tar.xz
rsyslog-676939f61671f96e80323cf929ee506f3844fcfc.zip
break potential infinite loop in actionDoRetry
If a module always returns RS_RET_OK (like ompipe does) the actionDoRetry loop may not have leaved faked ACT_STATE_SUSP state in case iResumeOKinRow had ever reached a count of 1000. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'action.c')
-rw-r--r--action.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/action.c b/action.c
index 32a07dcb..90ec1bf0 100644
--- a/action.c
+++ b/action.c
@@ -508,6 +508,7 @@ static rsRetVal actionDoRetry(action_t *pThis, time_t ttNow)
iRet = pThis->pMod->tryResume(pThis->pModData);
if((pThis->iResumeOKinRow > 999) && (pThis->iResumeOKinRow % 1000 == 0)) {
bTreatOKasSusp = 1;
+ pThis->iResumeOKinRow = 0;
} else {
bTreatOKasSusp = 0;
}