[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17810 - in libmicrohttpd: . src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17810 - in libmicrohttpd: . src/daemon |
Date: |
Thu, 27 Oct 2011 14:17:14 +0200 |
Author: grothoff
Date: 2011-10-27 14:17:14 +0200 (Thu, 27 Oct 2011)
New Revision: 17810
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/src/daemon/connection.c
libmicrohttpd/src/daemon/daemon.c
Log:
LRN: treat EAGAIN as EINTR
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2011-10-27 01:29:44 UTC (rev 17809)
+++ libmicrohttpd/ChangeLog 2011-10-27 12:17:14 UTC (rev 17810)
@@ -1,3 +1,6 @@
+Thu Oct 27 14:16:34 CEST 2011
+ Treat EAGAIN the same way as EINTR (helps on W32). -LRN
+
Wed Oct 12 10:40:12 CEST 2011
Made sockets blocking again for non-Linux platforms as non-blocking
sockets cause problems (#1824) on Cygwin but offer better performance
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2011-10-27 01:29:44 UTC (rev
17809)
+++ libmicrohttpd/src/daemon/connection.c 2011-10-27 12:17:14 UTC (rev
17810)
@@ -277,7 +277,7 @@
return ((connection->response == NULL) &&
(connection->version != NULL) &&
- (0 == strcasecmp (connection->version,
+ (0 == strcasecmp (connection->version,
MHD_HTTP_VERSION_1_1)) &&
(NULL != (expect = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
@@ -1463,7 +1463,7 @@
connection->read_buffer_offset);
if (bytes_read < 0)
{
- if (errno == EINTR)
+ if ((errno == EINTR) || (errno == EAGAIN))
return MHD_NO;
#if HAVE_MESSAGES
#if HTTPS_SUPPORT
@@ -1510,7 +1510,7 @@
if (ret < 0)
{
- if (errno == EINTR)
+ if ((errno == EINTR) || (errno == EAGAIN))
return MHD_NO;
#if HAVE_MESSAGES
#if HTTPS_SUPPORT
@@ -1836,7 +1836,7 @@
connection->continue_message_write_offset);
if (ret < 0)
{
- if (errno == EINTR)
+ if ((errno == EINTR) || (errno == EAGAIN))
break;
#if HAVE_MESSAGES
MHD_DLOG (connection->daemon,
@@ -1898,7 +1898,7 @@
pthread_mutex_unlock (&response->mutex);
if (ret < 0)
{
- if (errno == EINTR)
+ if ((errno == EINTR) || (errno == EAGAIN))
return MHD_YES;
#if HAVE_MESSAGES
MHD_DLOG (connection->daemon,
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2011-10-27 01:29:44 UTC (rev 17809)
+++ libmicrohttpd/src/daemon/daemon.c 2011-10-27 12:17:14 UTC (rev 17810)
@@ -751,11 +751,10 @@
(size_t) left);
if (ret != -1)
return ret;
- if (EINTR == errno)
+ if ((EINTR == errno) || (EAGAIN == errno))
return 0;
if ( (EINVAL == errno) ||
- (EBADF == errno) ||
- (EAGAIN == errno) )
+ (EBADF == errno) )
return -1;
/* None of the 'usual' sendfile errors occurred, so we should try
to fall back to 'SEND'; see also this thread for info on
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17810 - in libmicrohttpd: . src/daemon,
gnunet <=