diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-09 09:14:20 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-09 09:14:20 +0200 |
commit | 5bf922d65a003fa3404290028aaf5b15e7c8420a (patch) | |
tree | 32338298d6c9d62ac0b0225fe7cfafaa31f2c6e9 | |
parent | ec7501e7956f356d1e79a062340c244e67d5ef24 (diff) | |
download | rsyslog-5bf922d65a003fa3404290028aaf5b15e7c8420a.tar.gz rsyslog-5bf922d65a003fa3404290028aaf5b15e7c8420a.tar.xz rsyslog-5bf922d65a003fa3404290028aaf5b15e7c8420a.zip |
bugfix: $LocalHostName was not honored under all circumstances
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=258
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | runtime/glbl.c | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -23,6 +23,8 @@ Version 5.8.1 [V5-stable] (rgerhards), 2011-04-?? closes: http://bugzilla.adiscon.com/show_bug.cgi?id=250 - bugfix: TCP connection invalidly aborted when messages needed to be discarded (due to QUEUE_FULL or similar problem) +- bugfix: $LocalHostName was not honored under all circumstances + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=258 - bugfix(minor): improper template function call in syslogd.c --------------------------------------------------------------------------- Version 5.8.0 [V5-stable] (rgerhards), 2011-04-12 diff --git a/runtime/glbl.c b/runtime/glbl.c index 68eb276c..ec4992cf 100644 --- a/runtime/glbl.c +++ b/runtime/glbl.c @@ -188,6 +188,11 @@ GetLocalHostName(void) { uchar *pszRet; + if(LocalHostNameOverride != NULL) { + pszRet = LocalHostNameOverride; + goto done; + } + if(LocalHostName == NULL) pszRet = (uchar*) "[localhost]"; else { @@ -196,6 +201,7 @@ GetLocalHostName(void) else pszRet = LocalHostName; } +done: return(pszRet); } |