summaryrefslogtreecommitdiffstats
path: root/plugins/imklog
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-17 10:58:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-17 10:58:30 +0200
commite1791996b81b486e53a36ec753c3bb595f671983 (patch)
tree67f468124cda86d5898a755b9026c8b936925bed /plugins/imklog
parent4824e56aed37b5edffc883cb53c91f0b61c3df62 (diff)
downloadrsyslog-e1791996b81b486e53a36ec753c3bb595f671983.tar.gz
rsyslog-e1791996b81b486e53a36ec753c3bb595f671983.tar.xz
rsyslog-e1791996b81b486e53a36ec753c3bb595f671983.zip
moved host/domain-name related variables to global data pool
Diffstat (limited to 'plugins/imklog')
-rw-r--r--plugins/imklog/imklog.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
index 1166b666..e5888620 100644
--- a/plugins/imklog/imklog.c
+++ b/plugins/imklog/imklog.c
@@ -52,12 +52,14 @@
#include "module-template.h"
#include "datetime.h"
#include "imklog.h"
+#include "glbl.h"
MODULE_TYPE_INPUT
/* Module static data */
DEF_IMOD_STATIC_DATA
DEFobjCurrIf(datetime)
+DEFobjCurrIf(glbl)
/* configuration settings */
int dbgPrintSymbols = 0; /* this one is extern so the helpers can access it! */
@@ -95,7 +97,7 @@ enqMsg(uchar *msg, uchar* pszTag, int iFacility, int iSeverity)
MsgSetUxTradMsg(pMsg, (char*)msg);
MsgSetRawMsg(pMsg, (char*)msg);
MsgSetMSG(pMsg, (char*)msg);
- MsgSetHOSTNAME(pMsg, (char*)LocalHostName);
+ MsgSetHOSTNAME(pMsg, (char*)glbl.GetLocalHostName());
MsgSetTAG(pMsg, (char*)pszTag);
pMsg->iFacility = LOG_FAC(iFacility);
pMsg->iSeverity = LOG_PRI(iSeverity);
@@ -225,6 +227,7 @@ ENDafterRun
BEGINmodExit
CODESTARTmodExit
/* release objects we used */
+ objRelease(glbl, CORE_COMPONENT);
objRelease(datetime, CORE_COMPONENT);
ENDmodExit
@@ -251,6 +254,7 @@ CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(datetime, CORE_COMPONENT));
+ CHKiRet(objUse(glbl, CORE_COMPONENT));
iFacilIntMsg = klogFacilIntMsg();