Rules read in from per-dir merge files need to have non-applicable

rules filtered out before the rule gets stored (not in a post-
filtering pass like the rules that are read-in prior to the run).
This commit is contained in:
Wayne Davison committed 2005-02-19 03:12:21 +00:00
1 parent 591b908fbf
commit 6d7b3d52dc
1 file changed
+13
+13
View File
@@ -133,6 +133,19 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
listp->debug_type);
}
/* This flag also indicates that we're reading a list that
* needs to be filtered now, not post-filtered later. */
if (xflags & XFLG_ANCHORED2ABS) {
uint32 mf = mflags & (MATCHFLG_RECEIVER_SIDE|MATCHFLG_SENDER_SIDE);
if (am_sender) {
if (mf == MATCHFLG_RECEIVER_SIDE)
return;
} else {
if (mf == MATCHFLG_SENDER_SIDE)
return;
}
}
if (!(ret = new(struct filter_struct)))
out_of_memory("add_rule");
memset(ret, 0, sizeof ret[0]);