libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit f633852048e9bdcdfc440289069e6a21ec673326
parent 47c6b680069bd2e0c174151d3078e60cc3b043d7
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  4 Apr 2015 16:06:57 +0000

-fix minor type issue, and minor logging issue

Diffstat:
Msrc/microhttpd/daemon.c | 5++++-
Msrc/microhttpd/internal.h | 4++--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -1884,6 +1884,9 @@ MHD_accept_connection (struct MHD_Daemon *daemon) #if HAVE_MESSAGES const int err = MHD_socket_errno_; /* This could be a common occurance with multiple worker threads */ + if ( (EINVAL == err) && + (MHD_INVALID_SOCKET == daemon->socket_fd) ) + return MHD_NO; /* can happen during shutdown */ if ((EAGAIN != err) && (EWOULDBLOCK != err)) MHD_DLOG (daemon, "Error accepting connection: %s\n", @@ -3514,7 +3517,7 @@ MHD_start_daemon_va (unsigned int flags, #endif daemon->socket_fd = MHD_INVALID_SOCKET; daemon->listening_address_reuse = 0; - daemon->options = (enum MHD_OPTION) flags; + daemon->options = flags; #if WINDOWS /* Winsock is broken with respect to 'shutdown'; this disables us calling 'shutdown' on W32. */ diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h @@ -1183,9 +1183,9 @@ struct MHD_Daemon unsigned int per_ip_connection_limit; /** - * Daemon's options. + * Daemon's flags (bitfield). */ - enum MHD_OPTION options; + enum MHD_FLAG options; /** * Listen port.