aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-10-18 22:32:54 +0200
committerLars Magne Ingebrigtsen2010-10-18 22:32:54 +0200
commit4b2d9ec26363f78d00a1b2595c7c7a5bdda262d2 (patch)
tree6c1198074ecb493cd911d01bc087cd009bff22c9
parente48eb34332dc91de823314090451459ba2ffacbf (diff)
downloademacs-4b2d9ec26363f78d00a1b2595c7c7a5bdda262d2.tar.gz
emacs-4b2d9ec26363f78d00a1b2595c7c7a5bdda262d2.zip
(emacs_gnutls_read): Return 0 if we get a non-"EAGAIN"-like error to signal to Emacs that the socket should be closed.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/gnutls.c9
2 files changed, 13 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b3ed712a9e5..7755ed8c82b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12010-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnutls.c (emacs_gnutls_read): Return 0 if we get a
4 non-"EAGAIN"-like error to signal to Emacs that the socket should
5 be closed.
6
12010-10-15 Eli Zaretskii <eliz@gnu.org> 72010-10-15 Eli Zaretskii <eliz@gnu.org>
2 8
3 * unexcoff.c (make_hdr): Fix prototype according to changes in 9 * unexcoff.c (make_hdr): Fix prototype according to changes in
diff --git a/src/gnutls.c b/src/gnutls.c
index 577cca247ee..1cc258a5096 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -125,8 +125,13 @@ emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
125 rtnval = gnutls_read (state, buf, nbyte); 125 rtnval = gnutls_read (state, buf, nbyte);
126 if (rtnval >= 0) 126 if (rtnval >= 0)
127 return rtnval; 127 return rtnval;
128 else 128 else {
129 return -1; 129 if (rtnval == GNUTLS_E_AGAIN ||
130 rtnval == GNUTLS_E_INTERRUPTED)
131 return -1;
132 else
133 return 0;
134 }
130} 135}
131 136
132/* convert an integer error to a Lisp_Object; it will be either a 137/* convert an integer error to a Lisp_Object; it will be either a