diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-11 07:29:01 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-11 07:29:01 +0000 |
commit | 3141c15442cdb669d6e5a609011e655e2b1e8815 (patch) | |
tree | 8db9660158ad3745f889b4017db978d31449a1be /syslogd.c | |
parent | 886bcc2dec65590dfe893d7d02bd28d480a8e876 (diff) | |
download | rsyslog-3141c15442cdb669d6e5a609011e655e2b1e8815.tar.gz rsyslog-3141c15442cdb669d6e5a609011e655e2b1e8815.tar.bz2 rsyslog-3141c15442cdb669d6e5a609011e655e2b1e8815.zip |
bugfix: suspended actions were not always properly resumed varmojfekoj
provided the patch - many thanks!
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -2491,7 +2491,7 @@ static rsRetVal callAction(msg_t *pMsg, action_t *pAction) */ if(pAction->f_pMsg != NULL) { if(pAction->f_prevcount > 0) - fprintlog(pAction); + CHKiRet(fprintlog(pAction)); /* we do not care about iRet above - I think it's right but if we have * some troubles, you know where to look at ;) -- rgerhards, 2007-08-01 */ @@ -3437,9 +3437,15 @@ DEFFUNC_llExecFunc(domarkActions) dbgprintf("flush %s: repeated %d times, %d sec.\n", modGetStateName(pAction->pMod), pAction->f_prevcount, repeatinterval[pAction->f_repeatcount]); + if(actionIsSuspended(pAction) && + (actionTryResume(pAction) != RS_RET_OK)) { + goto finalize_it; + } fprintlog(pAction); BACKOFF(pAction); } + +finalize_it: UnlockObj(pAction); return RS_RET_OK; /* we ignore errors, we can not do anything either way */ @@ -4109,9 +4115,14 @@ DEFFUNC_llExecFunc(freeSelectorsActions) /* flush any pending output */ if(pAction->f_prevcount) { + if(actionIsSuspended(pAction) && + (actionTryResume(pAction) != RS_RET_OK)) { + goto finalize_it; + } fprintlog(pAction); } +finalize_it: return RS_RET_OK; /* never fails ;) */ } |