summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-04-23 14:51:34 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-04-23 14:51:34 +0200
commit2eea95f626badb5a93ff7eca97cc68e5d2f3940a (patch)
treec7467c2ace398cda5d39e0f6fbda07e38fdc8e5c /runtime/queue.c
parent7d8ac48a4a214da917f7455f24b4c292c3e6d015 (diff)
parent9b06a4c26422b0a8727e1b3c6cc7141226186105 (diff)
downloadrsyslog-2eea95f626badb5a93ff7eca97cc68e5d2f3940a.tar.gz
rsyslog-2eea95f626badb5a93ff7eca97cc68e5d2f3940a.tar.bz2
rsyslog-2eea95f626badb5a93ff7eca97cc68e5d2f3940a.zip
Merge branch 'master' into master-elasticsearch
Conflicts: plugins/omelasticsearch/omelasticsearch.c
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index cd64b1fc..7085c829 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2156,13 +2156,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));
}
@@ -2254,7 +2257,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) {
@@ -2658,6 +2662,7 @@ DEFpropSetMeth(qqueue, iLowWtrMrk, int)
DEFpropSetMeth(qqueue, iDiscardMrk, int)
DEFpropSetMeth(qqueue, iFullDlyMrk, int)
DEFpropSetMeth(qqueue, iDiscardSeverity, int)
+DEFpropSetMeth(qqueue, iLightDlyMrk, int)
DEFpropSetMeth(qqueue, bIsDA, int)
DEFpropSetMeth(qqueue, iMinMsgsPerWrkr, int)
DEFpropSetMeth(qqueue, bSaveOnShutdown, int)