From 5bf922d65a003fa3404290028aaf5b15e7c8420a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 9 May 2011 09:14:20 +0200 Subject: bugfix: $LocalHostName was not honored under all circumstances closes: http://bugzilla.adiscon.com/show_bug.cgi?id=258 --- ChangeLog | 2 ++ runtime/glbl.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 43a0c781..9681d911 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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); } -- cgit