diff options
author | Sergey Naumov <sknaumov@gmail.com> | 2011-04-16 19:36:15 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-16 19:36:15 +0200 |
commit | e9c8bed4d3b157097e89ee2611ca731e37ce8d7d (patch) | |
tree | 211764b1859f3a44a1cd411d7b8637f99a1fc74c /sysklogd | |
parent | d506897b4ef94a85013696d543686162293a02f1 (diff) | |
download | busybox-e9c8bed4d3b157097e89ee2611ca731e37ce8d7d.tar.gz |
syslogd: small fix to config patch
Signed-off-by: Sergey Naumov <sknaumov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/syslogd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 7ddd3e4c3..0799038e9 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -385,9 +385,15 @@ static void parse_syslogdcfg(const char *file) cur_selector = next_selector; } while (cur_selector); - /* check whether current file name was mentioned in previous rules. - * temporarily use cur_rule as iterator, but *pp_rule still points to - * currently processing rule entry. + /* check whether current file name was mentioned in previous rules or + * as global logfile (G.logFile). + */ + if (strcmp(G.logFile.path, tok[1]) == 0) { + cur_rule->file = &G.logFile; + goto found; + } + /* temporarily use cur_rule as iterator, but *pp_rule still points + * to currently processing rule entry. * NOTE: *pp_rule points to the current (and last in the list) rule. */ for (cur_rule = G.log_rules; cur_rule != *pp_rule; cur_rule = cur_rule->next) { |