summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-05-08 09:40:20 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-05-08 09:40:20 +0200
commit0817fc95a810df497c52200c772fac743ca84dde (patch)
treec1e01622f96e4a09d9e87f7d36503f11f494a389 /runtime/queue.c
parent40254dcc8cf3d9ab17f30f417a95709cbf9204bf (diff)
downloadrsyslog-0817fc95a810df497c52200c772fac743ca84dde.tar.gz
rsyslog-0817fc95a810df497c52200c772fac743ca84dde.tar.bz2
rsyslog-0817fc95a810df497c52200c772fac743ca84dde.zip
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.
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c6
1 files changed, 6 insertions, 0 deletions
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;
}