summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--msg.c4
2 files changed, 4 insertions, 1 deletions
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")) {