libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit d71b91554d5d123372a6ab06824002d20be14590
parent 61f3f0440ddeaf97bf6ea3e41ffc3b19d8179ce6
Author: Matthias Wachs <wachs@in.tum.de>
Date:   Tue, 24 Aug 2010 12:44:08 +0000

FIXED: Same as in r12727 but this time for sending,
as  gnutls_record_send can also return GNUTLS_E_AGAIN


Diffstat:
Msrc/daemon/daemon.c | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -375,7 +375,18 @@ static ssize_t send_tls_adapter (struct MHD_Connection *connection, const void *other, size_t i) { - return gnutls_record_send (connection->tls_session, other, i); + int res; + res = gnutls_record_send (connection->tls_session, other, i); + if (res != GNUTLS_E_AGAIN) + return res; + else + { + while (res == GNUTLS_E_AGAIN) + { + res = gnutls_record_send (connection->tls_session, other, i); + } + return res; + } }