commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-3.1-1-g678d936


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-3.1-1-g678d936
Date: Tue, 13 Dec 2016 21:49:40 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=678d936783f591bcf7c3f8acafd0152a3c1b0b61

The branch, master has been updated
       via  678d936783f591bcf7c3f8acafd0152a3c1b0b61 (commit)
      from  6f32dede6a5a483b4f34c462baf64ae86d15b5f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 678d936783f591bcf7c3f8acafd0152a3c1b0b61
Author: Sergey Poznyakoff <address@hidden>
Date:   Tue Dec 13 23:42:59 2016 +0200

    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.

-----------------------------------------------------------------------

Summary of changes:
 libmu_sieve/runtime.c |    2 +-
 libmu_sieve/tests.c   |    8 +++-----
 maidag/script.c       |   17 +++++++++--------
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/libmu_sieve/runtime.c b/libmu_sieve/runtime.c
index b067bc2..6d320a4 100644
--- a/libmu_sieve/runtime.c
+++ b/libmu_sieve/runtime.c
@@ -157,7 +157,7 @@ _mu_i_sv_instr_brnz (mu_sieve_machine_t mach)
 void
 mu_sieve_abort (mu_sieve_machine_t mach)
 {
-  longjmp (mach->errbuf, 1);
+  longjmp (mach->errbuf, MU_ERR_FAILURE);
 }
 
 void
diff --git a/libmu_sieve/tests.c b/libmu_sieve/tests.c
index ba0e6e6..00612c1 100644
--- a/libmu_sieve/tests.c
+++ b/libmu_sieve/tests.c
@@ -67,6 +67,8 @@ retrieve_address (void *item, void *data, size_t idx, char 
**pval)
       rc = mu_header_aget_value ((mu_header_t)ap->data, (char*)item, &val);
       if (rc)
        return rc;
+      if (mu_str_skip_class (val, MU_CTYPE_BLANK)[0] == 0)
+       return MU_ERR_NOENT;
       rc = mu_address_create (&ap->addr, val);
       free (val);
       if (rc)
@@ -150,11 +152,7 @@ retrieve_header (void *item, void *data, size_t idx, char 
**pval)
        {
          int i = hc->index++;
          if (mu_c_strcasecmp (hname, (char*)item) == 0)
-           {
-             if (mu_header_aget_field_value_unfold (hc->header, i, pval))
-               return -1;
-             return 0;
-           }
+           return mu_header_aget_field_value_unfold (hc->header, i, pval);
        }
 
       hc->header = NULL;
diff --git a/maidag/script.c b/maidag/script.c
index 5437ac4..96931bd 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;
 }


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]