From 8d471ab9450d653dd40187f0476365cce0d3ce4f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 8 Jun 2012 14:36:59 +0200 Subject: bugfix: did not compile under solaris due to $uptime property code For the time being, $uptime is not supported on Solaris --- ChangeLog | 2 ++ runtime/msg.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 991e4630..d2996ee0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,8 @@ Version 6.2.2 [v6-stable], 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: did not compile under solaris due to $uptime property code + For the time being, $uptime is not supported on Solaris --------------------------------------------------------------------------- Version 6.2.1 [v6-stable], 2012-05-10 - change plugin config interface to be compatible with pre-v6.2 system diff --git a/runtime/msg.c b/runtime/msg.c index e09b8705..5f2efc8c 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2565,6 +2565,10 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, *pbMustBeFreed = 0; break; case PROP_SYS_UPTIME: +# ifdef OS_SOLARIS + pRes = (uchar*) "UPTIME NOT available under Solaris"; + *pbMustBeFreed = 0; +# else { struct sysinfo s_info; @@ -2580,6 +2584,7 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, snprintf((char*) pRes, sizeof(uchar) * 32, "%ld", s_info.uptime); } +# endif break; default: /* there is no point in continuing, we may even otherwise render the -- cgit v1.2.3 From 3ebbb9c4bbfe5d4a815861afde28df47d35b022e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 11 Jun 2012 18:20:08 +0200 Subject: bugfix: "last message repeated n times" message was missing hostname Thanks to Zdenek Salvet for finding this bug and to Bodik for reporting --- ChangeLog | 4 ++++ action.c | 2 +- runtime/msg.c | 12 ++++++++---- 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); -- cgit v1.2.3