summaryrefslogtreecommitdiff
path: root/syslogd/main.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-06-17 16:27:10 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-06-17 16:27:26 +0200
commit8a8f49a501fd109bcb722afff7eb2c7852a04107 (patch)
tree10702f4086c6df7720c53ed4de5f81cb0d308c38 /syslogd/main.c
parentf1cc12f55ebb51209cb26e71985d35c5e6671520 (diff)
usyslogd: do logfile lookup by facility number
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'syslogd/main.c')
-rw-r--r--syslogd/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/syslogd/main.c b/syslogd/main.c
index b1b70b0..79d6325 100644
--- a/syslogd/main.c
+++ b/syslogd/main.c
@@ -134,12 +134,12 @@ static int print_to_log(const syslog_msg_t *msg)
return -1;
for (log = logfiles; log != NULL; log = log->next) {
- if (!strcmp(log->name, fac_name))
+ if (log->facility == msg->facility)
break;
}
if (log == NULL) {
- log = logfile_create(fac_name);
+ log = logfile_create(fac_name, msg->facility);
if (log == NULL)
return -1;
log->next = logfiles;