diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 10:08:17 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 10:08:17 +0100 |
commit | f291d5c570052f163004cbf31f24bb0884dc6681 (patch) | |
tree | d5350eb8d51fd194bee8b29b9007512908a509ea /tools/syslogd.c | |
parent | 09708798a22b61851e24e97c3c4bcdef0316fa99 (diff) | |
download | rsyslog-f291d5c570052f163004cbf31f24bb0884dc6681.tar.gz rsyslog-f291d5c570052f163004cbf31f24bb0884dc6681.tar.xz rsyslog-f291d5c570052f163004cbf31f24bb0884dc6681.zip |
ruleset queue setting was not honored during multi-submit
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r-- | tools/syslogd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 270bf843..41d819a6 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -1027,8 +1027,6 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags) /* submit a message to the main message queue. This is primarily * a hook to prevent the need for callers to know about the main message queue - * (which may change in the future as we will probably have multiple rule - * sets and thus queues...). * rgerhards, 2008-02-13 */ rsRetVal @@ -1051,23 +1049,31 @@ submitMsg(msg_t *pMsg) /* submit multiple messages at once, very similar to submitMsg, just - * for multi_submit_t. + * for multi_submit_t. All messages need to go into the SAME queue! * rgerhards, 2009-06-16 */ rsRetVal multiSubmitMsg(multi_submit_t *pMultiSub) { int i; + qqueue_t *pQueue; + ruleset_t *pRuleset; DEFiRet; assert(pMultiSub != NULL); + if(pMultiSub->nElem == 0) + FINALIZE; + for(i = 0 ; i < pMultiSub->nElem ; ++i) { MsgPrepareEnqueue(pMultiSub->ppMsgs[i]); } - iRet = qqueueMultiEnqObj(pMsgQueue, pMultiSub); + pRuleset = MsgGetRuleset(pMultiSub->ppMsgs[0]); + pQueue = (pRuleset == NULL) ? pMsgQueue : ruleset.GetRulesetQueue(pRuleset); + iRet = qqueueMultiEnqObj(pQueue, pMultiSub); pMultiSub->nElem = 0; +finalize_it: RETiRet; } |