summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2005-03-08 15:42:27 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2005-03-08 15:42:27 +0000
commitfcce2dc29374d1cf3aaeea291bfeec168a09c33b (patch)
tree48d89d1c8dfc85b491e6087cf64f16c80e003e09 /syslogd.c
parentdd3279ef78b95df70c1315bd39be68964c1771c5 (diff)
downloadrsyslog-fcce2dc29374d1cf3aaeea291bfeec168a09c33b.tar.gz
rsyslog-fcce2dc29374d1cf3aaeea291bfeec168a09c33b.tar.xz
rsyslog-fcce2dc29374d1cf3aaeea291bfeec168a09c33b.zip
fixed a bug: on internally-generated messages, the HOSTNAME was not set
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/syslogd.c b/syslogd.c
index 2c79f4af..85969c1f 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -535,7 +535,9 @@ static char sccsid[] = "@(#)rsyslogd.c 0.2 (Adiscon) 11/08/2004";
#define CONT_LINE 1 /* Allow continuation lines */
+#ifdef MTRACE
#include <mcheck.h>
+#endif
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -2057,8 +2059,10 @@ int main(argc, argv)
*/
fd_set readfds;
+#ifdef MTRACE
mtrace(); /* this is a debug aid for leak detection - either remove
* or put in conditional compilation. 2005-01-18 RGerhards */
+#endif
#ifndef TESTING
int fd;
@@ -2852,6 +2856,7 @@ void logmsgInternal(pri, msg, from, flags)
if(MsgSetUxTradMsg(pMsg, msg) != 0) return;
if(MsgSetRawMsg(pMsg, msg) != 0) return;
+ if(MsgSetHOSTNAME(pMsg, LocalHostName) != 0) return;
pMsg->iFacility = LOG_FAC(pri);
pMsg->iSeverity = LOG_PRI(pri);
pMsg->iMsgSource = SOURCE_INTERNAL;