summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--action.c2
-rw-r--r--runtime/msg.c12
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 36b98564..aaef8989 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------
+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 459ab0d6..26fcc2d1 100644
--- a/action.c
+++ b/action.c
@@ -961,7 +961,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 820a28a8..f9acb842 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);