Commit 4b2d9ec2 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

(emacs_gnutls_read): Return 0 if we get a non-"EAGAIN"-like error to signal to...

(emacs_gnutls_read): Return 0 if we get a non-"EAGAIN"-like error to signal to Emacs that the socket should be closed.
parent e48eb343
2010-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnutls.c (emacs_gnutls_read): Return 0 if we get a
non-"EAGAIN"-like error to signal to Emacs that the socket should
be closed.
2010-10-15 Eli Zaretskii <eliz@gnu.org> 2010-10-15 Eli Zaretskii <eliz@gnu.org>
   
* unexcoff.c (make_hdr): Fix prototype according to changes in * unexcoff.c (make_hdr): Fix prototype according to changes in
......
...@@ -125,8 +125,13 @@ emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf, ...@@ -125,8 +125,13 @@ emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
rtnval = gnutls_read (state, buf, nbyte); rtnval = gnutls_read (state, buf, nbyte);
if (rtnval >= 0) if (rtnval >= 0)
return rtnval; return rtnval;
else else {
return -1; if (rtnval == GNUTLS_E_AGAIN ||
rtnval == GNUTLS_E_INTERRUPTED)
return -1;
else
return 0;
}
} }
/* convert an integer error to a Lisp_Object; it will be either a /* convert an integer error to a Lisp_Object; it will be either a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment