summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-04-07 14:44:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-04-07 14:44:12 +0200
commitd53016962da179c52ad22600bd54ffd58f86a81c (patch)
treef557da4c02f73f13df76347078d7bc2388fdd89d /runtime/queue.c
parentcacb817fa3f6b78bad9e13f56d0fa1ed7d0366c1 (diff)
parentbd8d972a975ce794dd71c1c8db724991dd4744a0 (diff)
downloadrsyslog-d53016962da179c52ad22600bd54ffd58f86a81c.tar.gz
rsyslog-d53016962da179c52ad22600bd54ffd58f86a81c.tar.xz
rsyslog-d53016962da179c52ad22600bd54ffd58f86a81c.zip
Merge branch 'v5-stable-newstats' into v5-devel
Conflicts: configure.ac doc/manual.html
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 5df748c2..00e957e6 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2080,13 +2080,16 @@ static rsRetVal qqueuePersist(qqueue_t *pThis, int bIsCheckpoint)
CHKiRet(obj.EndSerialize(psQIF));
/* now persist the stream info */
- CHKiRet(strm.Serialize(pThis->tVars.disk.pWrite, psQIF));
- CHKiRet(strm.Serialize(pThis->tVars.disk.pReadDel, psQIF));
+ if(pThis->tVars.disk.pWrite != NULL)
+ CHKiRet(strm.Serialize(pThis->tVars.disk.pWrite, psQIF));
+ if(pThis->tVars.disk.pReadDel != NULL)
+ CHKiRet(strm.Serialize(pThis->tVars.disk.pReadDel, psQIF));
/* tell the input file object that it must not delete the file on close if the queue
* is non-empty - but only if we are not during a simple checkpoint
*/
- if(bIsCheckpoint != QUEUE_CHECKPOINT) {
+ if(bIsCheckpoint != QUEUE_CHECKPOINT
+ && pThis->tVars.disk.pReadDel != NULL) {
CHKiRet(strm.SetbDeleteOnClose(pThis->tVars.disk.pReadDel, 0));
}
@@ -2178,7 +2181,8 @@ CODESTARTobjDestruct(qqueue)
* direct queue - because in both cases we have none... ;)
* with a child! -- rgerhards, 2008-01-28
*/
- if(pThis->qType != QUEUETYPE_DIRECT && !pThis->bEnqOnly && pThis->pqParent == NULL)
+ if(pThis->qType != QUEUETYPE_DIRECT && !pThis->bEnqOnly && pThis->pqParent == NULL
+ && pThis->pWtpReg != NULL)
ShutdownWorkers(pThis);
if(pThis->bIsDA && getPhysicalQueueSize(pThis) > 0 && pThis->bSaveOnShutdown) {