summaryrefslogtreecommitdiff
path: root/src/gnutls.c
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-10-09 15:54:57 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2010-10-09 15:54:57 +0200
commit2e6c74c53fbb318aa13144681400f3f80e3529f7 (patch)
treed262f40b06be006a0ed0c87711cf1363088b5471 /src/gnutls.c
parent7450df5dfcac171bae556c26261ab2873573f34c (diff)
downloademacs-2e6c74c53fbb318aa13144681400f3f80e3529f7.tar.gz
(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.
Diffstat (limited to 'src/gnutls.c')
-rw-r--r--src/gnutls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gnutls.c b/src/gnutls.c
index da5b10d3190..d9ccaa5a62c 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -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);