diff options
-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) | |||
385 | cur_selector = next_selector; | 385 | cur_selector = next_selector; |
386 | } while (cur_selector); | 386 | } while (cur_selector); |
387 | 387 | ||
388 | /* check whether current file name was mentioned in previous rules. | 388 | /* check whether current file name was mentioned in previous rules or |
389 | * temporarily use cur_rule as iterator, but *pp_rule still points to | 389 | * as global logfile (G.logFile). |
390 | * currently processing rule entry. | 390 | */ |
391 | if (strcmp(G.logFile.path, tok[1]) == 0) { | ||
392 | cur_rule->file = &G.logFile; | ||
393 | goto found; | ||
394 | } | ||
395 | /* temporarily use cur_rule as iterator, but *pp_rule still points | ||
396 | * to currently processing rule entry. | ||
391 | * NOTE: *pp_rule points to the current (and last in the list) rule. | 397 | * NOTE: *pp_rule points to the current (and last in the list) rule. |
392 | */ | 398 | */ |
393 | for (cur_rule = G.log_rules; cur_rule != *pp_rule; cur_rule = cur_rule->next) { | 399 | for (cur_rule = G.log_rules; cur_rule != *pp_rule; cur_rule = cur_rule->next) { |