7095450 Hang in BIO_read()
authorMarcel Telka <marcel.telka@oracle.com>
Sat, 10 Mar 2012 07:29:44 +0100
changeset 728 61487136e37d
parent 727 239799b5f9a3
child 729 ac400216a00b
7095450 Hang in BIO_read()
components/mutt/patches/7095450-hang-in-read.patch
components/mutt/patches/PATCHES.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/mutt/patches/7095450-hang-in-read.patch	Sat Mar 10 07:29:44 2012 +0100
@@ -0,0 +1,48 @@
+--- mutt-1.5.21/mutt_socket.c.orig
++++ mutt-1.5.21/mutt_socket.c
[email protected]@ -78,7 +78,11 @@
+   if (conn->fd < 0)
+     dprint (1, (debugfile, "mutt_socket_close: Attempt to close closed connection.\n"));
+   else
++  {
++    mutt_allow_interrupt (1);
+     rc = conn->conn_close (conn);
++    mutt_allow_interrupt (0);
++  }
+ 
+   conn->fd = -1;
+   conn->ssf = 0;
[email protected]@ -96,7 +99,9 @@
+     return -1;
+   }
+ 
++  mutt_allow_interrupt (1);
+   rc = conn->conn_read (conn, buf, len);
++  mutt_allow_interrupt (0);
+   /* EOF */
+   if (rc == 0)
+   {
[email protected]@ -127,7 +132,10 @@
+   
+   while (sent < len)
+   {
+-    if ((rc = conn->conn_write (conn, buf + sent, len - sent)) < 0)
++    mutt_allow_interrupt (1);
++    rc = conn->conn_write (conn, buf + sent, len - sent);
++    mutt_allow_interrupt (0);
++    if (rc < 0)
+     {
+       dprint (1, (debugfile,
+                   "mutt_socket_write: error writing (%s), closing socket\n",
[email protected]@ -169,7 +177,11 @@
+   if (conn->bufpos >= conn->available)
+   {
+     if (conn->fd >= 0)
++    {
++      mutt_allow_interrupt (1);
+       conn->available = conn->conn_read (conn, conn->inbuf, sizeof (conn->inbuf));
++      mutt_allow_interrupt (0);
++    }
+     else
+     {
+       dprint (1, (debugfile, "mutt_socket_readchar: attempt to read from closed connection.\n"));
--- a/components/mutt/patches/PATCHES.patch	Fri Mar 09 01:33:40 2012 -0800
+++ b/components/mutt/patches/PATCHES.patch	Sat Mar 10 07:29:44 2012 +0100
@@ -1,8 +1,9 @@
 diff -ur mutt-1.5.21.orig/PATCHES mutt-1.5.21/PATCHES
 --- mutt-1.5.21.orig/PATCHES
 +++ mutt-1.5.21/PATCHES
[email protected]@ -1,0 +1,4 @@
[email protected]@ -1,0 +1,5 @@
 +In addition, these upstream defects are fixed:
++#2064 wish: imap operations should be interruptable
 +#3288 seg fault in mx_update_context
 +#3392 Whitespace garbage in pager mode
 +#3537 flea/muttbug tries to run C compiler with -v option to get the version number