summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-04-07 15:14:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-04-07 15:14:45 +0200
commit4c44b1f2addb9ac6a3f0da2fde1261e8e49fe1d8 (patch)
tree1a36757788ca7394ae7cf257107e0bf1dcf6943b /runtime
parent5cf53628ac8ec8f07ee1c4d7f4bd0faeac43ab36 (diff)
parenteef1701be28f8f8b00134e6c20a8a493d0e69f80 (diff)
downloadrsyslog-4c44b1f2addb9ac6a3f0da2fde1261e8e49fe1d8.tar.gz
rsyslog-4c44b1f2addb9ac6a3f0da2fde1261e8e49fe1d8.tar.xz
rsyslog-4c44b1f2addb9ac6a3f0da2fde1261e8e49fe1d8.zip
Merge branch 'v5-stable' into v6-stable
Conflicts: ChangeLog configure.ac doc/manual.html
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queue.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 621a4eed..9f318523 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2018,13 +2018,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));
}
@@ -2116,7 +2119,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) {