diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-22 16:39:58 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-22 16:39:58 +0200 |
commit | e4b3f6d287d74b34d27b4e296c33cb3f1294a58c (patch) | |
tree | dd75cbbc5f857ccdb6d835fb2bf850ed1527b6ff /tools | |
parent | 7667845bd72b6f92eabc975318a4f288a77f2630 (diff) | |
download | rsyslog-e4b3f6d287d74b34d27b4e296c33cb3f1294a58c.tar.gz rsyslog-e4b3f6d287d74b34d27b4e296c33cb3f1294a58c.tar.bz2 rsyslog-e4b3f6d287d74b34d27b4e296c33cb3f1294a58c.zip |
now batches are handed down to the actual consumer
... but the action consumer does not do anything really intelligent
with them. But the DA consumer is already done, as is the
main message queue consumer.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 8c86c12e..f48fa759 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -129,6 +129,7 @@ #include "omfile.h" #include "omdiscard.h" #include "threads.h" +#include "wti.h" #include "queue.h" #include "stream.h" #include "conf.h" @@ -1202,22 +1203,29 @@ processMsg(msg_t *pMsg) /* The consumer of dequeued messages. This function is called by the * queue engine on dequeueing of a message. It runs on a SEPARATE - * THREAD. - * Please note: the message object is destructed by the queue itself! + * THREAD. It receives an array of pointers, which it must iterate + * over. We do not do any further batching, as this is of no benefit + * for the main queue. */ static rsRetVal -msgConsumer(void __attribute__((unused)) *notNeeded, void *pUsr) +msgConsumer(void __attribute__((unused)) *notNeeded, aUsrp_t *paUsrp) { + int i; + msg_t *pMsg; DEFiRet; - msg_t *pMsg = (msg_t*) pUsr; - assert(pMsg != NULL); + assert(paUsrp != NULL); - if((pMsg->msgFlags & NEEDS_PARSING) != 0) { - parseMsg(pMsg); + for(i = 0 ; i < paUsrp->nElem ; i++) { + pMsg = (msg_t*) paUsrp->pUsrp[i]; +dbgprintf("msgConsumer..MULTIQUEUE: i: %d, pMsg: %p\n", i, pMsg); + if((pMsg->msgFlags & NEEDS_PARSING) != 0) { + parseMsg(pMsg); + } + processMsg(pMsg); + msgDestruct(&pMsg); } - processMsg(pMsg); - msgDestruct(&pMsg); +dbgprintf("DONE msgConsumer..MULTIQUEUE:\n"); RETiRet; } |