diff options
Diffstat (limited to 'src/lib/connection_close.c')
-rw-r--r-- | src/lib/connection_close.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/connection_close.c b/src/lib/connection_close.c index 945997db..3c872b0b 100644 --- a/src/lib/connection_close.c +++ b/src/lib/connection_close.c | |||
@@ -40,33 +40,33 @@ MHD_connection_mark_closed_ (struct MHD_Connection *connection) | |||
40 | connection->request.state = MHD_REQUEST_CLOSED; | 40 | connection->request.state = MHD_REQUEST_CLOSED; |
41 | connection->request.event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; | 41 | connection->request.event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; |
42 | if (! daemon->enable_turbo) | 42 | if (! daemon->enable_turbo) |
43 | { | 43 | { |
44 | #ifdef HTTPS_SUPPORT | 44 | #ifdef HTTPS_SUPPORT |
45 | struct MHD_TLS_Plugin *tls; | 45 | struct MHD_TLS_Plugin *tls; |
46 | 46 | ||
47 | /* For TLS connection use shutdown of TLS layer | 47 | /* For TLS connection use shutdown of TLS layer |
48 | * and do not shutdown TCP socket. This give more | 48 | * and do not shutdown TCP socket. This give more |
49 | * chances to send TLS closure data to remote side. | 49 | * chances to send TLS closure data to remote side. |
50 | * Closure of TLS layer will be interpreted by | 50 | * Closure of TLS layer will be interpreted by |
51 | * remote side as end of transmission. */ | 51 | * remote side as end of transmission. */ |
52 | if (NULL != (tls = daemon->tls_api)) | 52 | if (NULL != (tls = daemon->tls_api)) |
53 | { | 53 | { |
54 | if (MHD_YES != | 54 | if (MHD_YES != |
55 | tls->shutdown_connection (tls->cls, | 55 | tls->shutdown_connection (tls->cls, |
56 | connection->tls_cs)) | 56 | connection->tls_cs)) |
57 | { | 57 | { |
58 | (void) shutdown (connection->socket_fd, | 58 | (void) shutdown (connection->socket_fd, |
59 | SHUT_WR); | 59 | SHUT_WR); |
60 | /* FIXME: log errors */ | 60 | /* FIXME: log errors */ |
61 | } | 61 | } |
62 | } | 62 | } |
63 | else /* Combined with next 'shutdown()'. */ | 63 | else /* Combined with next 'shutdown()'. */ |
64 | #endif /* HTTPS_SUPPORT */ | 64 | #endif /* HTTPS_SUPPORT */ |
65 | { | 65 | { |
66 | (void) shutdown (connection->socket_fd, | 66 | (void) shutdown (connection->socket_fd, |
67 | SHUT_WR); /* FIXME: log errors */ | 67 | SHUT_WR); /* FIXME: log errors */ |
68 | } | ||
69 | } | 68 | } |
69 | } | ||
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
@@ -90,14 +90,14 @@ MHD_connection_close_ (struct MHD_Connection *connection, | |||
90 | (void) rtc; // FIXME | 90 | (void) rtc; // FIXME |
91 | MHD_connection_mark_closed_ (connection); | 91 | MHD_connection_mark_closed_ (connection); |
92 | if (NULL != resp) | 92 | if (NULL != resp) |
93 | { | 93 | { |
94 | connection->request.response = NULL; | 94 | connection->request.response = NULL; |
95 | MHD_response_queue_for_destroy (resp); | 95 | MHD_response_queue_for_destroy (resp); |
96 | } | 96 | } |
97 | if (NULL != daemon->notify_connection_cb) | 97 | if (NULL != daemon->notify_connection_cb) |
98 | daemon->notify_connection_cb (daemon->notify_connection_cb_cls, | 98 | daemon->notify_connection_cb (daemon->notify_connection_cb_cls, |
99 | connection, | 99 | connection, |
100 | MHD_CONNECTION_NOTIFY_CLOSED); | 100 | MHD_CONNECTION_NOTIFY_CLOSED); |
101 | } | 101 | } |
102 | 102 | ||
103 | /* end of connection_close.c */ | 103 | /* end of connection_close.c */ |