# HG changeset patch # User Lars Magne Ingebrigtsen # Date 1286632497 -7200 # Node ID 39b6f874995773aa2be8e0967023141efdc62abb # Parent f60f4abe5849a9c00d556586ed83e5b9f884e9ab (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. diff -r f60f4abe5849 -r 39b6f8749957 src/ChangeLog --- a/src/ChangeLog Sat Oct 09 15:27:24 2010 +0200 +++ b/src/ChangeLog Sat Oct 09 15:54:57 2010 +0200 @@ -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 diff -r f60f4abe5849 -r 39b6f8749957 src/gnutls.c --- 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);