commit 50514ddec0e31ab88fc8897d4f2a853d1abb97d5
parent 30f4e693ce7affab3884e9e8230ff3b989247de9
Author: Matthias Wachs <wachs@in.tum.de>
Date: Mon, 7 Mar 2011 10:24:42 +0000
fixifx
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
@@ -1424,7 +1424,12 @@ do_read (struct MHD_Connection *connection)
int bytes_read;
if (connection->read_buffer_size == connection->read_buffer_offset)
+ {
+ MHD_DLOG (connection->daemon,
+ "connection->read_buffer_size == connection->read_buffer_offset\n");
+
return MHD_NO;
+ }
bytes_read = connection->recv_cls (connection,
&connection->read_buffer
@@ -1432,15 +1437,15 @@ do_read (struct MHD_Connection *connection)
connection->read_buffer_size -
connection->read_buffer_offset);
if (bytes_read < 0)
- {
+ {
if (errno == EINTR)
return MHD_NO;
#if HAVE_MESSAGES
#if HTTPS_SUPPORT
if (0 != (connection->daemon->options & MHD_USE_SSL))
MHD_DLOG (connection->daemon,
- "Failed to receive data: %s\n",
- gnutls_strerror (bytes_read));
+ "Failed to receive data: %s (%i)\n",
+ gnutls_strerror (bytes_read), bytes_read);
else
#endif
MHD_DLOG (connection->daemon,
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
@@ -1370,7 +1370,7 @@ MHD_poll (struct MHD_Daemon *daemon,
memset (p, 0, sizeof (p));
p[0].fd = daemon->socket_fd;
- p[0].events = POLLIN | POLLRDHUP;
+ p[0].events = POLLIN;
p[0].revents = 0;
if (may_block == MHD_NO)
timeout = 0;