From 2387c9281d847b68f9c6268c1ba5e557e78f906c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 14 Nov 2013 15:51:52 +0100 Subject: fix: ruleset queues were activated too early This does not cause issues in v7, but here we have the problem that the total number of actions, which now is required for wti sizing, is not available at that early stage. So we needed to delay queue startup until everything is processed (just as it should have been already!). Note the previously we could have a segfault on first message when ruleset queues were used. --- tools/syslogd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tools/syslogd.c') diff --git a/tools/syslogd.c b/tools/syslogd.c index 7543d338..052a9329 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -1121,9 +1121,14 @@ rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct nvlst * qqueueSetDefaultsRulesetQueue(*ppQueue); qqueueApplyCnfParam(*ppQueue, lst); } + RETiRet; +} - /* ... and finally start the queue! */ - CHKiRet_Hdlr(qqueueStart(*ppQueue)) { +rsRetVal +startMainQueue(qqueue_t *pQueue) +{ + DEFiRet; + CHKiRet_Hdlr(qqueueStart(pQueue)) { /* no queue is fatal, we need to give up in that case... */ errmsg.LogError(0, iRet, "could not start (ruleset) main message queue"); \ } -- cgit v1.2.3