[mutt] 01/01: disabling upstream/569038-interrupt-socket-read-write.patch as it is not ready yet

Antonio Radici antonio at moszumanska.debian.org
Mon Sep 5 20:08:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

antonio pushed a commit to branch master
in repository mutt.

commit 037840bac4d25247eccf12ff0c1b0445c3617fa9
Author: Antonio Radici <antonio at debian.org>
Date:   Mon Sep 5 21:07:18 2016 +0100

    disabling upstream/569038-interrupt-socket-read-write.patch as it is not ready yet
---
 debian/changelog                                   |   3 -
 debian/patches/series                              |   1 -
 .../569038-interrupt-socket-read-write.patch       | 106 +++++++++++++++++++++
 3 files changed, 106 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a1993ac..9e0357b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,6 @@
 mutt (1.7.0-2) UNRELEASED; urgency=medium
 
   * debian/patches:
-    + upstream/569038-interrupt-socket-read-write.patch: allow the interruption
-      of operations which can be long-running
-      (Closes: 569038, 774746, 423931, 599136, 618425).
     + upstream/833192-preserve-messageid-for-postponed-emails.patch: do not
       remove the message-id of postponed emails (Closes: 833192).
     + upstream/819196-disable-X-in-message-scoring.patch: to disable ~X in
diff --git a/debian/patches/series b/debian/patches/series
index e1cc0f4..4a21d5a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,7 +19,6 @@ upstream/611410-no-implicit_autoview-for-text-html.patch
 upstream/835421-pop-digest-md5.patch
 upstream/693993-manpage-corrections.patch
 upstream/749483-conststrings.patch
-upstream/569038-interrupt-socket-read-write.patch
 upstream/833192-preserve-messageid-for-postponed-emails.patch
 upstream/819196-disable-X-in-message-scoring.patch
 upstream/757141-date-format-length.patch
diff --git a/debian/patches/upstream/569038-interrupt-socket-read-write.patch b/debian/patches/upstream/569038-interrupt-socket-read-write.patch
index 8d08ee0..7fecf28 100644
--- a/debian/patches/upstream/569038-interrupt-socket-read-write.patch
+++ b/debian/patches/upstream/569038-interrupt-socket-read-write.patch
@@ -1,3 +1,6 @@
+Note: this patch is still a WIP, it is not enabled yet, for info contact
+antonio at debian.org
+
 Prevent mutt from hanging on some I/O calls which are blocking, this should
 solve the following Debian bugs:
       
@@ -85,3 +88,106 @@ http://bugs.debian.org/774746
    return (ferror (f) ? -1 : 0);
  }
  
+--- a/mutt_ssl.c
++++ b/mutt_ssl.c
+@@ -303,8 +303,12 @@
+   int rc;
+ 
+   rc = SSL_read (data->ssl, buf, len);
+-  if (rc <= 0)
++  if (rc <= 0 || errno == EINTR)
+   {
++    if (errno == EINTR)
++    {
++      rc = -1;
++    }
+     data->isopen = 0;
+     ssl_err (data, rc);
+   }
+@@ -318,8 +322,13 @@
+   int rc;
+ 
+   rc = SSL_write (data->ssl, buf, len);
+-  if (rc <= 0)
++  if (rc <= 0 || errno == EINTR) {
++    if (errno == EINTR)
++    {
++      rc = -1;
++    }
+     ssl_err (data, rc);
++  }
+ 
+   return rc;
+ }
+--- a/mutt_ssl_gnutls.c
++++ b/mutt_ssl_gnutls.c
+@@ -20,6 +20,7 @@
+ # include "config.h"
+ #endif
+ 
++#include <fcntl.h>
+ #include <gnutls/gnutls.h>
+ #include <gnutls/x509.h>
+ #ifdef HAVE_GNUTLS_OPENSSL_H
+@@ -92,7 +93,6 @@
+ static int tls_negotiate (CONNECTION* conn);
+ static int tls_check_certificate (CONNECTION* conn);
+ 
+-
+ static int tls_init (void)
+ {
+   static unsigned char init_complete = 0;
+@@ -139,16 +139,17 @@
+     return -1;
+   }
+ 
+-  do {
+-    ret = gnutls_record_recv (data->state, buf, len);
+-    if (ret < 0 && gnutls_error_is_fatal(ret) == 1)
+-    {
+-      mutt_error ("tls_socket_read (%s)", gnutls_strerror (ret));
+-      mutt_sleep (4);
+-      return -1;
+-    }
++  ret = gnutls_record_recv (data->state, buf, len);
++  if (ret < 0 &&
++      (gnutls_error_is_fatal(ret) == 1 ||
++       ret == GNUTLS_E_AGAIN ||
++       ret == GNUTLS_E_INTERRUPTED)
++     )
++  {
++    mutt_error ("tls_socket_read (%s)", gnutls_strerror (ret));
++    mutt_sleep (4);
++    return -1;
+   }
+-  while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED);
+ 
+   return ret;
+ }
+@@ -171,7 +172,7 @@
+     ret = gnutls_record_send (data->state, buf + sent, len - sent);
+     if (ret < 0)
+     {
+-      if (gnutls_error_is_fatal(ret) == 1)
++      if (gnutls_error_is_fatal(ret) == 1 || ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN)
+       {
+ 	mutt_error ("tls_socket_write (%s)", gnutls_strerror (ret));
+ 	mutt_sleep (4);
+@@ -407,7 +408,7 @@
+   gnutls_certificate_set_verify_flags(data->xcred, GNUTLS_VERIFY_DISABLE_TIME_CHECKS);
+ #endif
+ 
+-  if ((err = gnutls_init(&data->state, GNUTLS_CLIENT)))
++  if ((err = gnutls_init(&data->state, GNUTLS_CLIENT|GNUTLS_NONBLOCK)))
+   {
+     mutt_error ("gnutls_handshake: %s", gnutls_strerror(err));
+     mutt_sleep (2);
+@@ -434,7 +435,7 @@
+ 
+   err = gnutls_handshake(data->state);
+ 
+-  while (err == GNUTLS_E_AGAIN || err == GNUTLS_E_INTERRUPTED)
++  while (err == GNUTLS_E_AGAIN)
+   {
+     err = gnutls_handshake(data->state);
+   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list