libmicrohttpd

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

commit f3b0eb539e8a0e87745dc53eabe507b98f1864b6
parent 938b9b8dae70739c6e629bf144b57b5d6212e6b1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  7 Jan 2017 11:52:53 +0100

fix build issue if HAVE_MESSAGES is not set

Diffstat:
Msrc/microhttpd/connection.c | 9+++++++++
Msrc/microhttpd/daemon.c | 6++++--
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -3111,6 +3111,15 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) /* no default action */ break; case MHD_CONNECTION_FOOTERS_SENT: + if (MHD_HTTP_PROCESSING == connection->response->status_code) + { + /* After this type of response, we allow sending another! */ + connection->state = MHD_CONNECTION_HEADERS_PROCESSED; + MHD_destroy_response (connection->response); + connection->response = NULL; + /* FIXME: maybe partially reset memory pool? */ + continue; + } if (MHD_NO != socket_flush_possible (connection)) socket_start_no_buffering_flush (connection); else diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2541,10 +2541,12 @@ resume_suspended_connections (struct MHD_Daemon *daemon) { /* Wake up suspended connections. */ if (! MHD_itc_activate_(daemon->itc, "w")) + { #ifdef HAVE_MESSAGES - MHD_DLOG (daemon, - _("Failed to signal resume of connection via inter-thread communication channel.")); + MHD_DLOG (daemon, + _("Failed to signal resume of connection via inter-thread communication channel.")); #endif + } } return ret; }