From 0817fc95a810df497c52200c772fac743ca84dde Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 8 May 2013 09:40:20 +0200 Subject: bugfix: segfault on startup if a disk queue was configure without file name Now this triggers an error message and the queue is changed to linkedList type. --- runtime/queue.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/queue.c') diff --git a/runtime/queue.c b/runtime/queue.c index 600b5688..85b1e45b 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2760,6 +2760,12 @@ qqueueApplyCnfParam(qqueue_t *pThis, struct cnfparamvals *pvals) "param '%s'\n", pblk.descr[i].name); } } + if(pThis->qType == QUEUETYPE_DISK && pThis->pszFilePrefix == NULL) { + errmsg.LogError(0, RS_RET_QUEUE_DISK_NO_FN, "error on queue '%s', disk mode selected, but " + "no queue file name given; queue type changed to 'linkedList'", + obj.GetName((obj_t*) pThis)); + pThis->qType = QUEUETYPE_LINKEDLIST; + } cnfparamvalsDestruct(pvals, &pblk); return RS_RET_OK; } -- cgit v1.2.3