diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2011-08-18 15:41:22 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2011-08-18 15:41:22 +0200 |
commit | 53135efb4e793da3eb94d9e42c340484192aefcf (patch) | |
tree | 804f0b982ec849c8b0b128be8847e722ecfa5694 | |
parent | 803462104b4eb319c05ea0f6e30c0b04548a1ed0 (diff) | |
parent | 154747929f87010b444af2d552f980daafe451e6 (diff) | |
download | rsyslog-53135efb4e793da3eb94d9e42c340484192aefcf.tar.gz rsyslog-53135efb4e793da3eb94d9e42c340484192aefcf.tar.xz rsyslog-53135efb4e793da3eb94d9e42c340484192aefcf.zip |
Merge branch 'v5-stable' into v5-devel
Conflicts:
configure.ac
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | action.c | 17 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | runtime/queue.c | 9 |
4 files changed, 28 insertions, 3 deletions
@@ -84,6 +84,9 @@ Version 5.8.5 [V5-stable] (rgerhards/al), 2011-??-?? - bugfix: potential hang condition during tag emulation - bugfix: too-early string termination during tag emulation - bugfix: The NUL-Byte for the syslogtag was not copied in MsgDup (msg.c) +- bugfix: fixed incorrect state handling for Discard Action (transactions) + Note: This caused all messages in a batch to be set to COMMITTED, + even if they were discarded. --------------------------------------------------------------------------- Version 5.8.4 [V5-stable] (al), 2011-08-10 - bugfix: potential misadressing in property replacer @@ -985,13 +985,17 @@ dbgprintf("XXXXX: tryDoAction %p, pnElem %d, nElem %d\n", pAction, *pnElem, /* mark messages as committed */ while(iCommittedUpTo <= i) { pBatch->pElem[iCommittedUpTo].bPrevWasSuspended = 0; /* we had success! */ - pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM; + batchSetElemState(pBatch, iCommittedUpTo, BATCH_STATE_COMM); + ++iCommittedUpTo; + //pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM; } } else if(localRet == RS_RET_PREVIOUS_COMMITTED) { /* mark messages as committed */ while(iCommittedUpTo < i) { pBatch->pElem[iCommittedUpTo].bPrevWasSuspended = 0; /* we had success! */ - pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM; + batchSetElemState(pBatch, iCommittedUpTo, BATCH_STATE_COMM); + ++iCommittedUpTo; + //pBatch->pElem[iCommittedUpTo++].state = BATCH_STATE_COMM; } pBatch->pElem[i].state = BATCH_STATE_SUB; } else if(localRet == RS_RET_DEFER_COMMIT) { @@ -1016,6 +1020,15 @@ finalize_it: RETiRet; } +/* debug aid */ +static void displayBatchState(batch_t *pBatch) +{ + int i; + for(i = 0 ; i < pBatch->nElem ; ++i) { + dbgprintf("XXXXX: displayBatchState2 %p[%d]: %d\n", pBatch, i, pBatch->pElem[i].state); + } +} + /* submit a batch for actual action processing. * The first nElem elements are processed. This function calls itself diff --git a/configure.ac b/configure.ac index 023a447c..5d6fe7d7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.9.3-pre1],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.9.3-pre2],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/runtime/queue.c b/runtime/queue.c index c831836d..d81c552b 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -93,6 +93,15 @@ static rsRetVal qDestructDisk(qqueue_t *pThis); #define QUEUE_CHECKPOINT 1 #define QUEUE_NO_CHECKPOINT 0 +/* debug aid */ +static void displayBatchState(batch_t *pBatch) +{ + int i; + for(i = 0 ; i < pBatch->nElem ; ++i) { + dbgprintf("XXXXX: displayBatchState %p[%d]: %d\n", pBatch, i, pBatch->pElem[i].state); + } +} + /*********************************************************************** * we need a private data structure, the "to-delete" list. As C does * not provide any partly private data structures, we implement this |