aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r--src/daemon/daemon.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 1f85c4b2..40254c00 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -274,9 +274,8 @@ MHD_handle_connection (void *data)
274 "Processing thread terminating, closing connection\n"); 274 "Processing thread terminating, closing connection\n");
275#endif 275#endif
276#endif 276#endif
277 SHUTDOWN (con->socket_fd, SHUT_RDWR); 277 MHD_connection_close(con,
278 CLOSE (con->socket_fd); 278 MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
279 con->socket_fd = -1;
280 } 279 }
281 return NULL; 280 return NULL;
282} 281}
@@ -871,6 +870,10 @@ MHD_start_daemon_va (unsigned int options,
871 case MHD_OPTION_SOCK_ADDR: 870 case MHD_OPTION_SOCK_ADDR:
872 servaddr = va_arg (ap, struct sockaddr *); 871 servaddr = va_arg (ap, struct sockaddr *);
873 break; 872 break;
873 case MHD_OPTION_URI_LOG_CALLBACK:
874 retVal->uri_log_callback = va_arg(ap, void* (*)(void * cls, const char* uri));
875 retVal->uri_log_callback_cls = va_arg(ap, void*);
876 break;
874#if HTTPS_SUPPORT 877#if HTTPS_SUPPORT
875 case MHD_OPTION_PROTOCOL_VERSION: 878 case MHD_OPTION_PROTOCOL_VERSION:
876 _set_priority (&retVal->priority_cache->protocol, 879 _set_priority (&retVal->priority_cache->protocol,
@@ -1065,14 +1068,8 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
1065 MHD_DLOG (daemon, "MHD shutdown, closing active connections\n"); 1068 MHD_DLOG (daemon, "MHD shutdown, closing active connections\n");
1066#endif 1069#endif
1067#endif 1070#endif
1068 if (daemon->notify_completed != NULL) 1071 MHD_connection_close(daemon->connections,
1069 daemon->notify_completed (daemon->notify_completed_cls, 1072 MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
1070 daemon->connections,
1071 &daemon->connections->client_context,
1072 MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
1073 SHUTDOWN (daemon->connections->socket_fd, SHUT_RDWR);
1074 CLOSE (daemon->connections->socket_fd);
1075 daemon->connections->socket_fd = -1;
1076 } 1073 }
1077 MHD_cleanup_connections (daemon); 1074 MHD_cleanup_connections (daemon);
1078 } 1075 }