Commit 1054c90a authored by Petr Machata's avatar Petr Machata

filter_matches_library should loop all filters in a chain

At least that's what filter_matches_symbol does.
parent 8bda1ee2
......@@ -147,15 +147,17 @@ filter_matches_library(struct filter *filt, struct library *lib)
if (filt == NULL)
return 0;
struct filter_rule *it;
for (it = filt->rules; it != NULL; it = it->next)
switch (it->type) {
case FR_ADD:
if (matcher_matches_library(it->lib_matcher, lib))
return 1;
case FR_SUBTRACT:
continue;
};
for (; filt != NULL; filt = filt->next) {
struct filter_rule *it;
for (it = filt->rules; it != NULL; it = it->next)
switch (it->type) {
case FR_ADD:
if (matcher_matches_library(it->lib_matcher, lib))
return 1;
case FR_SUBTRACT:
continue;
};
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment