From 6b982c8e5dbfd54eff7e22291d7f63400ff3c555 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 3 Apr 2008 09:14:05 +0000 Subject: bugfix: $hostname and $fromhost in RainerScript did not work --- ChangeLog | 1 + msg.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 66994c28..21f330e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Version 3.15.1 (rgerhards), 2008-04-?? - added more meaningful error messages to rsyslogd (when some errors happens during startup) - bugfix: memory leaks in script engine +- bugfix: $hostname and $fromhost in RainerScript did not work --------------------------------------------------------------------------- Version 3.15.0 (rgerhards), 2008-04-01 - major new feature: imrelp/omrelp support reliable delivery of syslog diff --git a/msg.c b/msg.c index 76ea2f72..7c020a61 100644 --- a/msg.c +++ b/msg.c @@ -1606,9 +1606,11 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, pRes = getRawMsg(pMsg); } else if(!strcmp((char*) pName, "UxTradMsg")) { pRes = getUxTradMsg(pMsg); - } else if(!strcmp((char*) pName, "FROMHOST")) { + } else if( !strcmp((char*) pName, "FROMHOST") + || !strcmp((char*) pName, "fromhost")) { pRes = getRcvFrom(pMsg); } else if(!strcmp((char*) pName, "source") + || !strcmp((char*) pName, "hostname") || !strcmp((char*) pName, "HOSTNAME")) { pRes = getHOSTNAME(pMsg); } else if(!strcmp((char*) pName, "syslogtag")) { -- cgit