From 77358e12ab9c8a52c81673e24239d7878e7848c9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 31 Jan 2008 11:32:25 +0000 Subject: - 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) --- action.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'action.c') diff --git a/action.c b/action.c index d2eedbb7..7ce90fb2 100644 --- a/action.c +++ b/action.c @@ -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: -- cgit