syslogd: small fix to config patch
Signed-off-by: Sergey Naumov <sknaumov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
d506897b4e
commit
e9c8bed4d3
@ -385,9 +385,15 @@ static void parse_syslogdcfg(const char *file)
|
|||||||
cur_selector = next_selector;
|
cur_selector = next_selector;
|
||||||
} while (cur_selector);
|
} while (cur_selector);
|
||||||
|
|
||||||
/* check whether current file name was mentioned in previous rules.
|
/* check whether current file name was mentioned in previous rules or
|
||||||
* temporarily use cur_rule as iterator, but *pp_rule still points to
|
* as global logfile (G.logFile).
|
||||||
* currently processing rule entry.
|
*/
|
||||||
|
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.
|
* 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) {
|
for (cur_rule = G.log_rules; cur_rule != *pp_rule; cur_rule = cur_rule->next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user