summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--action.c2
-rw-r--r--runtime/msg.c12
3 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 718affeb..fc9a3b04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,8 @@ Version 5.9.8 [V5-BETA], 2012-05-??
If it is not present, it must have the nilvalue "-" as of RFC5424
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=332
Thanks to John N for reporting this issue.
+- bugfix: "last message repeated n times" message was missing hostname
+ Thanks to Zdenek Salvet for finding this bug and to Bodik for reporting
---------------------------------------------------------------------------
Version 5.9.7 [V5-BETA], 2012-05-10
- added capability to specify substrings for field extraction mode
@@ -175,6 +177,10 @@ Version 5.9.0 [V5-DEVEL] (rgerhards), 2011-06-08
affected directive was: $ActionExecOnlyWhenPreviousIsSuspended on
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=236
---------------------------------------------------------------------------
+Version 5.8.13 [V5-stable] 2012-06-??
+- bugfix: "last message repeated n times" message was missing hostname
+ Thanks to Zdenek Salvet for finding this bug and to Bodik for reporting
+---------------------------------------------------------------------------
Version 5.8.12 [V5-stable] 2012-06-06
- add small delay (50ms) after sending shutdown message
There seem to be cases where the shutdown message is otherwise not
diff --git a/action.c b/action.c
index a9b8c3b1..f131e53d 100644
--- a/action.c
+++ b/action.c
@@ -1003,7 +1003,7 @@ tryDoAction(action_t *pAction, batch_t *pBatch, int *pnElem)
i = pBatch->iDoneUpTo; /* all messages below that index are processed */
iElemProcessed = 0;
iCommittedUpTo = i;
-dbgprintf("XXXXX: tryDoAction %p, pnElem %d, nElem %d\n", pAction, *pnElem, pBatch->nElem);
+ DBGPRINTF("tryDoAction %p, pnElem %d, nElem %d\n", pAction, *pnElem, pBatch->nElem);
while(iElemProcessed <= *pnElem && i < pBatch->nElem) {
if(*(pBatch->pbShutdownImmediate))
ABORT_FINALIZE(RS_RET_FORCE_TERM);
diff --git a/runtime/msg.c b/runtime/msg.c
index 1b0f2323..01bafb86 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -982,11 +982,15 @@ msg_t* MsgDup(msg_t* pOld)
} else {
tmpCOPYSZ(RawMsg);
}
- if(pOld->iLenHOSTNAME < CONF_HOSTNAME_BUFSIZE) {
- memcpy(pNew->szHOSTNAME, pOld->szHOSTNAME, pOld->iLenHOSTNAME + 1);
- pNew->pszHOSTNAME = pNew->szHOSTNAME;
+ if(pOld->pszHOSTNAME == NULL) {
+ pNew->pszHOSTNAME = NULL;
} else {
- tmpCOPYSZ(HOSTNAME);
+ if(pOld->iLenHOSTNAME < CONF_HOSTNAME_BUFSIZE) {
+ memcpy(pNew->szHOSTNAME, pOld->szHOSTNAME, pOld->iLenHOSTNAME + 1);
+ pNew->pszHOSTNAME = pNew->szHOSTNAME;
+ } else {
+ tmpCOPYSZ(HOSTNAME);
+ }
}
tmpCOPYCSTR(ProgName);