diff options
author | Matthias Wachs <wachs@in.tum.de> | 2011-03-07 10:24:42 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@in.tum.de> | 2011-03-07 10:24:42 +0000 |
commit | 50514ddec0e31ab88fc8897d4f2a853d1abb97d5 (patch) | |
tree | e422a287b4b882f824e6d6531403148cfefc298b | |
parent | 30f4e693ce7affab3884e9e8230ff3b989247de9 (diff) | |
download | libmicrohttpd-50514ddec0e31ab88fc8897d4f2a853d1abb97d5.tar.gz libmicrohttpd-50514ddec0e31ab88fc8897d4f2a853d1abb97d5.zip |
fixifx
-rw-r--r-- | src/daemon/connection.c | 11 | ||||
-rw-r--r-- | src/daemon/daemon.c | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c index c7e42af6..02e127e8 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c | |||
@@ -1424,7 +1424,12 @@ do_read (struct MHD_Connection *connection) | |||
1424 | int bytes_read; | 1424 | int bytes_read; |
1425 | 1425 | ||
1426 | if (connection->read_buffer_size == connection->read_buffer_offset) | 1426 | if (connection->read_buffer_size == connection->read_buffer_offset) |
1427 | { | ||
1428 | MHD_DLOG (connection->daemon, | ||
1429 | "connection->read_buffer_size == connection->read_buffer_offset\n"); | ||
1430 | |||
1427 | return MHD_NO; | 1431 | return MHD_NO; |
1432 | } | ||
1428 | 1433 | ||
1429 | bytes_read = connection->recv_cls (connection, | 1434 | bytes_read = connection->recv_cls (connection, |
1430 | &connection->read_buffer | 1435 | &connection->read_buffer |
@@ -1432,15 +1437,15 @@ do_read (struct MHD_Connection *connection) | |||
1432 | connection->read_buffer_size - | 1437 | connection->read_buffer_size - |
1433 | connection->read_buffer_offset); | 1438 | connection->read_buffer_offset); |
1434 | if (bytes_read < 0) | 1439 | if (bytes_read < 0) |
1435 | { | 1440 | { |
1436 | if (errno == EINTR) | 1441 | if (errno == EINTR) |
1437 | return MHD_NO; | 1442 | return MHD_NO; |
1438 | #if HAVE_MESSAGES | 1443 | #if HAVE_MESSAGES |
1439 | #if HTTPS_SUPPORT | 1444 | #if HTTPS_SUPPORT |
1440 | if (0 != (connection->daemon->options & MHD_USE_SSL)) | 1445 | if (0 != (connection->daemon->options & MHD_USE_SSL)) |
1441 | MHD_DLOG (connection->daemon, | 1446 | MHD_DLOG (connection->daemon, |
1442 | "Failed to receive data: %s\n", | 1447 | "Failed to receive data: %s (%i)\n", |
1443 | gnutls_strerror (bytes_read)); | 1448 | gnutls_strerror (bytes_read), bytes_read); |
1444 | else | 1449 | else |
1445 | #endif | 1450 | #endif |
1446 | MHD_DLOG (connection->daemon, | 1451 | MHD_DLOG (connection->daemon, |
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 77444409..efa8b018 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -1370,7 +1370,7 @@ MHD_poll (struct MHD_Daemon *daemon, | |||
1370 | 1370 | ||
1371 | memset (p, 0, sizeof (p)); | 1371 | memset (p, 0, sizeof (p)); |
1372 | p[0].fd = daemon->socket_fd; | 1372 | p[0].fd = daemon->socket_fd; |
1373 | p[0].events = POLLIN | POLLRDHUP; | 1373 | p[0].events = POLLIN; |
1374 | p[0].revents = 0; | 1374 | p[0].revents = 0; |
1375 | if (may_block == MHD_NO) | 1375 | if (may_block == MHD_NO) |
1376 | timeout = 0; | 1376 | timeout = 0; |