summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2012-07-31 08:19:37 -0700
committerAndre Lorbach <alorbach@adiscon.com>2012-07-31 08:19:37 -0700
commit617a7aaa1dc4569e6c151a14889bffe808f984c5 (patch)
treeaddb4da0a8256a796d480ec440de0567d27e5b97
parentf043778bdc23c7b2baf18c1fc35ba47fa4d8386c (diff)
downloadrsyslog-617a7aaa1dc4569e6c151a14889bffe808f984c5.zip
rsyslog-617a7aaa1dc4569e6c151a14889bffe808f984c5.tar.gz
rsyslog-617a7aaa1dc4569e6c151a14889bffe808f984c5.tar.xz
bugfix: DA queue fixed handling of bad queue files.
-rw-r--r--ChangeLog4
-rw-r--r--runtime/queue.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d12e14c..a081893 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,10 @@ Version 5.8.13 [V5-stable] 2012-06-??
- bugfix: randomized IP option header in omudpspoof caused problems
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=327
Thanks to Rick Brown for helping to test out the patch.
+- bugfix: DA queue fixed handling of bad queue files. If old queue files
+ existed, they were not truncated when being reused. this could lead to
+ extra data being read from them and in consequence data format errors,
+ which could cause trouble to the queue handler.
---------------------------------------------------------------------------
Version 5.8.12 [V5-stable] 2012-06-06
- add small delay (50ms) after sending shutdown message
diff --git a/runtime/queue.c b/runtime/queue.c
index 280ebd9..6a1cf44 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -707,7 +707,7 @@ static rsRetVal qConstructDisk(qqueue_t *pThis)
CHKiRet(strm.SetbSync(pThis->tVars.disk.pWrite, pThis->bSyncQueueFiles));
CHKiRet(strm.SetDir(pThis->tVars.disk.pWrite, glbl.GetWorkDir(), strlen((char*)glbl.GetWorkDir())));
CHKiRet(strm.SetiMaxFiles(pThis->tVars.disk.pWrite, 10000000));
- CHKiRet(strm.SettOperationsMode(pThis->tVars.disk.pWrite, STREAMMODE_WRITE));
+ CHKiRet(strm.SettOperationsMode(pThis->tVars.disk.pWrite, STREAMMODE_WRITE_TRUNC));
CHKiRet(strm.SetsType(pThis->tVars.disk.pWrite, STREAMTYPE_FILE_CIRCULAR));
CHKiRet(strm.ConstructFinalize(pThis->tVars.disk.pWrite));