Merge pull request #1822 from pyhalov/pgsql
[unleashed-userland.git] / components / mutt / patches / 7095450-hang-in-read.patch
blob8c482cfe98ffc6dd8bc6fe9a5c4fccc1e3c9eecb
1 --- mutt-1.5.21/mutt_socket.c.orig
2 +++ mutt-1.5.21/mutt_socket.c
3 @@ -78,7 +78,11 @@
4 if (conn->fd < 0)
5 dprint (1, (debugfile, "mutt_socket_close: Attempt to close closed connection.\n"));
6 else
7 + {
8 + mutt_allow_interrupt (1);
9 rc = conn->conn_close (conn);
10 + mutt_allow_interrupt (0);
11 + }
13 conn->fd = -1;
14 conn->ssf = 0;
15 @@ -96,7 +99,9 @@
16 return -1;
19 + mutt_allow_interrupt (1);
20 rc = conn->conn_read (conn, buf, len);
21 + mutt_allow_interrupt (0);
22 /* EOF */
23 if (rc == 0)
25 @@ -127,7 +132,10 @@
27 while (sent < len)
29 - if ((rc = conn->conn_write (conn, buf + sent, len - sent)) < 0)
30 + mutt_allow_interrupt (1);
31 + rc = conn->conn_write (conn, buf + sent, len - sent);
32 + mutt_allow_interrupt (0);
33 + if (rc < 0)
35 dprint (1, (debugfile,
36 "mutt_socket_write: error writing (%s), closing socket\n",
37 @@ -169,7 +177,11 @@
38 if (conn->bufpos >= conn->available)
40 if (conn->fd >= 0)
41 + {
42 + mutt_allow_interrupt (1);
43 conn->available = conn->conn_read (conn, conn->inbuf, sizeof (conn->inbuf));
44 + mutt_allow_interrupt (0);
45 + }
46 else
48 dprint (1, (debugfile, "mutt_socket_readchar: attempt to read from closed connection.\n"));