Subject: bug#22493: 25.1.50; open-gnutls-stream doesn't respect :nowait, so the connections are synchronous

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 31 Jan 2016 02:10:04 +0100

Lars Ingebrigtsen <[email-masked]> writes:

> So that has to be rewritten.  But I'm not sure how...  We, like, have
> several layers of possible sentinels here, and...  uhm...

gnutls-negotiate (in Lisp) is basically a shim over gnutls-boot (in C).
It computes some parameters that are passed in as an keyword list to
gnutls-boot.

So: gnutls.el could be refactored to have a function that computes that
stuff, and then gnutls-mark-process could take that keyword list and
stash it in the process object.  connect_network_socket could then (in
:nowait mode) call gnutls-boot directly, keeping it all nice and safe in
the C layer.

That would obviate the sentinel, and make this all transparent for the
caller.

I think.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no