mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
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.
This commit is contained in:
parent
edfd76ce91
commit
355cdaf37b
2 changed files with 13 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
* vm-limit.c:
|
||||
|
|
|
|||
|
|
@ -77,8 +77,15 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
|
|||
register int rtnval, bytes_written;
|
||||
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;
|
||||
}
|
||||
|
||||
bytes_written = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue