summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-23 16:32:29 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-23 16:32:29 +0200
commit662ad3e4bf8dbd317d18aa1afcbf3e8b9e424506 (patch)
treee4c346465041a26de7237ffaeca0aa711d007263 /plugins
parent86e37f70fe0e9de0e00362990c73536843c8fef3 (diff)
downloadrsyslog-662ad3e4bf8dbd317d18aa1afcbf3e8b9e424506.tar.gz
rsyslog-662ad3e4bf8dbd317d18aa1afcbf3e8b9e424506.tar.xz
rsyslog-662ad3e4bf8dbd317d18aa1afcbf3e8b9e424506.zip
optimized hostname processing
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imfile/imfile.c2
-rw-r--r--plugins/imklog/imklog.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index 0f5f49dc..631d02ff 100644
--- a/plugins/imfile/imfile.c
+++ b/plugins/imfile/imfile.c
@@ -100,7 +100,7 @@ static rsRetVal enqLine(fileInfo_t *pInfo, cstr_t *cstrLine)
MsgSetInputName(pMsg, UCHAR_CONSTANT("imfile"), sizeof("imfile")-1);
MsgSetRawMsg(pMsg, (char*)rsCStrGetSzStr(cstrLine), cstrLen(cstrLine));
MsgSetMSGoffs(pMsg, 0); /* we do not have a header... */
- MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName());
+ MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName()));
MsgSetTAG(pMsg, pInfo->pszTag, pInfo->lenTag);
pMsg->iFacility = LOG_FAC(pInfo->iFacility);
pMsg->iSeverity = LOG_PRI(pInfo->iSeverity);
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
index 67fdc8a3..f63d60ac 100644
--- a/plugins/imklog/imklog.c
+++ b/plugins/imklog/imklog.c
@@ -100,7 +100,7 @@ enqMsg(uchar *msg, uchar* pszTag, int iFacility, int iSeverity)
MsgSetMSGoffs(pMsg, 0); /* we do not have a header... */
MsgSetRcvFrom(pMsg, glbl.GetLocalHostName());
MsgSetRcvFromIP(pMsg, (uchar*)"127.0.0.1");
- MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName());
+ MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName()));
MsgSetTAG(pMsg, pszTag, ustrlen(pszTag));
pMsg->iFacility = LOG_FAC(iFacility);
pMsg->iSeverity = LOG_PRI(iSeverity);