diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2016-12-13 23:42:59 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-12-13 23:47:33 +0200 |
commit | 678d936783f591bcf7c3f8acafd0152a3c1b0b61 (patch) | |
tree | 648dd27f9de3149ee1312c64216f848db7bbe415 /maidag | |
parent | 6f32dede6a5a483b4f34c462baf64ae86d15b5f9 (diff) | |
download | mailutils-678d936783f591bcf7c3f8acafd0152a3c1b0b61.tar.gz mailutils-678d936783f591bcf7c3f8acafd0152a3c1b0b61.tar.bz2 |
Minor changes in sieve.
* libmu_sieve/runtime.c (mu_sieve_abort): Jump with code MU_ERR_FAILURE.
* libmu_sieve/tests.c (retrieve_address): Tolerate empty addresses.
(retrieve_header): Return reasonable error code.
* maidag/script.c (script_apply): If the script failed, return 0.
Diffstat (limited to 'maidag')
-rw-r--r-- | maidag/script.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/maidag/script.c b/maidag/script.c index 5437ac408..96931bdff 100644 --- a/maidag/script.c +++ b/maidag/script.c @@ -98,13 +98,6 @@ apply_script (void *item, void *data) free (progfile); - if (rc == 0) - { - mu_attribute_t attr; - mu_message_get_attribute (clos->msg, &attr); - rc = mu_attribute_is_deleted (attr); - } - return rc; } @@ -129,7 +122,15 @@ script_apply (mu_message_t msg, struct mu_auth_data *auth) rc = mu_list_foreach (script_list, apply_script, &clos); chdir ("/"); switch_user_id (auth, 0); - } + if (rc == 0) + { + mu_attribute_t attr; + mu_message_get_attribute (msg, &attr); + rc = mu_attribute_is_deleted (attr); + } + else + rc = 0; + } } return rc; } |