Commit 355cdaf3 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Fix gnutls write-before-negotiation case.

* gnutls.c (emacs_gnutls_write): If we're trying to write before
gnutls is ready, return EAGAIN as the errno.
parent edfd76ce
2010-10-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnutls.c (emacs_gnutls_write): If we're trying to write before
gnutls is ready, return EAGAIN as the errno.
2010-10-10 Dan Nicolaescu <dann@ics.uci.edu> 2010-10-10 Dan Nicolaescu <dann@ics.uci.edu>
   
* vm-limit.c: * vm-limit.c:
......
...@@ -77,8 +77,15 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf, ...@@ -77,8 +77,15 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
register int rtnval, bytes_written; register int rtnval, bytes_written;
gnutls_session_t state = proc->gnutls_state; gnutls_session_t state = proc->gnutls_state;
if (proc->gnutls_initstage != GNUTLS_STAGE_READY) if (proc->gnutls_initstage != GNUTLS_STAGE_READY) {
#ifdef EWOULDBLOCK
errno = EWOULDBLOCK;
#endif
#ifdef EAGAIN
errno = EAGAIN;
#endif
return -1; return -1;
}
bytes_written = 0; bytes_written = 0;
......
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