Commit 2e6c74c5 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

(emacs_gnutls_write): Check for GNUTLS_E_AGAIN and not EINTR.

According to the documentation, this is correct, and it seems to
make things work.
parent 7450df5d
......@@ -5,6 +5,9 @@
(emacs_gnutls_read): Return -1 if we got an error from
gnutls_read(). This allows us to actually read lots of data from
the GnuTLS stream.
(emacs_gnutls_write): Check for GNUTLS_E_AGAIN and not EINTR.
According to the documentation, this is correct, and it seems to
make things work.
 
2010-10-09 Chong Yidong <cyd@stupidchicken.com>
 
......
......@@ -86,9 +86,9 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
{
rtnval = gnutls_write (state, buf, nbyte);
if (rtnval == -1)
if (rtnval < 0)
{
if (errno == EINTR)
if (rtnval == GNUTLS_E_AGAIN || rtnval == GNUTLS_E_INTERRUPTED)
continue;
else
return (bytes_written ? bytes_written : -1);
......
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