Skip to content

Commit

Permalink
lib-sieve: Never return SIEVE_EXEC_FAILURE from keep action.
Browse files Browse the repository at this point in the history
Always return SIEVE_EXEC_KEEP_FAILED instead.
  • Loading branch information
stephanbosch authored and villesavolainen committed Apr 27, 2018
1 parent d085616 commit 9c01bec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib-sieve/sieve-result.c
Expand Up @@ -1058,6 +1058,8 @@ static int _sieve_result_implicit_keep
(&act_keep, aenv, tr_context, status);
}

if (status == SIEVE_EXEC_FAILURE)
status = SIEVE_EXEC_KEEP_FAILED;
return status;
}

Expand Down Expand Up @@ -1286,6 +1288,13 @@ static int sieve_result_action_commit_or_rollback
sieve_result_action_rollback(result, rac);
}

if (rac->keep) {
if (status == SIEVE_EXEC_FAILURE)
status = SIEVE_EXEC_KEEP_FAILED;
if (*commit_status == SIEVE_EXEC_FAILURE)
*commit_status = SIEVE_EXEC_KEEP_FAILED;
}

return status;
}

Expand Down

0 comments on commit 9c01bec

Please sign in to comment.