diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2012-07-31 08:19:37 -0700 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2012-07-31 08:19:37 -0700 |
commit | 617a7aaa1dc4569e6c151a14889bffe808f984c5 (patch) | |
tree | addb4da0a8256a796d480ec440de0567d27e5b97 | |
parent | f043778bdc23c7b2baf18c1fc35ba47fa4d8386c (diff) | |
download | rsyslog-617a7aaa1dc4569e6c151a14889bffe808f984c5.tar.gz rsyslog-617a7aaa1dc4569e6c151a14889bffe808f984c5.tar.xz rsyslog-617a7aaa1dc4569e6c151a14889bffe808f984c5.zip |
bugfix: DA queue fixed handling of bad queue files.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | runtime/queue.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 280ebd94..6a1cf446 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)); |