Commit 6979ce05 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Winsock non-blocking kludge for GnuTLS (refs #538)

parent bb722217
......@@ -1498,6 +1498,7 @@ gnutls-$(GNUTLS_VERSION).tar.bz2:
gnutls: gnutls-$(GNUTLS_VERSION).tar.bz2
$(EXTRACT_BZ2)
patch -p0 < Patches/gnutls-win32.patch
.gnutls: gnutls .gcrypt .gpg-error
ifdef HAVE_WIN32
......
--- gnutls.orig/lib/gnutls_buffers.c 2006-03-08 18:26:31.000000000 +0100
+++ gnutls/lib/gnutls_buffers.c 2006-03-08 18:25:58.000000000 +0100
@@ -244,7 +244,11 @@
_gnutls_read_log("READ: %d returned from %d, errno=%d\n", i,
fd, errno);
+#ifdef _WIN32
+ if (WSAGetLastError() == WSAEWOULDBLOCK) {
+#else
if (errno == EAGAIN || errno == EINTR) {
+#endif
if (sizeOfPtr - left > 0) {
_gnutls_read_log("READ: returning %d bytes from %d\n",
@@ -635,7 +639,11 @@
left);
if (i == -1) {
+#ifdef _WIN32
+ if (WSAGetLastError() == WSAEWOULDBLOCK) {
+#else
if (errno == EAGAIN || errno == EINTR) {
+#endif
session->internals.record_send_buffer_prev_size +=
n - left;
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