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 /runtime/glbl.c | |
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
Diffstat (limited to 'runtime/glbl.c')
-rw-r--r-- | runtime/glbl.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); } |