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-38-g447719f


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-3.1.1-38-g447719f
Date: Tue, 17 Jan 2017 15:00:31 +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=447719f64f327cb136b835b318294c23ebe0f16c

The branch, master has been updated
       via  447719f64f327cb136b835b318294c23ebe0f16c (commit)
       via  206b664ae62807ce41779a087251f56cdfe957bd (commit)
      from  fdf27cc40bc54494c89e86da5dfdce8b0248f2d3 (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 447719f64f327cb136b835b318294c23ebe0f16c
Author: Sergey Poznyakoff <address@hidden>
Date:   Tue Jan 17 16:23:59 2017 +0200

    Remove unnecessary mu_message_t flag (MESSAGE_MIME_OWNER)

commit 206b664ae62807ce41779a087251f56cdfe957bd
Author: Sergey Poznyakoff <address@hidden>
Date:   Mon Jan 16 17:18:09 2017 +0200

    Minor changes
    
    * configure.ac: Set version 3.1.91
    * NEWS: Update.
    * doc/texinfo/programs.texi: Minor change.
    * libmailutils/mime/mime.c (_mime_part_size)
    (_mime_body_lines): Fix counting. Return 0 if MIME is empty.

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

Summary of changes:
 NEWS                            |    6 +++---
 configure.ac                    |    2 +-
 doc/texinfo/programs.texi       |    2 +-
 include/mailutils/sys/message.h |    1 -
 libmailutils/mailbox/msgmulti.c |    3 +--
 libmailutils/mime/mime.c        |   25 ++++++++++++++++---------
 testsuite/mimetest.c            |    2 +-
 7 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/NEWS b/NEWS
index 1885cf2..3aef4f2 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ See the end of file for copying conditions.
 Please send mailutils bug reports to <address@hidden>.
 
 
-Version 3.1.90 (Git)
+Version 3.1.91 (Git)
 
 * mail
 
@@ -20,11 +20,11 @@ description), and file name:
      
   --content-filename=NAME
      Sets the file name (the "filename" parameter in the
-     Content-Description MIME header of the outgoing message.
+     Content-Description MIME header of the outgoing message).
 
 Both options affect only the next `--attach' or `--attach-fd' option.
 
-* Constructing attachments from command line
+** Constructing attachments from command line
 
 The new option `--attach-fd=N' instructs mail to read attachment from
 file descriptor N.  By default, the attachments created using this
diff --git a/configure.ac b/configure.ac
index 49b1788..e02befd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public 
License along
 dnl with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.63)
-AC_INIT([GNU Mailutils], [3.1.90], address@hidden, [mailutils],
+AC_INIT([GNU Mailutils], [3.1.91], address@hidden, [mailutils],
         [http://mailutils.org])
 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
 AC_CONFIG_AUX_DIR([build-aux])
diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index 7b5892b..ee82ecf 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -2879,7 +2879,7 @@ Prints additional debugging output.
 
 @item -s @var{string}
 @itemx address@hidden
-Prints only mail whose @samp{From:} headers contain the supplied string.
+Prints only mail with @samp{From:} header containing the supplied string.
 @FIXME{Probably, this should test envelopes as well.}
 
 @item -f @var{url}
diff --git a/include/mailutils/sys/message.h b/include/mailutils/sys/message.h
index d638def..18c1be0 100644
--- a/include/mailutils/sys/message.h
+++ b/include/mailutils/sys/message.h
@@ -32,7 +32,6 @@ extern "C" {
 
 #define MESSAGE_MODIFIED        0x10000
 #define MESSAGE_INTERNAL_STREAM 0x20000
-#define MESSAGE_MIME_OWNER      0x40000
 
 struct _mu_message
 {
diff --git a/libmailutils/mailbox/msgmulti.c b/libmailutils/mailbox/msgmulti.c
index 0505e9b..bb8729c 100644
--- a/libmailutils/mailbox/msgmulti.c
+++ b/libmailutils/mailbox/msgmulti.c
@@ -36,9 +36,8 @@ mu_message_is_multipart (mu_message_t msg, int *pmulti)
          int status = mu_mime_create (&msg->mime, msg, 0);
          if (status != 0)
            return 0;
-         msg->flags |= MESSAGE_MIME_OWNER;
        }
-      *pmulti = mu_mime_is_multipart(msg->mime);
+      *pmulti = mu_mime_is_multipart (msg->mime);
     }
   return 0;
 }
diff --git a/libmailutils/mime/mime.c b/libmailutils/mime/mime.c
index f69cbc8..968ada8 100644
--- a/libmailutils/mime/mime.c
+++ b/libmailutils/mime/mime.c
@@ -545,8 +545,11 @@ _mime_part_size (mu_mime_t mime, size_t *psize)
   int ret;
 
   if (mime->nmtp_parts == 0)
-    return EINVAL;
-
+    {
+      *psize = 0;
+      return 0;
+    }
+  
   if ((ret = _mime_set_content_type (mime)) != 0)
     return ret;
   if (mime->nmtp_parts == 1)
@@ -855,20 +858,26 @@ _mime_body_lines (mu_body_t body, size_t *plines)
   mu_message_t       msg = mu_body_get_owner (body);
   mu_mime_t          mime = mu_message_get_owner (msg);
   int             i, ret;
-  size_t          lines;
+  size_t          total = 0;
 
   if (mime->nmtp_parts == 0)
-    return EINVAL;
-
+    {
+      *plines = 0;
+      return 0;
+    }
+  
   if ((ret = _mime_set_content_type (mime)) != 0)
     return ret;
   for (i = 0; i < mime->nmtp_parts; i++)
     {
+      size_t lines;
+      
       mu_message_lines (mime->mtp_parts[i]->msg, &lines);
-      plines += lines;
+      total += lines;
       if (mime->nmtp_parts > 1)        /* boundary line */
-       plines++;
+       total++;
     }
+  *plines = total;
   return 0;
 }
 
@@ -1065,7 +1074,6 @@ mu_mime_get_num_parts (mu_mime_t mime, size_t *nmtp_parts)
     }
   *nmtp_parts = mime->nmtp_parts;
   return (ret);
-
 }
 
 int
@@ -1140,7 +1148,6 @@ mu_mime_to_message (mu_mime_t mime, mu_message_t *pmsg)
   if (rc == 0)
     {
       mu_message_unref (msg);
-      msg->flags |= MESSAGE_MIME_OWNER;
       mime->msg = NULL;
       mu_mime_ref (mime);
       *pmsg = msg;
diff --git a/testsuite/mimetest.c b/testsuite/mimetest.c
index 1e4f594..8ec5088 100644
--- a/testsuite/mimetest.c
+++ b/testsuite/mimetest.c
@@ -29,7 +29,7 @@
 
 #include <mailutils/mailutils.h>
 
-void message_display_parts(mu_message_t msg, int indent);
+void message_display_parts (mu_message_t msg, int indent);
 
 const char *from;
 const char *subject;


hooks/post-receive
-- 
GNU Mailutils



reply via email to

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