+2011-04-07 Ray Satiro <raysatiro@yahoo.com> (tiny change)
+
+ (wgnutls_read): Check for the GNUTLS_E_AGAIN return code in the recv
+ tight loop.
+ (wgnutls_write): Likewise.
+ (wgnutls_peek): Likewise.
+
2011-04-07 Giuseppe Scrivano <gscrivano@gnu.org>
* gnutls.c (wgnutls_peek): New local variable `read'.
do
ret = gnutls_record_recv (ctx->session, buf, bufsize);
- while (ret == GNUTLS_E_INTERRUPTED);
+ while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
if (ret < 0)
ctx->last_error = ret;
struct wgnutls_transport_context *ctx = arg;
do
ret = gnutls_record_send (ctx->session, buf, bufsize);
- while (ret == GNUTLS_E_INTERRUPTED);
+ while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
if (ret < 0)
ctx->last_error = ret;
return ret;
ret = gnutls_record_recv (ctx->session, buf + offset,
bufsize - offset);
}
- while (ret == GNUTLS_E_INTERRUPTED);
+ while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
read = ret;