summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-03 09:14:05 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-03 09:14:05 +0000
commit6b982c8e5dbfd54eff7e22291d7f63400ff3c555 (patch)
tree8fb229d9eda20ca93af30d17a9383f45acb58e7d
parentd0ca3acbf971141b8826d0bb3a184eaadb2804c1 (diff)
downloadrsyslog-6b982c8e5dbfd54eff7e22291d7f63400ff3c555.tar.gz
rsyslog-6b982c8e5dbfd54eff7e22291d7f63400ff3c555.tar.xz
rsyslog-6b982c8e5dbfd54eff7e22291d7f63400ff3c555.zip
bugfix: $hostname and $fromhost in RainerScript did not work
-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")) {