Although less safe, this GNUTLS call is present in older versions.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Tue, 7 Jul 2009 21:08:44 +0000 (18:08 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Mon, 20 Jul 2009 17:41:25 +0000 (14:41 -0300)
Use set_global_errno instead of set_errno, since the former is present
in older versions and we need to make it work for older systems.
However, this should only be used if a not recent enough version of
GNUTLS is found. We should work with autoconf to make that work for us.

hcconn_ssl.c

index a769327..57fa9ab 100644 (file)
@@ -140,7 +140,7 @@ ssl_pull (gnutls_transport_ptr_t ptr, void *buffer, size_t len)
     }
   if (r == 0)
     {
     }
   if (r == 0)
     {
-      gnutls_transport_set_errno (ssl->session, EAGAIN);
+      gnutls_transport_set_global_errno (EAGAIN);
       return -1;
     }
   return r;
       return -1;
     }
   return r;