diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-09 12:06:46 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-09 12:06:46 +0200 |
commit | b1ba4b813dfadad146d7a67504097f7abdc2b7da (patch) | |
tree | 95ad5ab0b8ffc4fa77a89a431a5d18ab677b910c | |
parent | 1be2f42bdc961bbe1ae02feae3e078eeb775ea24 (diff) | |
parent | 5bf922d65a003fa3404290028aaf5b15e7c8420a (diff) | |
download | rsyslog-b1ba4b813dfadad146d7a67504097f7abdc2b7da.tar.gz rsyslog-b1ba4b813dfadad146d7a67504097f7abdc2b7da.tar.xz rsyslog-b1ba4b813dfadad146d7a67504097f7abdc2b7da.zip |
Merge branch 'v5-stable' into v5-stable-snmptrapd
-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); } |