diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-07 14:33:37 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-07 14:33:37 +0200 |
commit | bfc6f6d599a4723b26708da5fddcc6db5c53fc21 (patch) | |
tree | 6a316f837808e735790fced62a46142f4cf6b9e6 /runtime | |
parent | da2039614ffd93b8fb1ebddf2ed3eb6dc873c1a5 (diff) | |
parent | a192300aa26484c88aedd306fdb92d7752eee427 (diff) | |
download | rsyslog-bfc6f6d599a4723b26708da5fddcc6db5c53fc21.tar.gz rsyslog-bfc6f6d599a4723b26708da5fddcc6db5c53fc21.tar.xz rsyslog-bfc6f6d599a4723b26708da5fddcc6db5c53fc21.zip |
Merge branch 'v5-stable' into v5-stable-newstats
Conflicts:
configure.ac
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queue.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 0b717289..5503f2d9 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2026,13 +2026,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)); } @@ -2124,7 +2127,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) { |