diff src/gnutls.c @ 110878:39b6f8749957

(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.
author Lars Magne Ingebrigtsen <larsi@gnus.org>
date Sat, 09 Oct 2010 15:54:57 +0200
parents bb9bf961ba7b
children 1ccdcdef34fc
line wrap: on
line diff
--- a/src/gnutls.c	Sat Oct 09 15:27:24 2010 +0200
+++ b/src/gnutls.c	Sat Oct 09 15:54:57 2010 +0200
@@ -86,9 +86,9 @@
     {
       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);