[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnutls infloop possibly fixed
From: |
Lars Ingebrigtsen |
Subject: |
Re: gnutls infloop possibly fixed |
Date: |
Mon, 13 Feb 2012 20:39:46 +0100 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) |
I had a bug report of a strange file-error "success" being reported by a
Gnus user, and I applied the following patch. It sets errno to EAGAIN
if GnuTLS returns EAGAIN.
Does this make sense, or is it just cargo-cult programming?
=== modified file 'src/gnutls.c'
*** src/gnutls.c 2012-02-11 17:06:14 +0000
--- src/gnutls.c 2012-02-13 19:35:30 +0000
***************
*** 365,372 ****
{
if (rtnval == GNUTLS_E_INTERRUPTED)
continue;
! else
break;
}
buf += rtnval;
--- 365,384 ----
{
if (rtnval == GNUTLS_E_INTERRUPTED)
continue;
! else {
! /* If we get EAGAIN, then set errno appropriately so that
! send_process retries the correct way instead of
! erroring out. */
! if (rtnval == EAGAIN) {
! #ifdef EWOULDBLOCK
! errno = EWOULDBLOCK;
! #endif
! #ifdef EAGAIN
! errno = EAGAIN;
! #endif
! }
break;
+ }
}
buf += rtnval;
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Sent from my Rome
- gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/11
- Re: gnutls infloop possibly fixed, Ted Zlatanov, 2012/02/11
- Re: gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/12
- Re: gnutls infloop possibly fixed, Ted Zlatanov, 2012/02/12
- Re: gnutls infloop possibly fixed, Tom Tromey, 2012/02/13
- Re: gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/13
- Re: gnutls infloop possibly fixed,
Lars Ingebrigtsen <=
- Re: gnutls infloop possibly fixed, Andreas Schwab, 2012/02/13
- Re: gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/13
- Re: gnutls infloop possibly fixed, Richard Stallman, 2012/02/13
- Re: gnutls infloop possibly fixed, Andreas Schwab, 2012/02/13