From 9843274dc96ba4b3af079367f9704e232bde2b2d Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 29 Jan 2008 14:18:12 +0000 Subject: bugfixing newly added action code --- ChangeLog | 2 ++ action.c | 6 +++++- action.h | 1 + queue.c | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8e3047d3..83bb9983 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ Version 3.10.4 (rgerhards), 2008-01-?? - added $ActionQueueWorkerThreadMinimumMessages config directive - added $ActionQueueMaxFileSize config directive - added $ActionQueueSaveonShutdown config directive +- bugfix: added forgotten docs to package +- improved debugging support --------------------------------------------------------------------------- Version 3.10.3 (rgerhards), 2008-01-28 - fixed a bug with standard template definitions (not a big deal) - thanks diff --git a/action.c b/action.c index a3684796..eb8f2b02 100644 --- a/action.c +++ b/action.c @@ -84,6 +84,8 @@ rsRetVal actionDestruct(action_t *pThis) { ASSERT(pThis != NULL); + queueDestruct(&pThis->pQueue); + if(pThis->pMod != NULL) pThis->pMod->freeInstance(pThis->pModData); @@ -308,14 +310,16 @@ actionCallDoAction(action_t *pAction, msg_t *pMsg) RUNLOG_STR("going into do_action call loop"); RUNLOG_VAR("%d", iRetries); /* first check if we are suspended and, if so, retry */ + ASSERT(pAction != NULL); if(actionIsSuspended(pAction)) { dbgprintf("action %p is suspended\n", pAction); iRet = actionTryResume(pAction); } if(iRet == RS_RET_OK) { +RUNLOG_STR("calling configured action\n"); /* call configured action */ - iRet = pAction->pMod->mod.om.doAction(pAction->ppMsgs, pAction->f_pMsg->msgFlags, pAction->pModData); + iRet = pAction->pMod->mod.om.doAction(pAction->ppMsgs, pMsg->msgFlags, pAction->pModData); } RUNLOG_VAR("%d", iRet); diff --git a/action.h b/action.h index 4f1ba825..5bcdc461 100644 --- a/action.h +++ b/action.h @@ -88,6 +88,7 @@ rsRetVal actionWriteToAction(action_t *pAction); inline int actionIsSuspended(action_t *pThis) { int i; + ASSERT(pThis != NULL); i = pThis->bSuspended == 1; dbgprintf("in IsSuspend(), returns %d\n", i); return i; diff --git a/queue.c b/queue.c index d9f5155f..f69b0042 100644 --- a/queue.c +++ b/queue.c @@ -217,6 +217,7 @@ queueStartDA(queue_t *pThis) */ pThis->pqDA->pqParent = pThis; + CHKiRet(queueSetpUsr(pThis->pqDA, pThis->pUsr)); CHKiRet(queueSetMaxFileSize(pThis->pqDA, pThis->iMaxFileSize)); CHKiRet(queueSetFilePrefix(pThis->pqDA, pThis->pszFilePrefix, pThis->lenFilePrefix)); CHKiRet(queueSetiPersistUpdCnt(pThis->pqDA, pThis->iPersistUpdCnt)); -- cgit