Commit 744cc9fa authored by Paul Eggert's avatar Paul Eggert
Browse files

Port to systems lacking GNUTLS_NONBLOCK

Problem reported by Colin Baxter in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00096.html
* src/gnutls.c (Fgnutls_boot): Don’t assume GNUTLS_NONBLOCK is defined.
parent 1a8d3112
......@@ -1602,8 +1602,12 @@ one trustfile (usually a CA bundle). */)
/* Call gnutls_init here: */
GNUTLS_LOG (1, max_log_level, "gnutls_init");
int nonblock = XPROCESS (proc)->is_non_blocking_client ? GNUTLS_NONBLOCK : 0;
ret = gnutls_init (&state, GNUTLS_CLIENT | nonblock);
int gnutls_flags = GNUTLS_CLIENT;
#ifdef GNUTLS_NONBLOCK
if (XPROCESS (proc)->is_non_blocking_client)
gnutls_flags |= GNUTLS_NONBLOCK;
#endif
ret = gnutls_init (&state, gnutls_flags);
XPROCESS (proc)->gnutls_state = state;
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
......
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