diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-12 15:31:08 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-12 15:31:08 +0200 |
commit | ca0ddc30a3edce02a440904a01f0b866c0f82b5a (patch) | |
tree | f751d9d677ce901841874e05650f7ea236a90976 /runtime/msg.c | |
parent | 21dafea3ee98d16a8fe93d0d5228939dc259aea7 (diff) | |
download | rsyslog-ca0ddc30a3edce02a440904a01f0b866c0f82b5a.tar.gz rsyslog-ca0ddc30a3edce02a440904a01f0b866c0f82b5a.tar.xz rsyslog-ca0ddc30a3edce02a440904a01f0b866c0f82b5a.zip |
completed multi-ruleset core support
... as well as added multi-ruleset support for imtcp
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index dbc3c779..10f283aa 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -46,6 +46,7 @@ #include "regexp.h" #include "atomic.h" #include "unicode-helper.h" +#include "ruleset.h" /* static data */ DEFobjStaticHelpers @@ -1166,13 +1167,21 @@ void MsgAssignTAG(msg_t *pMsg, uchar *pBuf) } +/* rgerhards 2009-06-12: set associated ruleset + */ +void MsgSetRuleset(msg_t *pMsg, ruleset_t *pRuleset) +{ + assert(pMsg != NULL); + pMsg->pRuleset = pRuleset; +} + + /* rgerhards 2004-11-16: set TAG in msg object */ void MsgSetTAG(msg_t *pMsg, char* pszTAG) { assert(pMsg != NULL); - if(pMsg->pszTAG != NULL) - free(pMsg->pszTAG); + free(pMsg->pszTAG); pMsg->iLenTAG = strlen(pszTAG); if((pMsg->pszTAG = malloc(pMsg->iLenTAG + 1)) != NULL) memcpy(pMsg->pszTAG, pszTAG, pMsg->iLenTAG + 1); |