From MAILER-DAEMON Sun Oct 20 14:20:31 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VXxc7-0004Th-HE
	for mharc-commit-mailutils@gnu.org; Sun, 20 Oct 2013 14:20:31 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58846)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1VXxc5-0004TZ-6Y
	for commit-mailutils@gnu.org; Sun, 20 Oct 2013 14:20:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1VXxc3-0002ch-U4
	for commit-mailutils@gnu.org; Sun, 20 Oct 2013 14:20:29 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:40045)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1VXxc3-0002bt-MF
	for commit-mailutils@gnu.org; Sun, 20 Oct 2013 14:20:27 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1VXxc1-00041K-FF
	for commit-mailutils@gnu.org; Sun, 20 Oct 2013 18:20:26 +0000
Date: Sun, 20 Oct 2013 18:20:25 +0000
Message-Id: <E1VXxc1-00041K-FF@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-661-g7585f48
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c80cac74a8eb89f754d870d2032c04d1a86ea01f
X-Git-Newrev: 7585f48fd66e55f85fea516e1706a945db5e1149
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 20 Oct 2013 18:20:30 -0000

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=7585f48fd66e55f85fea516e1706a945db5e1149

The branch, master has been updated
       via  7585f48fd66e55f85fea516e1706a945db5e1149 (commit)
      from  c80cac74a8eb89f754d870d2032c04d1a86ea01f (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 7585f48fd66e55f85fea516e1706a945db5e1149
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Sun Oct 20 21:20:25 2013 +0300

    Bigfixes.
    
    * imap4d/io.c (io_copy_out): Switch to full buffering before sending
    data.
    * libmailutils/stream/stream.c (_stream_skip_input_bytes): Bugfix.

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

Summary of changes:
 imap4d/io.c                  |   21 ++++++++++++++++++++-
 libmailutils/stream/stream.c |    2 +-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/imap4d/io.c b/imap4d/io.c
index 21c3f2a..f124a4f 100644
--- a/imap4d/io.c
+++ b/imap4d/io.c
@@ -159,7 +159,26 @@ sc2string (int rc)
 int
 io_copy_out (mu_stream_t str, size_t size)
 {
-  return mu_stream_copy (iostream, str, size, NULL);
+  int rc;
+  struct mu_buffer_query oldbuf, newbuf;
+  
+  oldbuf.type = MU_TRANSPORT_OUTPUT;
+  if (mu_stream_ioctl (iostream, MU_IOCTL_TRANSPORT_BUFFER,
+		       MU_IOCTL_OP_GET, &oldbuf) == 0)
+    {
+      newbuf.type = MU_TRANSPORT_OUTPUT;
+      newbuf.buftype = mu_buffer_full;
+      newbuf.bufsize = 64*1024;
+      mu_stream_ioctl (iostream, MU_IOCTL_TRANSPORT_BUFFER,
+		       MU_IOCTL_OP_SET, &newbuf);
+    }
+
+  rc = mu_stream_copy (iostream, str, size, NULL);
+
+  mu_stream_ioctl (iostream, MU_IOCTL_TRANSPORT_BUFFER,
+		   MU_IOCTL_OP_SET, &oldbuf);
+
+  return rc;
 }
 
 int
diff --git a/libmailutils/stream/stream.c b/libmailutils/stream/stream.c
index a7dabbf..0f0e4a7 100644
--- a/libmailutils/stream/stream.c
+++ b/libmailutils/stream/stream.c
@@ -520,7 +520,7 @@ _stream_skip_input_bytes (mu_stream_t stream, mu_off_t count, mu_off_t *pres)
 	{
 	  for (pos = 0;;)
 	    {
-	      if (stream->pos == stream->level)
+	      if (pos || stream->level == 0)
 		{
 		  if ((rc = _stream_flush_buffer (stream, _MU_STR_FLUSH_ALL)))
 		    return rc;


hooks/post-receive
-- 
GNU Mailutils


