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 d2996ee0..32cd1060 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,8 @@ Version 6.2.2 [v6-stable], 2012-05-??
Thanks to John N for reporting this issue.
- bugfix: did not compile under solaris due to $uptime property code
For the time being, $uptime is not supported on Solaris
+- bugfix: "last message repeated n times" message was missing hostname
+ Thanks to Zdenek Salvet for finding this bug and to Bodik for reporting
---------------------------------------------------------------------------
Version 6.2.1 [v6-stable], 2012-05-10
- change plugin config interface to be compatible with pre-v6.2 system
@@ -301,6 +303,10 @@ Version 5.9.0 [V5-DEVEL] (rgerhards), 2011-03-??
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 dfd11694..e3a58bab 100644
--- a/action.c
+++ b/action.c
@@ -967,7 +967,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 5f2efc8c..7c1c13a5 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -997,11 +997,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);