summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-02 12:53:52 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-02 12:53:52 +0000
commit9f7b03b801ed82e499666e5c29b4dda094fb1d57 (patch)
treedf96d0d72dd00ad49c278bbfb46219259f313bcf
parent6bd7ceb7e160200af80e0b8f0a526cd98d90eeab (diff)
downloadrsyslog-9f7b03b801ed82e499666e5c29b4dda094fb1d57.tar.gz
rsyslog-9f7b03b801ed82e499666e5c29b4dda094fb1d57.tar.xz
rsyslog-9f7b03b801ed82e499666e5c29b4dda094fb1d57.zip
changed doAction() syslogd internal functions to allow for larger data &
state data - in preparation for actions that shall only be executed when previous action was suspended (the switchover case, e.g. for failed databases or TCP receivers)
-rw-r--r--syslogd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/syslogd.c b/syslogd.c
index 98cf76ee..34c4f2c2 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2532,14 +2532,18 @@ finalize_it:
* executed from within llExecFunc() of the action list.
* rgerhards, 2007-08-02
*/
+typedef struct processMsgDoActions_s {
+ int bPrevWasSuspended; /* was the previous action suspended? */
+ msg_t *pMsg;
+} processMsgDoActions_t;
DEFFUNC_llExecFunc(processMsgDoActions)
{
DEFiRet;
action_t *pAction = (action_t*) pData;
- msg_t *pMsg = (msg_t*) pParam;
+ processMsgDoActions_t *pDoActData = (processMsgDoActions_t*) pParam;
assert(pAction != NULL);
- if(callAction(pMsg, pAction) == RS_RET_DISCARDMSG) {
+ if(callAction(pDoActData->pMsg, pAction) == RS_RET_DISCARDMSG) {
ABORT_FINALIZE(RS_RET_DISCARDMSG);
}
@@ -2558,6 +2562,7 @@ static void processMsg(msg_t *pMsg)
{
selector_t *f;
int bContinue;
+ processMsgDoActions_t DoActData;
assert(pMsg != NULL);
@@ -2583,7 +2588,9 @@ static void processMsg(msg_t *pMsg)
}
/* ok -- from here, we have action-specific code, nothing really selector-specific -- rger 2007-08-01 */
- if(llExecFunc(&f->llActList, processMsgDoActions, (void*)pMsg) == RS_RET_DISCARDMSG)
+ DoActData.pMsg = pMsg;
+ DoActData.bPrevWasSuspended = 0;
+ if(llExecFunc(&f->llActList, processMsgDoActions, (void*)&DoActData) == RS_RET_DISCARDMSG)
bContinue = 0;
}
}