aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 55d7ba09..b3c43b63 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -31,19 +31,13 @@
31#include "response.h" 31#include "response.h"
32#include "mhd_mono_clock.h" 32#include "mhd_mono_clock.h"
33#include "mhd_str.h" 33#include "mhd_str.h"
34#include "mhd_locks.h"
34 35
35#if HAVE_NETINET_TCP_H 36#if HAVE_NETINET_TCP_H
36/* for TCP_CORK */ 37/* for TCP_CORK */
37#include <netinet/tcp.h> 38#include <netinet/tcp.h>
38#endif 39#endif
39 40
40#if defined(_WIN32) && defined(MHD_W32_MUTEX_)
41#ifndef WIN32_LEAN_AND_MEAN
42#define WIN32_LEAN_AND_MEAN 1
43#endif /* !WIN32_LEAN_AND_MEAN */
44#include <windows.h>
45#endif /* _WIN32 && MHD_W32_MUTEX_ */
46
47 41
48/** 42/**
49 * Message to transmit when http 1.1 request is received 43 * Message to transmit when http 1.1 request is received
@@ -2412,7 +2406,7 @@ cleanup_connection (struct MHD_Connection *connection)
2412 } 2406 }
2413 if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) 2407 if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
2414 { 2408 {
2415 if (MHD_YES != MHD_mutex_lock_ (&daemon->cleanup_connection_mutex)) 2409 if (!MHD_mutex_lock_ (&daemon->cleanup_connection_mutex))
2416 MHD_PANIC ("Failed to acquire cleanup mutex\n"); 2410 MHD_PANIC ("Failed to acquire cleanup mutex\n");
2417 } 2411 }
2418 else 2412 else
@@ -2441,7 +2435,7 @@ cleanup_connection (struct MHD_Connection *connection)
2441 connection->resuming = MHD_NO; 2435 connection->resuming = MHD_NO;
2442 connection->in_idle = MHD_NO; 2436 connection->in_idle = MHD_NO;
2443 if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && 2437 if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
2444 (MHD_YES != MHD_mutex_unlock_(&daemon->cleanup_connection_mutex)) ) 2438 (!MHD_mutex_unlock_(&daemon->cleanup_connection_mutex)) )
2445 MHD_PANIC ("Failed to release cleanup mutex\n"); 2439 MHD_PANIC ("Failed to release cleanup mutex\n");
2446} 2440}
2447 2441