# HG changeset patch # User Lars Magne Ingebrigtsen # Date 1285599838 -7200 # Node ID 06497cf3e920fee8f9c9ef7ce027e556b6cac83d # Parent be2bf8f5f3edc26af2063ea5cb35fece8ebf5a7a (emacs_gnutls_read): Don't infloop while reading. diff -r be2bf8f5f3ed -r 06497cf3e920 src/ChangeLog --- a/src/ChangeLog Mon Sep 27 16:56:27 2010 +0200 +++ b/src/ChangeLog Mon Sep 27 17:03:58 2010 +0200 @@ -1,6 +1,7 @@ 2010-09-27 Lars Magne Ingebrigtsen * gnutls.c (gnutls_log_function): Added more debugging. + (emacs_gnutls_read): Don't infloop while reading. 2010-09-27 Kenichi Handa diff -r be2bf8f5f3ed -r 06497cf3e920 src/gnutls.c --- a/src/gnutls.c Mon Sep 27 16:56:27 2010 +0200 +++ b/src/gnutls.c Mon Sep 27 17:03:58 2010 +0200 @@ -67,12 +67,11 @@ { register int rtnval; - do { - rtnval = gnutls_read (state, buf, nbyte); - } while (rtnval == GNUTLS_E_INTERRUPTED || rtnval == GNUTLS_E_AGAIN); - fsync (STDOUT_FILENO); - - return (rtnval); + rtnval = gnutls_read (state, buf, nbyte); + if (rtnval >= 0) + return rtnval; + else + return -1; } /* convert an integer error to a Lisp_Object; it will be either a @@ -268,8 +267,8 @@ state = XPROCESS (proc)->gnutls_state; - gnutls_global_set_log_level(4); - gnutls_global_set_log_function(gnutls_log_function); + //gnutls_global_set_log_level(4); + //gnutls_global_set_log_function(gnutls_log_function); /* always initialize globals. */ global_init = gnutls_emacs_global_init ();