[SCM] GNU Mailutils branch, patches-2.2, updated. release-2.2-8-gdd13ded

"Sergey Poznyakoff" <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.cvs
Message-ID <[email protected]>
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=dd13dedfe0580e391e2a082ff9d1ac842292a4eb

The branch, patches-2.2 has been updated
       via  dd13dedfe0580e391e2a082ff9d1ac842292a4eb (commit)
       via  81cd471c86dafffd89d517e5b9dcf2be3c16b1e5 (commit)
      from  a70b48462860546915aa3f71d0fb16b871ef2f62 (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 dd13dedfe0580e391e2a082ff9d1ac842292a4eb
Author: Sergey Poznyakoff <[email protected]>
Date:   Fri Sep 24 14:46:45 2010 +0300

    Fix hex (%XX) expansion in URLs.
    
    * mailbox/url.c (url_parse0): Take three arguments.  Return in the
    third one a boolean indicating whether to expand %XX notations in
    the URL.  Do not decode absolute file names and pipes.
    (mu_url_parse): Use this value to decide.
    * movemail/movemail.c (main): In emacs mode: force UNIX mbox
    format as a default.  Send debugging output to stderr.

commit 81cd471c86dafffd89d517e5b9dcf2be3c16b1e5
Author: Sergey Poznyakoff <[email protected]>
Date:   Thu Sep 23 15:40:24 2010 +0300

    imap4d: bugfix:
    
    * imap4d/fetch.c (fetch_io): Fix a memory allocation error.

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

Summary of changes:
 imap4d/fetch.c      |    2 +-
 mailbox/url.c       |   35 ++++++++++++++++++++---------------
 movemail/movemail.c |    8 ++++++++
 3 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/imap4d/fetch.c b/imap4d/fetch.c
index ef7d6ce..0b71487 100644
--- a/imap4d/fetch.c
+++ b/imap4d/fetch.c
@@ -731,7 +731,7 @@ fetch_io (mu_stream_t stream, size_t start, size_t size, size_t max)
       char *buffer, *p;
       size_t total = 0;
       offset = start;
-      p = buffer = malloc (size + 1);
+      p = buffer = malloc (size + 2);
       if (!p)
 	imap4d_bye (ERR_NO_MEM);
       
diff --git a/mailbox/url.c b/mailbox/url.c
index 1b833bf..f46fbc1 100644
--- a/mailbox/url.c
+++ b/mailbox/url.c
@@ -40,7 +40,7 @@
 #define AC2(a,b) a ## b
 #define AC4(a,b,c,d) a ## b ## c ## d
 
-static int url_parse0 (mu_url_t, char *, size_t *poff);
+static int url_parse0 (mu_url_t, char *, size_t *poff, int *decode);
 
 static int
 parse_query (const char *query,
@@ -286,7 +286,8 @@ mu_url_parse (mu_url_t url)
   struct _mu_url u;
   size_t pstart;
   mu_secret_t newsec;
-
+  int want_decode;
+  
   if (!url || !url->name)
     return EINVAL;
 
@@ -301,7 +302,7 @@ mu_url_parse (mu_url_t url)
   if (!n)
     return ENOMEM;
 
-  err = url_parse0 (&u, n, &pstart);
+  err = url_parse0 (&u, n, &pstart, &want_decode);
 
   if (!err)
     {
@@ -331,17 +332,18 @@ mu_url_parse (mu_url_t url)
 	 though.
        */
 
-#define UALLOC(X)                                          \
-  if (u.X && u.X[0] && (url->X = mu_url_decode(u.X)) == 0) \
-    {                                                      \
-       err = ENOMEM;                                       \
-       goto CLEANUP;                                       \
-    }                                                      \
-  else                                                     \
-    {                                                      \
-       /* Set zero-length strings to NULL. */              \
-	u.X = NULL; \
-    }
+#define UALLOC(X)							\
+      if (u.X && u.X[0] &&						\
+	  !(url->X = (want_decode ? mu_url_decode (u.X) : strdup (u.X)))) \
+	{								\
+	  err = ENOMEM;							\
+	  goto CLEANUP;							\
+	}								\
+      else								\
+	{								\
+	  /* Set zero-length strings to NULL. */			\
+	  u.X = NULL;							\
+	}
 
       UALLOC (scheme);
       UALLOC (user);
@@ -420,7 +422,7 @@ Is this required to be % quoted, though? I hope so!
 */
 
 static int
-url_parse0 (mu_url_t u, char *name, size_t *poff)
+url_parse0 (mu_url_t u, char *name, size_t *poff, int *decode)
 {
   char *start = name;
   char *p;			/* pointer into name */
@@ -432,11 +434,13 @@ url_parse0 (mu_url_t u, char *name, size_t *poff)
   if (name[0] == '/')
     {
       u->scheme = "file";
+      *decode = 0;
     }
   else if (name[0] == '|')
     {
       int rc;
       u->scheme = "prog";
+      *decode = 0;
       rc = mu_argcv_get (name + 1, NULL, NULL, &u->qargc, &u->qargv);
       if (rc == 0)
 	{
@@ -448,6 +452,7 @@ url_parse0 (mu_url_t u, char *name, size_t *poff)
     }
   else
     {
+      *decode = 1;
       /* Parse out the SCHEME. */
       p = strchr (name, ':');
       if (p == NULL)
diff --git a/movemail/movemail.c b/movemail/movemail.c
index afb83e8..4e7bdb9 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -760,6 +760,14 @@ main (int argc, char **argv)
       return 1;
     }
 
+  if (emacs_mode)
+    {
+      /* Undo the effect of configuration options that may affect
+	 the interaction with Emacs. */
+      mu_registrar_set_default_record (mu_mbox_record);
+      mu_debug_default_printer = mu_debug_stderr_printer;
+    }
+  
   atexit (close_mailboxes);
   
   source_name = argv[0];


hooks/post-receive
-- 
GNU Mailutils
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.