[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12735 - libmicrohttpd/src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12735 - libmicrohttpd/src/daemon |
Date: |
Wed, 25 Aug 2010 22:32:18 +0200 |
Author: grothoff
Date: 2010-08-25 22:32:18 +0200 (Wed, 25 Aug 2010)
New Revision: 12735
Modified:
libmicrohttpd/src/daemon/daemon.c
Log:
maybe better fix
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2010-08-25 19:10:18 UTC (rev 12734)
+++ libmicrohttpd/src/daemon/daemon.c 2010-08-25 20:32:18 UTC (rev 12735)
@@ -351,18 +351,16 @@
{
int res;
res = gnutls_record_recv (connection->tls_session, other, i);
- if (res != GNUTLS_E_AGAIN)
- return res;
- else
- {
- while (res == GNUTLS_E_AGAIN)
- {
- res = gnutls_record_recv (connection->tls_session, other, i);
- }
- return res;
- }
+ if ( (res == GNUTLS_E_AGAIN) ||
+ (res == GNUTLS_E_INTERRUPTED) )
+ {
+ errno = EINTR;
+ return -1;
+ }
+ return res;
}
+
/**
* Callback for writing data to the socket.
*
@@ -377,16 +375,13 @@
{
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;
- }
+ if ( (res == GNUTLS_E_AGAIN) ||
+ (res == GNUTLS_E_INTERRUPTED) )
+ {
+ errno = EINTR;
+ return -1;
+ }
+ return res;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12735 - libmicrohttpd/src/daemon,
gnunet <=