diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-08 09:40:20 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-08 09:40:20 +0200 |
commit | 0817fc95a810df497c52200c772fac743ca84dde (patch) | |
tree | c1e01622f96e4a09d9e87f7d36503f11f494a389 /runtime/queue.c | |
parent | 40254dcc8cf3d9ab17f30f417a95709cbf9204bf (diff) | |
download | rsyslog-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.c | 6 |
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; } |