mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 19:20:12 +01:00
Fixed attachment rule evaluation
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
5e58f74981
commit
ee7f5d970b
@ -340,9 +340,12 @@ int check_attachment_rule(struct parser_state *state, struct rule *rule){
|
|||||||
size_t nmatch=0;
|
size_t nmatch=0;
|
||||||
int ismatch = 0;
|
int ismatch = 0;
|
||||||
|
|
||||||
if(state->n_attachments == 0) return RULE_UNDEF;
|
// If no attachment rule, then return RULE_UNDEF
|
||||||
|
if(rule->emptyaname == 1 && rule->emptyatype == 1 && rule->attachment_size == 0) return RULE_UNDEF;
|
||||||
|
|
||||||
|
// If we have attachments, but no attachment rules, then return RULE_NO_MATCH
|
||||||
|
if(state->n_attachments == 0 && (rule->emptyaname == 0 || rule->emptyatype == 0 || rule->attachment_size)) return RULE_NO_MATCH;
|
||||||
|
|
||||||
if(rule->emptyaname == 1 && rule->emptyatype == 1) return RULE_UNDEF;
|
|
||||||
|
|
||||||
for(i=1; i<=state->n_attachments; i++){
|
for(i=1; i<=state->n_attachments; i++){
|
||||||
ismatch = 0;
|
ismatch = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user