diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-31 11:32:25 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-31 11:32:25 +0000 |
commit | 77358e12ab9c8a52c81673e24239d7878e7848c9 (patch) | |
tree | 2643e033ae06e51f182dd0d0d09f68e67e1ca0cb /action.c | |
parent | 182c2cafceef701cfcd79e2a7994faa9fc5d4672 (diff) | |
download | rsyslog-77358e12ab9c8a52c81673e24239d7878e7848c9.tar.gz rsyslog-77358e12ab9c8a52c81673e24239d7878e7848c9.tar.xz rsyslog-77358e12ab9c8a52c81673e24239d7878e7848c9.zip |
- fixed bug in sample rsyslog.conf
- fixed wrong action suspend/resume handling
- we have some issue with the mutx in dbgoprint, but that is acceptable for
the time being, I just removed the deadlock codition (debug system
only)
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -223,8 +223,9 @@ actionConstructFinalize(action_t *pThis) # undef setQPROP # undef setQPROPstr - dbgoprint((obj_t*) pThis->pQueue, "save on shutdown %d, max disk space allowed %ld\n", + /*dbgoprint((obj_t*) pThis->pQueue, "save on shutdown %d, max disk space allowed %ld\n", bActionQSaveOnShutdown, iActionQueMaxDiskSpace); + */ CHKiRet(queueStart(pThis->pQueue)); dbgprintf("Action %p: queue %p created\n", pThis, pThis->pQueue); @@ -397,6 +398,10 @@ actionCallDoAction(action_t *pAction, msg_t *pMsg) if(bCallAction) { /* call configured action */ iRet = pAction->pMod->mod.om.doAction(ppMsgs, pMsg->msgFlags, pAction->pModData); + if(iRet == RS_RET_SUSPENDED) { + dbgprintf("Action requested to be suspended, done that.\n"); + actionSuspend(pAction); + } } } while(iRet == RS_RET_SUSPENDED && (pAction->iResumeRetryCount == -1 || iRetries < pAction->iResumeRetryCount)); /* do...while! */ @@ -407,11 +412,6 @@ RUNLOG_STR("out of retry loop"); pAction->bEnabled = 0; /* that's it... */ } - if(iRet == RS_RET_SUSPENDED) { - dbgprintf("Action requested to be suspended, done that.\n"); - actionSuspend(pAction); - } - pthread_cleanup_pop(1); /* unlock mutex */ finalize_it: |