diff options
author | silvioprog <silvioprog@gmail.com> | 2020-05-09 14:11:14 -0300 |
---|---|---|
committer | silvioprog <silvioprog@gmail.com> | 2020-05-09 14:11:14 -0300 |
commit | f84bdf0a8c4c11d956f63bc6378aaa7fa9bb95aa (patch) | |
tree | a84f1fe8e0dd7268a0c796853be92bf34cd8dd6b | |
parent | ddc770d8f6da59b3788230412c9a40490594d0f3 (diff) | |
download | libmicrohttpd-f84bdf0a8c4c11d956f63bc6378aaa7fa9bb95aa.tar.gz libmicrohttpd-f84bdf0a8c4c11d956f63bc6378aaa7fa9bb95aa.zip |
Sanitized all log and error messages.
32 files changed, 191 insertions, 191 deletions
diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c index 8618209f..dc685745 100644 --- a/doc/examples/largepost.c +++ b/doc/examples/largepost.c | |||
@@ -344,7 +344,7 @@ main () | |||
344 | if (NULL == daemon) | 344 | if (NULL == daemon) |
345 | { | 345 | { |
346 | fprintf (stderr, | 346 | fprintf (stderr, |
347 | "Failed to start daemon\n"); | 347 | "Failed to start daemon.\n"); |
348 | return 1; | 348 | return 1; |
349 | } | 349 | } |
350 | (void) getchar (); | 350 | (void) getchar (); |
diff --git a/src/examples/authorization_example.c b/src/examples/authorization_example.c index 644b03ef..f9500325 100644 --- a/src/examples/authorization_example.c +++ b/src/examples/authorization_example.c | |||
@@ -120,7 +120,7 @@ main (int argc, char *const *argv) | |||
120 | NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_END); | 120 | NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_END); |
121 | if (d == NULL) | 121 | if (d == NULL) |
122 | return 1; | 122 | return 1; |
123 | fprintf (stderr, "HTTP server running. Press ENTER to stop the server\n"); | 123 | fprintf (stderr, "HTTP server running. Press ENTER to stop the server.\n"); |
124 | (void) getc (stdin); | 124 | (void) getc (stdin); |
125 | MHD_stop_daemon (d); | 125 | MHD_stop_daemon (d); |
126 | return 0; | 126 | return 0; |
diff --git a/src/examples/chunked_example.c b/src/examples/chunked_example.c index 19a37155..bd4eb855 100644 --- a/src/examples/chunked_example.c +++ b/src/examples/chunked_example.c | |||
@@ -156,7 +156,7 @@ main (int argc, char *const *argv) | |||
156 | (port > UINT16_MAX) ) | 156 | (port > UINT16_MAX) ) |
157 | { | 157 | { |
158 | fprintf (stderr, | 158 | fprintf (stderr, |
159 | "Port must be a number between 1 and 65535\n"); | 159 | "Port must be a number between 1 and 65535.\n"); |
160 | return 1; | 160 | return 1; |
161 | } | 161 | } |
162 | d = MHD_start_daemon (/* MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, */ | 162 | d = MHD_start_daemon (/* MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, */ |
diff --git a/src/examples/demo.c b/src/examples/demo.c index eb974d3a..1830d3b0 100644 --- a/src/examples/demo.c +++ b/src/examples/demo.c | |||
@@ -524,7 +524,7 @@ process_upload_data (void *cls, | |||
524 | } | 524 | } |
525 | if (NULL == filename) | 525 | if (NULL == filename) |
526 | { | 526 | { |
527 | fprintf (stderr, "No filename, aborting upload\n"); | 527 | fprintf (stderr, "No filename, aborting upload.\n"); |
528 | return MHD_NO; /* no filename, error */ | 528 | return MHD_NO; /* no filename, error */ |
529 | } | 529 | } |
530 | if ( (NULL == uc->category) || | 530 | if ( (NULL == uc->category) || |
@@ -946,7 +946,7 @@ main (int argc, char *const *argv) | |||
946 | MHD_OPTION_END); | 946 | MHD_OPTION_END); |
947 | if (NULL == d) | 947 | if (NULL == d) |
948 | return 1; | 948 | return 1; |
949 | fprintf (stderr, "HTTP server running. Press ENTER to stop the server\n"); | 949 | fprintf (stderr, "HTTP server running. Press ENTER to stop the server.\n"); |
950 | (void) getc (stdin); | 950 | (void) getc (stdin); |
951 | MHD_stop_daemon (d); | 951 | MHD_stop_daemon (d); |
952 | MHD_destroy_response (file_not_found_response); | 952 | MHD_destroy_response (file_not_found_response); |
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c index 6e42f3a5..69922136 100644 --- a/src/examples/demo_https.c +++ b/src/examples/demo_https.c | |||
@@ -527,7 +527,7 @@ process_upload_data (void *cls, | |||
527 | } | 527 | } |
528 | if (NULL == filename) | 528 | if (NULL == filename) |
529 | { | 529 | { |
530 | fprintf (stderr, "No filename, aborting upload\n"); | 530 | fprintf (stderr, "No filename, aborting upload.\n"); |
531 | return MHD_NO; /* no filename, error */ | 531 | return MHD_NO; /* no filename, error */ |
532 | } | 532 | } |
533 | if ( (NULL == uc->category) || | 533 | if ( (NULL == uc->category) || |
@@ -1001,7 +1001,7 @@ main (int argc, char *const *argv) | |||
1001 | MHD_OPTION_END); | 1001 | MHD_OPTION_END); |
1002 | if (NULL == d) | 1002 | if (NULL == d) |
1003 | return 1; | 1003 | return 1; |
1004 | fprintf (stderr, "HTTP server running. Press ENTER to stop the server\n"); | 1004 | fprintf (stderr, "HTTP server running. Press ENTER to stop the server.\n"); |
1005 | (void) getc (stdin); | 1005 | (void) getc (stdin); |
1006 | MHD_stop_daemon (d); | 1006 | MHD_stop_daemon (d); |
1007 | MHD_destroy_response (file_not_found_response); | 1007 | MHD_destroy_response (file_not_found_response); |
diff --git a/src/examples/https_fileserver_example.c b/src/examples/https_fileserver_example.c index 5148c8b6..7f321511 100644 --- a/src/examples/https_fileserver_example.c +++ b/src/examples/https_fileserver_example.c | |||
@@ -219,7 +219,7 @@ main (int argc, char *const *argv) | |||
219 | MHD_OPTION_END); | 219 | MHD_OPTION_END); |
220 | if (NULL == TLS_daemon) | 220 | if (NULL == TLS_daemon) |
221 | { | 221 | { |
222 | fprintf (stderr, "Error: failed to start TLS_daemon\n"); | 222 | fprintf (stderr, "Error: failed to start TLS_daemon.\n"); |
223 | return 1; | 223 | return 1; |
224 | } | 224 | } |
225 | printf ("MHD daemon listening on port %u\n", | 225 | printf ("MHD daemon listening on port %u\n", |
diff --git a/src/gnutls/init.c b/src/gnutls/init.c index 401172fc..638f629c 100644 --- a/src/gnutls/init.c +++ b/src/gnutls/init.c | |||
@@ -134,17 +134,17 @@ MHD_TLS_init (void) | |||
134 | #if defined(MHD_USE_POSIX_THREADS) | 134 | #if defined(MHD_USE_POSIX_THREADS) |
135 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, | 135 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, |
136 | &gcry_threads_pthread)) | 136 | &gcry_threads_pthread)) |
137 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt\n")); | 137 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); |
138 | #elif defined(MHD_W32_MUTEX_) | 138 | #elif defined(MHD_W32_MUTEX_) |
139 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, | 139 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, |
140 | &gcry_threads_w32)) | 140 | &gcry_threads_w32)) |
141 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt\n")); | 141 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); |
142 | #endif /* defined(MHD_W32_MUTEX_) */ | 142 | #endif /* defined(MHD_W32_MUTEX_) */ |
143 | gcry_check_version (NULL); | 143 | gcry_check_version (NULL); |
144 | #else | 144 | #else |
145 | if (NULL == gcry_check_version ("1.6.0")) | 145 | if (NULL == gcry_check_version ("1.6.0")) |
146 | MHD_PANIC (_ ( | 146 | MHD_PANIC (_ ( |
147 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer\n")); | 147 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n")); |
148 | #endif | 148 | #endif |
149 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 149 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
150 | gnutls_global_init (); | 150 | gnutls_global_init (); |
diff --git a/src/gnutls/setup_connection.c b/src/gnutls/setup_connection.c index 64082952..3a45e49f 100644 --- a/src/gnutls/setup_connection.c +++ b/src/gnutls/setup_connection.c | |||
@@ -25,7 +25,7 @@ setup_connection () | |||
25 | #ifdef HAVE_MESSAGES | 25 | #ifdef HAVE_MESSAGES |
26 | MHD_DLOG (connection->daemon, | 26 | MHD_DLOG (connection->daemon, |
27 | _ ( | 27 | _ ( |
28 | "Failed to setup TLS credentials: unknown credential type %d\n"), | 28 | "Failed to setup TLS credentials: unknown credential type %d.\n"), |
29 | daemon->cred_type); | 29 | daemon->cred_type); |
30 | #endif | 30 | #endif |
31 | MHD_socket_close_chk_ (client_socket); | 31 | MHD_socket_close_chk_ (client_socket); |
@@ -33,7 +33,7 @@ setup_connection () | |||
33 | addr, | 33 | addr, |
34 | addrlen); | 34 | addrlen); |
35 | free (connection); | 35 | free (connection); |
36 | MHD_PANIC (_ ("Unknown credential type")); | 36 | MHD_PANIC (_ ("Unknown credential type.\n")); |
37 | #if EINVAL | 37 | #if EINVAL |
38 | errno = EINVAL; | 38 | errno = EINVAL; |
39 | #endif | 39 | #endif |
diff --git a/src/lib/action_suspend.c b/src/lib/action_suspend.c index 370a1f6a..b9956d5b 100644 --- a/src/lib/action_suspend.c +++ b/src/lib/action_suspend.c | |||
@@ -85,7 +85,7 @@ suspend_action (void *cls, | |||
85 | EPOLL_CTL_DEL, | 85 | EPOLL_CTL_DEL, |
86 | connection->socket_fd, | 86 | connection->socket_fd, |
87 | NULL)) | 87 | NULL)) |
88 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 88 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
89 | connection->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; | 89 | connection->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; |
90 | } | 90 | } |
91 | connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED; | 91 | connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED; |
diff --git a/src/lib/connection_add.c b/src/lib/connection_add.c index 878380ae..91dd0076 100644 --- a/src/lib/connection_add.c +++ b/src/lib/connection_add.c | |||
@@ -141,7 +141,7 @@ thread_main_handle_connection (void *data) | |||
141 | #ifdef HAVE_MESSAGES | 141 | #ifdef HAVE_MESSAGES |
142 | MHD_DLOG (con->daemon, | 142 | MHD_DLOG (con->daemon, |
143 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, | 143 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, |
144 | _ ("Failed to add FD to fd_set\n")); | 144 | _ ("Failed to add FD to fd_set.\n")); |
145 | #endif | 145 | #endif |
146 | goto exit; | 146 | goto exit; |
147 | } | 147 | } |
@@ -286,7 +286,7 @@ thread_main_handle_connection (void *data) | |||
286 | #ifdef HAVE_MESSAGES | 286 | #ifdef HAVE_MESSAGES |
287 | MHD_DLOG (con->daemon, | 287 | MHD_DLOG (con->daemon, |
288 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, | 288 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, |
289 | _ ("Failed to add FD to fd_set\n")); | 289 | _ ("Failed to add FD to fd_set.\n")); |
290 | #endif | 290 | #endif |
291 | goto exit; | 291 | goto exit; |
292 | } | 292 | } |
@@ -427,7 +427,7 @@ thread_main_handle_connection (void *data) | |||
427 | #ifdef HAVE_MESSAGES | 427 | #ifdef HAVE_MESSAGES |
428 | MHD_DLOG (con->daemon, | 428 | MHD_DLOG (con->daemon, |
429 | MHD_SC_THREAD_TERMINATING, | 429 | MHD_SC_THREAD_TERMINATING, |
430 | _ ("Processing thread terminating. Closing connection\n")); | 430 | _ ("Processing thread terminating. Closing connection.\n")); |
431 | #endif | 431 | #endif |
432 | #endif | 432 | #endif |
433 | if (MHD_REQUEST_CLOSED != con->request.state) | 433 | if (MHD_REQUEST_CLOSED != con->request.state) |
@@ -669,7 +669,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
669 | #if DEBUG_CONNECT | 669 | #if DEBUG_CONNECT |
670 | MHD_DLOG (daemon, | 670 | MHD_DLOG (daemon, |
671 | MHD_SC_CONNECTION_ACCEPTED, | 671 | MHD_SC_CONNECTION_ACCEPTED, |
672 | _ ("Accepted connection on socket %d\n"), | 672 | _ ("Accepted connection on socket %d.\n"), |
673 | client_socket); | 673 | client_socket); |
674 | #endif | 674 | #endif |
675 | #endif | 675 | #endif |
@@ -893,7 +893,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
893 | MHD_DLOG (daemon, | 893 | MHD_DLOG (daemon, |
894 | MHD_SC_ITC_USE_FAILED, | 894 | MHD_SC_ITC_USE_FAILED, |
895 | _ ( | 895 | _ ( |
896 | "Failed to signal new connection via inter-thread communication channel (not necessarily fatal, continuing anyway).")); | 896 | "Failed to signal new connection via inter-thread communication channel (not necessarily fatal, continuing anyway).\n")); |
897 | #endif | 897 | #endif |
898 | } | 898 | } |
899 | return MHD_SC_OK; | 899 | return MHD_SC_OK; |
@@ -1124,7 +1124,7 @@ MHD_accept_connection_ (struct MHD_Daemon *daemon) | |||
1124 | #if DEBUG_CONNECT | 1124 | #if DEBUG_CONNECT |
1125 | MHD_DLOG (daemon, | 1125 | MHD_DLOG (daemon, |
1126 | MHD_SC_CONNECTION_ACCEPTED, | 1126 | MHD_SC_CONNECTION_ACCEPTED, |
1127 | _ ("Accepted connection on socket %d\n"), | 1127 | _ ("Accepted connection on socket %d.\n"), |
1128 | s); | 1128 | s); |
1129 | #endif | 1129 | #endif |
1130 | #endif | 1130 | #endif |
diff --git a/src/lib/connection_call_handlers.c b/src/lib/connection_call_handlers.c index fa79952b..634a9693 100644 --- a/src/lib/connection_call_handlers.c +++ b/src/lib/connection_call_handlers.c | |||
@@ -621,7 +621,7 @@ try_ready_normal_body (struct MHD_Request *request) | |||
621 | CONNECTION_CLOSE_ERROR (connection, | 621 | CONNECTION_CLOSE_ERROR (connection, |
622 | MHD_SC_APPLICATION_DATA_GENERATION_FAILURE_CLOSED, | 622 | MHD_SC_APPLICATION_DATA_GENERATION_FAILURE_CLOSED, |
623 | _ ( | 623 | _ ( |
624 | "Closing connection (application reported error generating data)\n")); | 624 | "Closing connection (application reported error generating data).\n")); |
625 | return false; | 625 | return false; |
626 | } | 626 | } |
627 | response->data_start = request->response_write_position; | 627 | response->data_start = request->response_write_position; |
@@ -671,7 +671,7 @@ try_ready_chunked_body (struct MHD_Request *request) | |||
671 | /* not enough memory */ | 671 | /* not enough memory */ |
672 | CONNECTION_CLOSE_ERROR (connection, | 672 | CONNECTION_CLOSE_ERROR (connection, |
673 | MHD_SC_CONNECTION_POOL_MALLOC_FAILURE, | 673 | MHD_SC_CONNECTION_POOL_MALLOC_FAILURE, |
674 | _ ("Closing connection (out of memory)\n")); | 674 | _ ("Closing connection (out of memory).\n")); |
675 | return false; | 675 | return false; |
676 | } | 676 | } |
677 | buf = MHD_pool_allocate (connection->pool, | 677 | buf = MHD_pool_allocate (connection->pool, |
@@ -718,7 +718,7 @@ try_ready_chunked_body (struct MHD_Request *request) | |||
718 | CONNECTION_CLOSE_ERROR (connection, | 718 | CONNECTION_CLOSE_ERROR (connection, |
719 | MHD_SC_APPLICATION_DATA_GENERATION_FAILURE_CLOSED, | 719 | MHD_SC_APPLICATION_DATA_GENERATION_FAILURE_CLOSED, |
720 | _ ( | 720 | _ ( |
721 | "Closing connection (application error generating response)\n")); | 721 | "Closing connection (application error generating response).\n")); |
722 | return false; | 722 | return false; |
723 | } | 723 | } |
724 | if ( (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) || | 724 | if ( (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) || |
@@ -886,7 +886,7 @@ MHD_request_handle_write_ (struct MHD_Request *request) | |||
886 | data_write_offset = request->response_write_position | 886 | data_write_offset = request->response_write_position |
887 | - response->data_start; | 887 | - response->data_start; |
888 | if (data_write_offset > (uint64_t) SIZE_MAX) | 888 | if (data_write_offset > (uint64_t) SIZE_MAX) |
889 | MHD_PANIC (_ ("Data offset exceeds limit")); | 889 | MHD_PANIC (_ ("Data offset exceeds limit.\n")); |
890 | ret = connection->send_cls (connection, | 890 | ret = connection->send_cls (connection, |
891 | &response->data | 891 | &response->data |
892 | [(size_t) data_write_offset], | 892 | [(size_t) data_write_offset], |
@@ -996,7 +996,7 @@ MHD_request_handle_write_ (struct MHD_Request *request) | |||
996 | mhd_assert (0); | 996 | mhd_assert (0); |
997 | CONNECTION_CLOSE_ERROR (connection, | 997 | CONNECTION_CLOSE_ERROR (connection, |
998 | MHD_SC_STATEMACHINE_FAILURE_CONNECTION_CLOSED, | 998 | MHD_SC_STATEMACHINE_FAILURE_CONNECTION_CLOSED, |
999 | _ ("Internal error\n")); | 999 | _ ("Internal error.\n")); |
1000 | break; | 1000 | break; |
1001 | } | 1001 | } |
1002 | } | 1002 | } |
@@ -1641,7 +1641,7 @@ transmit_error_response (struct MHD_Request *request, | |||
1641 | CONNECTION_CLOSE_ERROR (request->connection, | 1641 | CONNECTION_CLOSE_ERROR (request->connection, |
1642 | ec, | 1642 | ec, |
1643 | _ ( | 1643 | _ ( |
1644 | "Closing connection (failed to create response header)\n")); | 1644 | "Closing connection (failed to create response header).\n")); |
1645 | } | 1645 | } |
1646 | else | 1646 | else |
1647 | { | 1647 | { |
@@ -2768,7 +2768,7 @@ process_request_body (struct MHD_Request *request) | |||
2768 | __FILE__, | 2768 | __FILE__, |
2769 | __LINE__ | 2769 | __LINE__ |
2770 | #ifdef HAVE_MESSAGES | 2770 | #ifdef HAVE_MESSAGES |
2771 | , _ ("libmicrohttpd API violation") | 2771 | , _ ("libmicrohttpd API violation.\n") |
2772 | #else | 2772 | #else |
2773 | , NULL | 2773 | , NULL |
2774 | #endif | 2774 | #endif |
@@ -2872,7 +2872,7 @@ cleanup_connection (struct MHD_Connection *connection) | |||
2872 | MHD_DLOG (daemon, | 2872 | MHD_DLOG (daemon, |
2873 | MHD_SC_ITC_USE_FAILED, | 2873 | MHD_SC_ITC_USE_FAILED, |
2874 | _ ( | 2874 | _ ( |
2875 | "Failed to signal end of connection via inter-thread communication channel")); | 2875 | "Failed to signal end of connection via inter-thread communication channel.\n")); |
2876 | #endif | 2876 | #endif |
2877 | } | 2877 | } |
2878 | } | 2878 | } |
@@ -3366,7 +3366,7 @@ MHD_request_handle_idle_ (struct MHD_Request *request) | |||
3366 | CONNECTION_CLOSE_ERROR (connection, | 3366 | CONNECTION_CLOSE_ERROR (connection, |
3367 | MHD_SC_FAILED_RESPONSE_HEADER_GENERATION, | 3367 | MHD_SC_FAILED_RESPONSE_HEADER_GENERATION, |
3368 | _ ( | 3368 | _ ( |
3369 | "Closing connection (failed to create response header)\n")); | 3369 | "Closing connection (failed to create response header).\n")); |
3370 | continue; | 3370 | continue; |
3371 | } | 3371 | } |
3372 | request->state = MHD_REQUEST_HEADERS_SENDING; | 3372 | request->state = MHD_REQUEST_HEADERS_SENDING; |
@@ -3481,7 +3481,7 @@ MHD_request_handle_idle_ (struct MHD_Request *request) | |||
3481 | CONNECTION_CLOSE_ERROR (connection, | 3481 | CONNECTION_CLOSE_ERROR (connection, |
3482 | MHD_SC_FAILED_RESPONSE_HEADER_GENERATION, | 3482 | MHD_SC_FAILED_RESPONSE_HEADER_GENERATION, |
3483 | _ ( | 3483 | _ ( |
3484 | "Closing connection (failed to create response header)\n")); | 3484 | "Closing connection (failed to create response header).\n")); |
3485 | continue; | 3485 | continue; |
3486 | } | 3486 | } |
3487 | if ( (! request->have_chunked_upload) || | 3487 | if ( (! request->have_chunked_upload) || |
diff --git a/src/lib/connection_cleanup.c b/src/lib/connection_cleanup.c index d03bc046..a9224524 100644 --- a/src/lib/connection_cleanup.c +++ b/src/lib/connection_cleanup.c | |||
@@ -90,7 +90,7 @@ MHD_connection_cleanup_ (struct MHD_Daemon *daemon) | |||
90 | if ( (MHD_TM_THREAD_PER_CONNECTION == daemon->threading_mode) && | 90 | if ( (MHD_TM_THREAD_PER_CONNECTION == daemon->threading_mode) && |
91 | (! pos->thread_joined) && | 91 | (! pos->thread_joined) && |
92 | (! MHD_join_thread_ (pos->pid.handle)) ) | 92 | (! MHD_join_thread_ (pos->pid.handle)) ) |
93 | MHD_PANIC (_ ("Failed to join a thread\n")); | 93 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
94 | #ifdef UPGRADE_SUPPORT | 94 | #ifdef UPGRADE_SUPPORT |
95 | connection_cleanup_upgraded (pos); | 95 | connection_cleanup_upgraded (pos); |
96 | #endif /* UPGRADE_SUPPORT */ | 96 | #endif /* UPGRADE_SUPPORT */ |
@@ -135,7 +135,7 @@ MHD_connection_cleanup_ (struct MHD_Daemon *daemon) | |||
135 | EPOLL_CTL_DEL, | 135 | EPOLL_CTL_DEL, |
136 | pos->socket_fd, | 136 | pos->socket_fd, |
137 | NULL)) | 137 | NULL)) |
138 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 138 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
139 | pos->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; | 139 | pos->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; |
140 | } | 140 | } |
141 | } | 141 | } |
diff --git a/src/lib/connection_finish_forward.c b/src/lib/connection_finish_forward.c index 1a4bdfeb..74b5b48f 100644 --- a/src/lib/connection_finish_forward.c +++ b/src/lib/connection_finish_forward.c | |||
@@ -56,7 +56,7 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection) | |||
56 | connection->socket_fd, | 56 | connection->socket_fd, |
57 | NULL)) ) | 57 | NULL)) ) |
58 | { | 58 | { |
59 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 59 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
60 | } | 60 | } |
61 | if (urh->in_eready_list) | 61 | if (urh->in_eready_list) |
62 | { | 62 | { |
@@ -75,7 +75,7 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection) | |||
75 | urh->mhd.socket, | 75 | urh->mhd.socket, |
76 | NULL)) ) | 76 | NULL)) ) |
77 | { | 77 | { |
78 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 78 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
79 | } | 79 | } |
80 | #endif /* EPOLL_SUPPORT */ | 80 | #endif /* EPOLL_SUPPORT */ |
81 | /* Reflect remote disconnect to application by breaking | 81 | /* Reflect remote disconnect to application by breaking |
diff --git a/src/lib/daemon_close_all_connections.c b/src/lib/daemon_close_all_connections.c index 20ae743e..6d19240e 100644 --- a/src/lib/daemon_close_all_connections.c +++ b/src/lib/daemon_close_all_connections.c | |||
@@ -183,7 +183,7 @@ MHD_daemon_close_all_connections_ (struct MHD_Daemon *daemon) | |||
183 | (! MHD_itc_activate_ (daemon->itc, | 183 | (! MHD_itc_activate_ (daemon->itc, |
184 | "e")) ) | 184 | "e")) ) |
185 | MHD_PANIC (_ ( | 185 | MHD_PANIC (_ ( |
186 | "Failed to signal shutdown via inter-thread communication channel")); | 186 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
187 | #endif | 187 | #endif |
188 | } | 188 | } |
189 | 189 | ||
@@ -197,7 +197,7 @@ MHD_daemon_close_all_connections_ (struct MHD_Daemon *daemon) | |||
197 | { | 197 | { |
198 | MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); | 198 | MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); |
199 | if (! MHD_join_thread_ (pos->pid.handle)) | 199 | if (! MHD_join_thread_ (pos->pid.handle)) |
200 | MHD_PANIC (_ ("Failed to join a thread\n")); | 200 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
201 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); | 201 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); |
202 | pos->thread_joined = true; | 202 | pos->thread_joined = true; |
203 | /* The thread may have concurrently modified the DLL, | 203 | /* The thread may have concurrently modified the DLL, |
@@ -227,7 +227,7 @@ MHD_daemon_close_all_connections_ (struct MHD_Daemon *daemon) | |||
227 | { | 227 | { |
228 | if ( (used_thr_p_c) && | 228 | if ( (used_thr_p_c) && |
229 | (! pos->thread_joined) ) | 229 | (! pos->thread_joined) ) |
230 | MHD_PANIC (_ ("Failed to join a thread\n")); | 230 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
231 | close_connection (pos); | 231 | close_connection (pos); |
232 | } | 232 | } |
233 | MHD_connection_cleanup_ (daemon); | 233 | MHD_connection_cleanup_ (daemon); |
diff --git a/src/lib/daemon_destroy.c b/src/lib/daemon_destroy.c index e40ff520..07cd7158 100644 --- a/src/lib/daemon_destroy.c +++ b/src/lib/daemon_destroy.c | |||
@@ -53,7 +53,7 @@ stop_workers (struct MHD_Daemon *daemon) | |||
53 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, | 53 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, |
54 | "e")) | 54 | "e")) |
55 | MHD_PANIC (_ ( | 55 | MHD_PANIC (_ ( |
56 | "Failed to signal shutdown via inter-thread communication channel.")); | 56 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
57 | } | 57 | } |
58 | else | 58 | else |
59 | { | 59 | { |
@@ -121,7 +121,7 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
121 | if (! MHD_itc_activate_ (daemon->itc, | 121 | if (! MHD_itc_activate_ (daemon->itc, |
122 | "e")) | 122 | "e")) |
123 | MHD_PANIC (_ ( | 123 | MHD_PANIC (_ ( |
124 | "Failed to signal shutdown via inter-thread communication channel")); | 124 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
125 | } | 125 | } |
126 | else | 126 | else |
127 | { | 127 | { |
@@ -139,7 +139,7 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
139 | 139 | ||
140 | if (! MHD_join_thread_ (daemon->pid.handle)) | 140 | if (! MHD_join_thread_ (daemon->pid.handle)) |
141 | { | 141 | { |
142 | MHD_PANIC (_ ("Failed to join a thread\n")); | 142 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
143 | } | 143 | } |
144 | /* close_all_connections() was called in daemon thread. */ | 144 | /* close_all_connections() was called in daemon thread. */ |
145 | } | 145 | } |
diff --git a/src/lib/daemon_epoll.c b/src/lib/daemon_epoll.c index ff3e846c..7105aaba 100644 --- a/src/lib/daemon_epoll.c +++ b/src/lib/daemon_epoll.c | |||
@@ -266,7 +266,7 @@ MHD_daemon_epoll_ (struct MHD_Daemon *daemon, | |||
266 | EPOLL_CTL_DEL, | 266 | EPOLL_CTL_DEL, |
267 | ls, | 267 | ls, |
268 | NULL)) | 268 | NULL)) |
269 | MHD_PANIC ("Failed to remove listen FD from epoll set\n"); | 269 | MHD_PANIC ("Failed to remove listen FD from epoll set.\n"); |
270 | daemon->listen_socket_in_epoll = false; | 270 | daemon->listen_socket_in_epoll = false; |
271 | } | 271 | } |
272 | 272 | ||
@@ -303,7 +303,7 @@ MHD_daemon_epoll_ (struct MHD_Daemon *daemon, | |||
303 | EPOLL_CTL_DEL, | 303 | EPOLL_CTL_DEL, |
304 | ls, | 304 | ls, |
305 | NULL)) | 305 | NULL)) |
306 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set\n")); | 306 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set.\n")); |
307 | daemon->listen_socket_in_epoll = false; | 307 | daemon->listen_socket_in_epoll = false; |
308 | } | 308 | } |
309 | 309 | ||
diff --git a/src/lib/daemon_get_timeout.c b/src/lib/daemon_get_timeout.c index 8e343008..01cb148a 100644 --- a/src/lib/daemon_get_timeout.c +++ b/src/lib/daemon_get_timeout.c | |||
@@ -58,7 +58,7 @@ MHD_daemon_get_timeout (struct MHD_Daemon *daemon, | |||
58 | #ifdef HAVE_MESSAGES | 58 | #ifdef HAVE_MESSAGES |
59 | MHD_DLOG (daemon, | 59 | MHD_DLOG (daemon, |
60 | MHD_SC_CONFIGURATION_MISMATCH_FOR_GET_TIMEOUT, | 60 | MHD_SC_CONFIGURATION_MISMATCH_FOR_GET_TIMEOUT, |
61 | _ ("Illegal call to MHD_get_timeout\n")); | 61 | _ ("Illegal call to MHD_get_timeout.\n")); |
62 | #endif | 62 | #endif |
63 | return MHD_SC_CONFIGURATION_MISSMATCH_FOR_GET_TIMEOUT; | 63 | return MHD_SC_CONFIGURATION_MISSMATCH_FOR_GET_TIMEOUT; |
64 | } | 64 | } |
diff --git a/src/lib/daemon_ip_limit.c b/src/lib/daemon_ip_limit.c index 4b33e029..e06867ca 100644 --- a/src/lib/daemon_ip_limit.c +++ b/src/lib/daemon_ip_limit.c | |||
@@ -221,7 +221,7 @@ MHD_ip_limit_add (struct MHD_Daemon *daemon, | |||
221 | #ifdef HAVE_MESSAGES | 221 | #ifdef HAVE_MESSAGES |
222 | MHD_DLOG (daemon, | 222 | MHD_DLOG (daemon, |
223 | MHD_SC_IP_COUNTER_FAILURE, | 223 | MHD_SC_IP_COUNTER_FAILURE, |
224 | _ ("Failed to add IP connection count node\n")); | 224 | _ ("Failed to add IP connection count node.\n")); |
225 | #endif | 225 | #endif |
226 | MHD_ip_count_unlock (daemon); | 226 | MHD_ip_count_unlock (daemon); |
227 | free (key); | 227 | free (key); |
@@ -279,13 +279,13 @@ MHD_ip_limit_del (struct MHD_Daemon *daemon, | |||
279 | { | 279 | { |
280 | /* Something's wrong if we couldn't find an IP address | 280 | /* Something's wrong if we couldn't find an IP address |
281 | * that was previously added */ | 281 | * that was previously added */ |
282 | MHD_PANIC (_ ("Failed to find previously-added IP address\n")); | 282 | MHD_PANIC (_ ("Failed to find previously-added IP address.\n")); |
283 | } | 283 | } |
284 | found_key = (struct MHD_IPCount *) *nodep; | 284 | found_key = (struct MHD_IPCount *) *nodep; |
285 | /* Validate existing count for IP address */ | 285 | /* Validate existing count for IP address */ |
286 | if (0 == found_key->count) | 286 | if (0 == found_key->count) |
287 | { | 287 | { |
288 | MHD_PANIC (_ ("Previously-added IP address had counter of zero\n")); | 288 | MHD_PANIC (_ ("Previously-added IP address had counter of zero.\n")); |
289 | } | 289 | } |
290 | /* Remove the node entirely if count reduces to 0 */ | 290 | /* Remove the node entirely if count reduces to 0 */ |
291 | if (0 == --found_key->count) | 291 | if (0 == --found_key->count) |
diff --git a/src/lib/daemon_options.c b/src/lib/daemon_options.c index fa84fe83..abf1fbd3 100644 --- a/src/lib/daemon_options.c +++ b/src/lib/daemon_options.c | |||
@@ -620,7 +620,7 @@ MHD_daemon_connection_memory_limit (struct MHD_Daemon *daemon, | |||
620 | size_t memory_increment_b) | 620 | size_t memory_increment_b) |
621 | { | 621 | { |
622 | if (memory_increment_b >= memory_limit_b) | 622 | if (memory_increment_b >= memory_limit_b) |
623 | MHD_PANIC ("sane memory increment must be below memory limit"); | 623 | MHD_PANIC ("Sane memory increment must be below memory limit.\n"); |
624 | daemon->connection_memory_limit_b = memory_limit_b; | 624 | daemon->connection_memory_limit_b = memory_limit_b; |
625 | daemon->connection_memory_increment_b = memory_increment_b; | 625 | daemon->connection_memory_increment_b = memory_increment_b; |
626 | } | 626 | } |
@@ -725,7 +725,7 @@ MHD_daemon_digest_auth_random (struct MHD_Daemon *daemon, | |||
725 | (void) daemon; | 725 | (void) daemon; |
726 | (void) buf_size; | 726 | (void) buf_size; |
727 | (void) buf; | 727 | (void) buf; |
728 | MHD_PANIC ("digest authentication not supported by this build"); | 728 | MHD_PANIC ("Digest authentication not supported by this build.\n"); |
729 | #endif | 729 | #endif |
730 | } | 730 | } |
731 | 731 | ||
@@ -747,7 +747,7 @@ MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon, | |||
747 | { | 747 | { |
748 | #ifdef HAVE_MESSAGES | 748 | #ifdef HAVE_MESSAGES |
749 | MHD_DLOG (daemon, | 749 | MHD_DLOG (daemon, |
750 | _ ("Specified value for NC_SIZE too large\n")); | 750 | _ ("Specified value for NC_SIZE too large.\n")); |
751 | #endif | 751 | #endif |
752 | return MHD_SC_DIGEST_AUTH_NC_LENGTH_TOO_BIG; | 752 | return MHD_SC_DIGEST_AUTH_NC_LENGTH_TOO_BIG; |
753 | } | 753 | } |
diff --git a/src/lib/daemon_quiesce.c b/src/lib/daemon_quiesce.c index 6231bf39..874536d0 100644 --- a/src/lib/daemon_quiesce.c +++ b/src/lib/daemon_quiesce.c | |||
@@ -58,7 +58,7 @@ MHD_daemon_quiesce (struct MHD_Daemon *daemon) | |||
58 | #ifdef HAVE_MESSAGES | 58 | #ifdef HAVE_MESSAGES |
59 | MHD_DLOG (daemon, | 59 | MHD_DLOG (daemon, |
60 | MHD_SC_SYSCALL_QUIESCE_REQUIRES_ITC, | 60 | MHD_SC_SYSCALL_QUIESCE_REQUIRES_ITC, |
61 | "Using MHD_quiesce_daemon in this mode requires ITC\n"); | 61 | "Using MHD_quiesce_daemon in this mode requires ITC.\n"); |
62 | #endif | 62 | #endif |
63 | return MHD_INVALID_SOCKET; | 63 | return MHD_INVALID_SOCKET; |
64 | } | 64 | } |
@@ -81,7 +81,7 @@ MHD_daemon_quiesce (struct MHD_Daemon *daemon) | |||
81 | EPOLL_CTL_DEL, | 81 | EPOLL_CTL_DEL, |
82 | listen_socket, | 82 | listen_socket, |
83 | NULL)) | 83 | NULL)) |
84 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set\n")); | 84 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set.\n")); |
85 | worker->listen_socket_in_epoll = false; | 85 | worker->listen_socket_in_epoll = false; |
86 | } | 86 | } |
87 | else | 87 | else |
@@ -91,7 +91,7 @@ MHD_daemon_quiesce (struct MHD_Daemon *daemon) | |||
91 | if (! MHD_itc_activate_ (worker->itc, | 91 | if (! MHD_itc_activate_ (worker->itc, |
92 | "q")) | 92 | "q")) |
93 | MHD_PANIC (_ ( | 93 | MHD_PANIC (_ ( |
94 | "Failed to signal quiesce via inter-thread communication channel")); | 94 | "Failed to signal quiesce via inter-thread communication channel.\n")); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | daemon->was_quiesced = true; | 97 | daemon->was_quiesced = true; |
@@ -104,7 +104,7 @@ MHD_daemon_quiesce (struct MHD_Daemon *daemon) | |||
104 | EPOLL_CTL_DEL, | 104 | EPOLL_CTL_DEL, |
105 | listen_socket, | 105 | listen_socket, |
106 | NULL)) | 106 | NULL)) |
107 | MHD_PANIC ("Failed to remove listen FD from epoll set\n"); | 107 | MHD_PANIC ("Failed to remove listen FD from epoll set.\n"); |
108 | daemon->listen_socket_in_epoll = false; | 108 | daemon->listen_socket_in_epoll = false; |
109 | } | 109 | } |
110 | #endif | 110 | #endif |
@@ -114,7 +114,7 @@ MHD_daemon_quiesce (struct MHD_Daemon *daemon) | |||
114 | (! MHD_itc_activate_ (daemon->itc, | 114 | (! MHD_itc_activate_ (daemon->itc, |
115 | "q")) ) | 115 | "q")) ) |
116 | MHD_PANIC (_ ( | 116 | MHD_PANIC (_ ( |
117 | "Failed to signal quiesce via inter-thread communication channel")); | 117 | "Failed to signal quiesce via inter-thread communication channel.\n")); |
118 | 118 | ||
119 | /* FIXME: we might want some bi-directional communication here | 119 | /* FIXME: we might want some bi-directional communication here |
120 | (in both the thread-pool and single-thread case!) | 120 | (in both the thread-pool and single-thread case!) |
diff --git a/src/lib/daemon_select.c b/src/lib/daemon_select.c index be8c247c..0f32b6b8 100644 --- a/src/lib/daemon_select.c +++ b/src/lib/daemon_select.c | |||
@@ -531,7 +531,7 @@ MHD_daemon_upgrade_connection_with_select_ (struct MHD_Connection *con) | |||
531 | #ifdef HAVE_MESSAGES | 531 | #ifdef HAVE_MESSAGES |
532 | MHD_DLOG (con->daemon, | 532 | MHD_DLOG (con->daemon, |
533 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, | 533 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, |
534 | _ ("Error preparing select\n")); | 534 | _ ("Error preparing select.\n")); |
535 | #endif | 535 | #endif |
536 | break; | 536 | break; |
537 | } | 537 | } |
@@ -695,7 +695,7 @@ MHD_daemon_select_ (struct MHD_Daemon *daemon, | |||
695 | #ifdef HAVE_MESSAGES | 695 | #ifdef HAVE_MESSAGES |
696 | MHD_DLOG (daemon, | 696 | MHD_DLOG (daemon, |
697 | sc, | 697 | sc, |
698 | _ ("Could not obtain daemon fdsets")); | 698 | _ ("Could not obtain daemon fdsets.\n")); |
699 | #endif | 699 | #endif |
700 | } | 700 | } |
701 | } | 701 | } |
@@ -712,7 +712,7 @@ MHD_daemon_select_ (struct MHD_Daemon *daemon, | |||
712 | #ifdef HAVE_MESSAGES | 712 | #ifdef HAVE_MESSAGES |
713 | MHD_DLOG (daemon, | 713 | MHD_DLOG (daemon, |
714 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, | 714 | MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE, |
715 | _ ("Could not add listen socket to fdset")); | 715 | _ ("Could not add listen socket to fdset.\n")); |
716 | #endif | 716 | #endif |
717 | return MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE; | 717 | return MHD_SC_SOCKET_OUTSIDE_OF_FDSET_RANGE; |
718 | } | 718 | } |
@@ -743,7 +743,7 @@ MHD_daemon_select_ (struct MHD_Daemon *daemon, | |||
743 | MHD_DLOG (daemon, | 743 | MHD_DLOG (daemon, |
744 | sc, | 744 | sc, |
745 | _ ( | 745 | _ ( |
746 | "Could not add control inter-thread communication channel FD to fdset")); | 746 | "Could not add control inter-thread communication channel FD to fdset.\n")); |
747 | #endif | 747 | #endif |
748 | #if defined(MHD_WINSOCK_SOCKETS) | 748 | #if defined(MHD_WINSOCK_SOCKETS) |
749 | } | 749 | } |
diff --git a/src/lib/daemon_start.c b/src/lib/daemon_start.c index 0a1b052e..5704b034 100644 --- a/src/lib/daemon_start.c +++ b/src/lib/daemon_start.c | |||
@@ -99,7 +99,7 @@ configure_listen_reuse (struct MHD_Daemon *daemon) | |||
99 | MHD_DLOG (daemon, | 99 | MHD_DLOG (daemon, |
100 | MHD_SC_LISTEN_ADDRESS_REUSE_ENABLE_NOT_SUPPORTED, | 100 | MHD_SC_LISTEN_ADDRESS_REUSE_ENABLE_NOT_SUPPORTED, |
101 | _ ( | 101 | _ ( |
102 | "Cannot allow listening address reuse: SO_REUSEPORT not defined\n")); | 102 | "Cannot allow listening address reuse: SO_REUSEPORT not defined.\n")); |
103 | #endif | 103 | #endif |
104 | return MHD_SC_LISTEN_ADDRESS_REUSE_ENABLE_NOT_SUPPORTED; | 104 | return MHD_SC_LISTEN_ADDRESS_REUSE_ENABLE_NOT_SUPPORTED; |
105 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ | 105 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ |
@@ -138,7 +138,7 @@ configure_listen_reuse (struct MHD_Daemon *daemon) | |||
138 | MHD_DLOG (daemon, | 138 | MHD_DLOG (daemon, |
139 | MHD_SC_LISTEN_ADDRESS_REUSE_DISABLE_NOT_SUPPORTED, | 139 | MHD_SC_LISTEN_ADDRESS_REUSE_DISABLE_NOT_SUPPORTED, |
140 | _ ( | 140 | _ ( |
141 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined\n")); | 141 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined.\n")); |
142 | #endif | 142 | #endif |
143 | return MHD_SC_LISTEN_ADDRESS_REUSE_DISABLE_NOT_SUPPORTED; | 143 | return MHD_SC_LISTEN_ADDRESS_REUSE_DISABLE_NOT_SUPPORTED; |
144 | #endif /* MHD_WINSOCK_SOCKETS */ | 144 | #endif /* MHD_WINSOCK_SOCKETS */ |
@@ -221,7 +221,7 @@ open_listen_socket (struct MHD_Daemon *daemon) | |||
221 | #ifdef HAVE_MESSAGES | 221 | #ifdef HAVE_MESSAGES |
222 | MHD_DLOG (daemon, | 222 | MHD_DLOG (daemon, |
223 | MHD_SC_IPV6_NOT_SUPPORTED_BY_BUILD, | 223 | MHD_SC_IPV6_NOT_SUPPORTED_BY_BUILD, |
224 | _ ("IPv6 not supported by this build\n")); | 224 | _ ("IPv6 not supported by this build.\n")); |
225 | #endif | 225 | #endif |
226 | return MHD_SC_IPV6_NOT_SUPPORTED_BY_BUILD; | 226 | return MHD_SC_IPV6_NOT_SUPPORTED_BY_BUILD; |
227 | #endif | 227 | #endif |
@@ -281,7 +281,7 @@ try_open_listen_socket: | |||
281 | MHD_DLOG (daemon, | 281 | MHD_DLOG (daemon, |
282 | MHD_SC_LISTEN_DUAL_STACK_CONFIGURATION_NOT_SUPPORTED, | 282 | MHD_SC_LISTEN_DUAL_STACK_CONFIGURATION_NOT_SUPPORTED, |
283 | _ ( | 283 | _ ( |
284 | "Cannot explicitly setup dual stack behavior on this platform\n")); | 284 | "Cannot explicitly setup dual stack behavior on this platform.\n")); |
285 | #endif | 285 | #endif |
286 | #endif | 286 | #endif |
287 | } | 287 | } |
@@ -452,7 +452,7 @@ get_listen_port_number (struct MHD_Daemon *daemon) | |||
452 | MHD_DLOG (daemon, | 452 | MHD_DLOG (daemon, |
453 | MHD_SC_LISTEN_PORT_INTROSPECTION_FAILURE, | 453 | MHD_SC_LISTEN_PORT_INTROSPECTION_FAILURE, |
454 | _ ( | 454 | _ ( |
455 | "Failed to get listen port number (`struct sockaddr_storage` too small!?)\n")); | 455 | "Failed to get listen port number (`struct sockaddr_storage` too small!?).\n")); |
456 | #endif /* HAVE_MESSAGES */ | 456 | #endif /* HAVE_MESSAGES */ |
457 | return; | 457 | return; |
458 | } | 458 | } |
@@ -626,7 +626,7 @@ MHD_polling_thread (void *cls) | |||
626 | switch (daemon->event_loop_syscall) | 626 | switch (daemon->event_loop_syscall) |
627 | { | 627 | { |
628 | case MHD_ELS_AUTO: | 628 | case MHD_ELS_AUTO: |
629 | MHD_PANIC ("MHD_ELS_AUTO should have been mapped to preferred style"); | 629 | MHD_PANIC ("MHD_ELS_AUTO should have been mapped to preferred style.\n"); |
630 | break; | 630 | break; |
631 | case MHD_ELS_SELECT: | 631 | case MHD_ELS_SELECT: |
632 | MHD_daemon_select_ (daemon, | 632 | MHD_daemon_select_ (daemon, |
@@ -637,7 +637,7 @@ MHD_polling_thread (void *cls) | |||
637 | MHD_daemon_poll_ (daemon, | 637 | MHD_daemon_poll_ (daemon, |
638 | MHD_YES); | 638 | MHD_YES); |
639 | #else | 639 | #else |
640 | MHD_PANIC ("MHD_ELS_POLL not supported, should have failed earlier"); | 640 | MHD_PANIC ("MHD_ELS_POLL not supported, should have failed earlier.\n"); |
641 | #endif | 641 | #endif |
642 | break; | 642 | break; |
643 | case MHD_ELS_EPOLL: | 643 | case MHD_ELS_EPOLL: |
@@ -645,7 +645,7 @@ MHD_polling_thread (void *cls) | |||
645 | MHD_daemon_epoll_ (daemon, | 645 | MHD_daemon_epoll_ (daemon, |
646 | MHD_YES); | 646 | MHD_YES); |
647 | #else | 647 | #else |
648 | MHD_PANIC ("MHD_ELS_EPOLL not supported, should have failed earlier"); | 648 | MHD_PANIC ("MHD_ELS_EPOLL not supported, should have failed earlier.\n"); |
649 | #endif | 649 | #endif |
650 | break; | 650 | break; |
651 | } | 651 | } |
@@ -731,7 +731,7 @@ setup_thread_pool (struct MHD_Daemon *daemon) | |||
731 | MHD_DLOG (daemon, | 731 | MHD_DLOG (daemon, |
732 | MHD_SC_ITC_DESCRIPTOR_TOO_LARGE, | 732 | MHD_SC_ITC_DESCRIPTOR_TOO_LARGE, |
733 | _ ( | 733 | _ ( |
734 | "File descriptor for inter-thread communication channel exceeds maximum value\n")); | 734 | "File descriptor for inter-thread communication channel exceeds maximum value.\n")); |
735 | #endif | 735 | #endif |
736 | MHD_itc_destroy_chk_ (d->itc); | 736 | MHD_itc_destroy_chk_ (d->itc); |
737 | sc = MHD_SC_ITC_DESCRIPTOR_TOO_LARGE; | 737 | sc = MHD_SC_ITC_DESCRIPTOR_TOO_LARGE; |
@@ -755,7 +755,7 @@ setup_thread_pool (struct MHD_Daemon *daemon) | |||
755 | #ifdef HAVE_MESSAGES | 755 | #ifdef HAVE_MESSAGES |
756 | MHD_DLOG (daemon, | 756 | MHD_DLOG (daemon, |
757 | MHD_SC_THREAD_POOL_CREATE_MUTEX_FAILURE, | 757 | MHD_SC_THREAD_POOL_CREATE_MUTEX_FAILURE, |
758 | _ ("MHD failed to initialize cleanup connection mutex\n")); | 758 | _ ("MHD failed to initialize cleanup connection mutex.\n")); |
759 | #endif | 759 | #endif |
760 | if (! daemon->disable_itc) | 760 | if (! daemon->disable_itc) |
761 | MHD_itc_destroy_chk_ (d->itc); | 761 | MHD_itc_destroy_chk_ (d->itc); |
@@ -879,7 +879,7 @@ MHD_daemon_start (struct MHD_Daemon *daemon) | |||
879 | MHD_DLOG (daemon, | 879 | MHD_DLOG (daemon, |
880 | MHD_SC_ITC_DESCRIPTOR_TOO_LARGE, | 880 | MHD_SC_ITC_DESCRIPTOR_TOO_LARGE, |
881 | _ ( | 881 | _ ( |
882 | "File descriptor for inter-thread communication channel exceeds maximum value\n")); | 882 | "File descriptor for inter-thread communication channel exceeds maximum value.\n")); |
883 | #endif | 883 | #endif |
884 | return MHD_SC_ITC_DESCRIPTOR_TOO_LARGE; | 884 | return MHD_SC_ITC_DESCRIPTOR_TOO_LARGE; |
885 | } | 885 | } |
diff --git a/src/lib/init.c b/src/lib/init.c index 4b844d4b..2bdc91bd 100644 --- a/src/lib/init.c +++ b/src/lib/init.c | |||
@@ -95,11 +95,11 @@ MHD_init (void) | |||
95 | #if defined(_WIN32) && ! defined(__CYGWIN__) | 95 | #if defined(_WIN32) && ! defined(__CYGWIN__) |
96 | if (0 != WSAStartup (MAKEWORD (2, 2), | 96 | if (0 != WSAStartup (MAKEWORD (2, 2), |
97 | &wsd)) | 97 | &wsd)) |
98 | MHD_PANIC (_ ("Failed to initialize winsock\n")); | 98 | MHD_PANIC (_ ("Failed to initialize winsock.\n")); |
99 | mhd_winsock_inited_ = 1; | 99 | mhd_winsock_inited_ = 1; |
100 | if ( (2 != LOBYTE (wsd.wVersion)) && | 100 | if ( (2 != LOBYTE (wsd.wVersion)) && |
101 | (2 != HIBYTE (wsd.wVersion)) ) | 101 | (2 != HIBYTE (wsd.wVersion)) ) |
102 | MHD_PANIC (_ ("Winsock version 2.2 is not available\n")); | 102 | MHD_PANIC (_ ("Winsock version 2.2 is not available.\n")); |
103 | #endif | 103 | #endif |
104 | MHD_monotonic_sec_counter_init (); | 104 | MHD_monotonic_sec_counter_init (); |
105 | #ifdef HAVE_FREEBSD_SENDFILE | 105 | #ifdef HAVE_FREEBSD_SENDFILE |
diff --git a/src/lib/request_resume.c b/src/lib/request_resume.c index be513f53..52dc2377 100644 --- a/src/lib/request_resume.c +++ b/src/lib/request_resume.c | |||
@@ -59,7 +59,7 @@ MHD_request_resume (struct MHD_Request *request) | |||
59 | MHD_DLOG (daemon, | 59 | MHD_DLOG (daemon, |
60 | MHD_SC_ITC_USE_FAILED, | 60 | MHD_SC_ITC_USE_FAILED, |
61 | _ ( | 61 | _ ( |
62 | "Failed to signal resume via inter-thread communication channel.")); | 62 | "Failed to signal resume via inter-thread communication channel.\n")); |
63 | #endif | 63 | #endif |
64 | } | 64 | } |
65 | } | 65 | } |
@@ -144,7 +144,7 @@ MHD_resume_suspended_connections_ (struct MHD_Daemon *daemon) | |||
144 | if (MHD_ELS_EPOLL == daemon->event_loop_syscall) | 144 | if (MHD_ELS_EPOLL == daemon->event_loop_syscall) |
145 | { | 145 | { |
146 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) | 146 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) |
147 | MHD_PANIC ("Resumed connection was already in EREADY set\n"); | 147 | MHD_PANIC ("Resumed connection was already in EREADY set.\n"); |
148 | /* we always mark resumed connections as ready, as we | 148 | /* we always mark resumed connections as ready, as we |
149 | might have missed the edge poll event during suspension */ | 149 | might have missed the edge poll event during suspension */ |
150 | EDLL_insert (daemon->eready_head, | 150 | EDLL_insert (daemon->eready_head, |
@@ -190,7 +190,7 @@ MHD_resume_suspended_connections_ (struct MHD_Daemon *daemon) | |||
190 | MHD_DLOG (daemon, | 190 | MHD_DLOG (daemon, |
191 | MHD_SC_ITC_USE_FAILED, | 191 | MHD_SC_ITC_USE_FAILED, |
192 | _ ( | 192 | _ ( |
193 | "Failed to signal resume of connection via inter-thread communication channel.")); | 193 | "Failed to signal resume of connection via inter-thread communication channel.\n")); |
194 | #endif | 194 | #endif |
195 | } | 195 | } |
196 | } | 196 | } |
diff --git a/src/lib/upgrade_process.c b/src/lib/upgrade_process.c index 6b0ccf45..af71ca32 100644 --- a/src/lib/upgrade_process.c +++ b/src/lib/upgrade_process.c | |||
@@ -76,7 +76,7 @@ MHD_upgrade_response_handle_process_ (struct MHD_UpgradeResponseHandle *urh) | |||
76 | _ ( | 76 | _ ( |
77 | "Failed to forward to application " | 77 | "Failed to forward to application " |
78 | MHD_UNSIGNED_LONG_LONG_PRINTF \ | 78 | MHD_UNSIGNED_LONG_LONG_PRINTF \ |
79 | " bytes of data received from remote side: application shut down socket\n"), | 79 | " bytes of data received from remote side: application shut down socket.\n"), |
80 | (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used); | 80 | (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used); |
81 | #endif | 81 | #endif |
82 | 82 | ||
@@ -376,7 +376,7 @@ MHD_upgrade_response_handle_process_ (struct MHD_UpgradeResponseHandle *urh) | |||
376 | _ ( | 376 | _ ( |
377 | "Failed to forward to remote client " | 377 | "Failed to forward to remote client " |
378 | MHD_UNSIGNED_LONG_LONG_PRINTF \ | 378 | MHD_UNSIGNED_LONG_LONG_PRINTF \ |
379 | " bytes of data received from application: daemon shut down\n"), | 379 | " bytes of data received from application: daemon shut down.\n"), |
380 | (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used); | 380 | (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used); |
381 | #endif | 381 | #endif |
382 | /* Discard any data unsent to remote. */ | 382 | /* Discard any data unsent to remote. */ |
diff --git a/src/microhttpd/basicauth.c b/src/microhttpd/basicauth.c index 4fba487b..3208ee8c 100644 --- a/src/microhttpd/basicauth.c +++ b/src/microhttpd/basicauth.c | |||
@@ -68,7 +68,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | |||
68 | { | 68 | { |
69 | #ifdef HAVE_MESSAGES | 69 | #ifdef HAVE_MESSAGES |
70 | MHD_DLOG (connection->daemon, | 70 | MHD_DLOG (connection->daemon, |
71 | _ ("Error decoding basic authentication\n")); | 71 | _ ("Error decoding basic authentication.\n")); |
72 | #endif | 72 | #endif |
73 | return NULL; | 73 | return NULL; |
74 | } | 74 | } |
@@ -78,7 +78,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | |||
78 | { | 78 | { |
79 | #ifdef HAVE_MESSAGES | 79 | #ifdef HAVE_MESSAGES |
80 | MHD_DLOG (connection->daemon, | 80 | MHD_DLOG (connection->daemon, |
81 | _ ("Basic authentication doesn't contain ':' separator\n")); | 81 | _ ("Basic authentication doesn't contain ':' separator.\n")); |
82 | #endif | 82 | #endif |
83 | free (decode); | 83 | free (decode); |
84 | return NULL; | 84 | return NULL; |
@@ -96,7 +96,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | |||
96 | { | 96 | { |
97 | #ifdef HAVE_MESSAGES | 97 | #ifdef HAVE_MESSAGES |
98 | MHD_DLOG (connection->daemon, | 98 | MHD_DLOG (connection->daemon, |
99 | _ ("Failed to allocate memory for password\n")); | 99 | _ ("Failed to allocate memory for password.\n")); |
100 | #endif | 100 | #endif |
101 | free (decode); | 101 | free (decode); |
102 | free (user); | 102 | free (user); |
@@ -135,7 +135,7 @@ MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection, | |||
135 | { | 135 | { |
136 | #ifdef HAVE_MESSAGES | 136 | #ifdef HAVE_MESSAGES |
137 | MHD_DLOG (connection->daemon, | 137 | MHD_DLOG (connection->daemon, |
138 | "Failed to allocate memory for auth header\n"); | 138 | "Failed to allocate memory for auth header.\n"); |
139 | #endif /* HAVE_MESSAGES */ | 139 | #endif /* HAVE_MESSAGES */ |
140 | return MHD_NO; | 140 | return MHD_NO; |
141 | } | 141 | } |
@@ -161,7 +161,7 @@ MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection, | |||
161 | { | 161 | { |
162 | #ifdef HAVE_MESSAGES | 162 | #ifdef HAVE_MESSAGES |
163 | MHD_DLOG (connection->daemon, | 163 | MHD_DLOG (connection->daemon, |
164 | _ ("Failed to add Basic auth header\n")); | 164 | _ ("Failed to add Basic auth header.\n")); |
165 | #endif /* HAVE_MESSAGES */ | 165 | #endif /* HAVE_MESSAGES */ |
166 | } | 166 | } |
167 | return ret; | 167 | return ret; |
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 44fc86a2..1fa2ee87 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -798,7 +798,7 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection) | |||
798 | connection->socket_fd, | 798 | connection->socket_fd, |
799 | NULL)) ) | 799 | NULL)) ) |
800 | { | 800 | { |
801 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 801 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
802 | } | 802 | } |
803 | if (urh->in_eready_list) | 803 | if (urh->in_eready_list) |
804 | { | 804 | { |
@@ -817,7 +817,7 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection) | |||
817 | urh->mhd.socket, | 817 | urh->mhd.socket, |
818 | NULL)) ) | 818 | NULL)) ) |
819 | { | 819 | { |
820 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 820 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
821 | } | 821 | } |
822 | #endif /* EPOLL_SUPPORT */ | 822 | #endif /* EPOLL_SUPPORT */ |
823 | /* Reflect remote disconnect to application by breaking | 823 | /* Reflect remote disconnect to application by breaking |
@@ -925,7 +925,7 @@ try_ready_normal_body (struct MHD_Connection *connection) | |||
925 | else | 925 | else |
926 | CONNECTION_CLOSE_ERROR (connection, | 926 | CONNECTION_CLOSE_ERROR (connection, |
927 | _ ( | 927 | _ ( |
928 | "Closing connection (application reported error generating data)\n")); | 928 | "Closing connection (application reported error generating data).\n")); |
929 | return MHD_NO; | 929 | return MHD_NO; |
930 | } | 930 | } |
931 | response->data_start = connection->response_write_position; | 931 | response->data_start = connection->response_write_position; |
@@ -974,7 +974,7 @@ try_ready_chunked_body (struct MHD_Connection *connection) | |||
974 | #endif | 974 | #endif |
975 | /* not enough memory */ | 975 | /* not enough memory */ |
976 | CONNECTION_CLOSE_ERROR (connection, | 976 | CONNECTION_CLOSE_ERROR (connection, |
977 | _ ("Closing connection (out of memory)\n")); | 977 | _ ("Closing connection (out of memory).\n")); |
978 | return MHD_NO; | 978 | return MHD_NO; |
979 | } | 979 | } |
980 | if ( (2 * (0xFFFFFF + sizeof(cbuf) + 2)) < size) | 980 | if ( (2 * (0xFFFFFF + sizeof(cbuf) + 2)) < size) |
@@ -1022,7 +1022,7 @@ try_ready_chunked_body (struct MHD_Connection *connection) | |||
1022 | #endif | 1022 | #endif |
1023 | CONNECTION_CLOSE_ERROR (connection, | 1023 | CONNECTION_CLOSE_ERROR (connection, |
1024 | _ ( | 1024 | _ ( |
1025 | "Closing connection (application error generating response)\n")); | 1025 | "Closing connection (application error generating response).\n")); |
1026 | return MHD_NO; | 1026 | return MHD_NO; |
1027 | } | 1027 | } |
1028 | if ( (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) || | 1028 | if ( (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) || |
@@ -1677,7 +1677,7 @@ transmit_error_response (struct MHD_Connection *connection, | |||
1677 | /* can't even send a reply, at least close the connection */ | 1677 | /* can't even send a reply, at least close the connection */ |
1678 | CONNECTION_CLOSE_ERROR (connection, | 1678 | CONNECTION_CLOSE_ERROR (connection, |
1679 | _ ( | 1679 | _ ( |
1680 | "Closing connection (failed to queue response)\n")); | 1680 | "Closing connection (failed to queue response).\n")); |
1681 | return; | 1681 | return; |
1682 | } | 1682 | } |
1683 | mhd_assert (NULL != connection->response); | 1683 | mhd_assert (NULL != connection->response); |
@@ -1688,7 +1688,7 @@ transmit_error_response (struct MHD_Connection *connection, | |||
1688 | /* oops - close! */ | 1688 | /* oops - close! */ |
1689 | CONNECTION_CLOSE_ERROR (connection, | 1689 | CONNECTION_CLOSE_ERROR (connection, |
1690 | _ ( | 1690 | _ ( |
1691 | "Closing connection (failed to create response header)\n")); | 1691 | "Closing connection (failed to create response header).\n")); |
1692 | } | 1692 | } |
1693 | else | 1693 | else |
1694 | { | 1694 | { |
@@ -2439,7 +2439,7 @@ process_request_body (struct MHD_Connection *connection) | |||
2439 | __FILE__, | 2439 | __FILE__, |
2440 | __LINE__ | 2440 | __LINE__ |
2441 | #ifdef HAVE_MESSAGES | 2441 | #ifdef HAVE_MESSAGES |
2442 | , _ ("libmicrohttpd API violation") | 2442 | , _ ("libmicrohttpd API violation.\n") |
2443 | #else | 2443 | #else |
2444 | , NULL | 2444 | , NULL |
2445 | #endif | 2445 | #endif |
@@ -2700,7 +2700,7 @@ parse_connection_headers (struct MHD_Connection *connection) | |||
2700 | /* can't even send a reply, at least close the connection */ | 2700 | /* can't even send a reply, at least close the connection */ |
2701 | CONNECTION_CLOSE_ERROR (connection, | 2701 | CONNECTION_CLOSE_ERROR (connection, |
2702 | _ ( | 2702 | _ ( |
2703 | "Closing connection (failed to create response)\n")); | 2703 | "Closing connection (failed to create response).\n")); |
2704 | return; | 2704 | return; |
2705 | } | 2705 | } |
2706 | iret = MHD_queue_response (connection, | 2706 | iret = MHD_queue_response (connection, |
@@ -2712,7 +2712,7 @@ parse_connection_headers (struct MHD_Connection *connection) | |||
2712 | /* can't even send a reply, at least close the connection */ | 2712 | /* can't even send a reply, at least close the connection */ |
2713 | CONNECTION_CLOSE_ERROR (connection, | 2713 | CONNECTION_CLOSE_ERROR (connection, |
2714 | _ ( | 2714 | _ ( |
2715 | "Closing connection (failed to queue response)\n")); | 2715 | "Closing connection (failed to queue response).\n")); |
2716 | } | 2716 | } |
2717 | return; | 2717 | return; |
2718 | } | 2718 | } |
@@ -3071,7 +3071,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection) | |||
3071 | data_write_offset = connection->response_write_position | 3071 | data_write_offset = connection->response_write_position |
3072 | - response->data_start; | 3072 | - response->data_start; |
3073 | if (data_write_offset > (uint64_t) SIZE_MAX) | 3073 | if (data_write_offset > (uint64_t) SIZE_MAX) |
3074 | MHD_PANIC (_ ("Data offset exceeds limit")); | 3074 | MHD_PANIC (_ ("Data offset exceeds limit.\n")); |
3075 | ret = MHD_send_on_connection_ (connection, | 3075 | ret = MHD_send_on_connection_ (connection, |
3076 | &response->data | 3076 | &response->data |
3077 | [(size_t) data_write_offset], | 3077 | [(size_t) data_write_offset], |
@@ -3181,7 +3181,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection) | |||
3181 | default: | 3181 | default: |
3182 | mhd_assert (0); | 3182 | mhd_assert (0); |
3183 | CONNECTION_CLOSE_ERROR (connection, | 3183 | CONNECTION_CLOSE_ERROR (connection, |
3184 | _ ("Internal error\n")); | 3184 | _ ("Internal error.\n")); |
3185 | break; | 3185 | break; |
3186 | } | 3186 | } |
3187 | return; | 3187 | return; |
@@ -3255,7 +3255,7 @@ cleanup_connection (struct MHD_Connection *connection) | |||
3255 | #ifdef HAVE_MESSAGES | 3255 | #ifdef HAVE_MESSAGES |
3256 | MHD_DLOG (daemon, | 3256 | MHD_DLOG (daemon, |
3257 | _ ( | 3257 | _ ( |
3258 | "Failed to signal end of connection via inter-thread communication channel")); | 3258 | "Failed to signal end of connection via inter-thread communication channel.\n")); |
3259 | #endif | 3259 | #endif |
3260 | } | 3260 | } |
3261 | } | 3261 | } |
@@ -3520,7 +3520,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
3520 | /* oops - close! */ | 3520 | /* oops - close! */ |
3521 | CONNECTION_CLOSE_ERROR (connection, | 3521 | CONNECTION_CLOSE_ERROR (connection, |
3522 | _ ( | 3522 | _ ( |
3523 | "Closing connection (failed to create response header)\n")); | 3523 | "Closing connection (failed to create response header).\n")); |
3524 | continue; | 3524 | continue; |
3525 | } | 3525 | } |
3526 | connection->state = MHD_CONNECTION_HEADERS_SENDING; | 3526 | connection->state = MHD_CONNECTION_HEADERS_SENDING; |
@@ -3629,7 +3629,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
3629 | /* oops - close! */ | 3629 | /* oops - close! */ |
3630 | CONNECTION_CLOSE_ERROR (connection, | 3630 | CONNECTION_CLOSE_ERROR (connection, |
3631 | _ ( | 3631 | _ ( |
3632 | "Closing connection (failed to create response header)\n")); | 3632 | "Closing connection (failed to create response header).\n")); |
3633 | continue; | 3633 | continue; |
3634 | } | 3634 | } |
3635 | if ( (! connection->have_chunked_upload) || | 3635 | if ( (! connection->have_chunked_upload) || |
diff --git a/src/microhttpd/connection_https.c b/src/microhttpd/connection_https.c index fb07deca..79a52b5e 100644 --- a/src/microhttpd/connection_https.c +++ b/src/microhttpd/connection_https.c | |||
@@ -172,7 +172,7 @@ MHD_run_tls_handshake_ (struct MHD_Connection *connection) | |||
172 | connection->tls_state = MHD_TLS_CONN_TLS_FAILED; | 172 | connection->tls_state = MHD_TLS_CONN_TLS_FAILED; |
173 | #ifdef HAVE_MESSAGES | 173 | #ifdef HAVE_MESSAGES |
174 | MHD_DLOG (connection->daemon, | 174 | MHD_DLOG (connection->daemon, |
175 | _ ("Error: received handshake message out of context\n")); | 175 | _ ("Error: received handshake message out of context.\n")); |
176 | #endif | 176 | #endif |
177 | MHD_connection_close_ (connection, | 177 | MHD_connection_close_ (connection, |
178 | MHD_REQUEST_TERMINATED_WITH_ERROR); | 178 | MHD_REQUEST_TERMINATED_WITH_ERROR); |
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 1c0fcb7e..473a5fb4 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -448,7 +448,7 @@ MHD_ip_limit_add (struct MHD_Daemon *daemon, | |||
448 | { | 448 | { |
449 | #ifdef HAVE_MESSAGES | 449 | #ifdef HAVE_MESSAGES |
450 | MHD_DLOG (daemon, | 450 | MHD_DLOG (daemon, |
451 | _ ("Failed to add IP connection count node\n")); | 451 | _ ("Failed to add IP connection count node.\n")); |
452 | #endif | 452 | #endif |
453 | MHD_ip_count_unlock (daemon); | 453 | MHD_ip_count_unlock (daemon); |
454 | free (key); | 454 | free (key); |
@@ -506,13 +506,13 @@ MHD_ip_limit_del (struct MHD_Daemon *daemon, | |||
506 | { | 506 | { |
507 | /* Something's wrong if we couldn't find an IP address | 507 | /* Something's wrong if we couldn't find an IP address |
508 | * that was previously added */ | 508 | * that was previously added */ |
509 | MHD_PANIC (_ ("Failed to find previously-added IP address\n")); | 509 | MHD_PANIC (_ ("Failed to find previously-added IP address.\n")); |
510 | } | 510 | } |
511 | found_key = (struct MHD_IPCount *) *nodep; | 511 | found_key = (struct MHD_IPCount *) *nodep; |
512 | /* Validate existing count for IP address */ | 512 | /* Validate existing count for IP address */ |
513 | if (0 == found_key->count) | 513 | if (0 == found_key->count) |
514 | { | 514 | { |
515 | MHD_PANIC (_ ("Previously-added IP address had counter of zero\n")); | 515 | MHD_PANIC (_ ("Previously-added IP address had counter of zero.\n")); |
516 | } | 516 | } |
517 | /* Remove the node entirely if count reduces to 0 */ | 517 | /* Remove the node entirely if count reduces to 0 */ |
518 | if (0 == --found_key->count) | 518 | if (0 == --found_key->count) |
@@ -564,7 +564,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
564 | { | 564 | { |
565 | #ifdef HAVE_MESSAGES | 565 | #ifdef HAVE_MESSAGES |
566 | MHD_DLOG (daemon, | 566 | MHD_DLOG (daemon, |
567 | "Too long trust certificate\n"); | 567 | "Too long trust certificate.\n"); |
568 | #endif | 568 | #endif |
569 | return -1; | 569 | return -1; |
570 | } | 570 | } |
@@ -576,7 +576,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
576 | { | 576 | { |
577 | #ifdef HAVE_MESSAGES | 577 | #ifdef HAVE_MESSAGES |
578 | MHD_DLOG (daemon, | 578 | MHD_DLOG (daemon, |
579 | "Bad trust certificate format\n"); | 579 | "Bad trust certificate format.\n"); |
580 | #endif | 580 | #endif |
581 | return -1; | 581 | return -1; |
582 | } | 582 | } |
@@ -601,7 +601,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
601 | { | 601 | { |
602 | #ifdef HAVE_MESSAGES | 602 | #ifdef HAVE_MESSAGES |
603 | MHD_DLOG (daemon, | 603 | MHD_DLOG (daemon, |
604 | "Too long key or certificate\n"); | 604 | "Too long key or certificate.\n"); |
605 | #endif | 605 | #endif |
606 | return -1; | 606 | return -1; |
607 | } | 607 | } |
@@ -623,7 +623,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
623 | #ifdef HAVE_MESSAGES | 623 | #ifdef HAVE_MESSAGES |
624 | MHD_DLOG (daemon, | 624 | MHD_DLOG (daemon, |
625 | _ ("Failed to setup x509 certificate/key: pre 3.X.X version " \ | 625 | _ ("Failed to setup x509 certificate/key: pre 3.X.X version " \ |
626 | "of GnuTLS does not support setting key password")); | 626 | "of GnuTLS does not support setting key password.\n")); |
627 | #endif | 627 | #endif |
628 | return -1; | 628 | return -1; |
629 | #endif | 629 | #endif |
@@ -651,7 +651,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
651 | #endif | 651 | #endif |
652 | #ifdef HAVE_MESSAGES | 652 | #ifdef HAVE_MESSAGES |
653 | MHD_DLOG (daemon, | 653 | MHD_DLOG (daemon, |
654 | "You need to specify a certificate and key location\n"); | 654 | "You need to specify a certificate and key location.\n"); |
655 | #endif | 655 | #endif |
656 | return -1; | 656 | return -1; |
657 | } | 657 | } |
@@ -1370,7 +1370,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1370 | _ ( | 1370 | _ ( |
1371 | "Failed to forward to application " | 1371 | "Failed to forward to application " |
1372 | MHD_UNSIGNED_LONG_LONG_PRINTF \ | 1372 | MHD_UNSIGNED_LONG_LONG_PRINTF \ |
1373 | " bytes of data received from remote side: application shut down socket\n"), | 1373 | " bytes of data received from remote side: application shut down socket.\n"), |
1374 | (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used); | 1374 | (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used); |
1375 | #endif | 1375 | #endif |
1376 | 1376 | ||
@@ -1661,7 +1661,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1661 | _ ( | 1661 | _ ( |
1662 | "Failed to forward to remote client " | 1662 | "Failed to forward to remote client " |
1663 | MHD_UNSIGNED_LONG_LONG_PRINTF \ | 1663 | MHD_UNSIGNED_LONG_LONG_PRINTF \ |
1664 | " bytes of data received from application: daemon shut down\n"), | 1664 | " bytes of data received from application: daemon shut down.\n"), |
1665 | (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used); | 1665 | (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used); |
1666 | #endif | 1666 | #endif |
1667 | /* Discard any data unsent to remote. */ | 1667 | /* Discard any data unsent to remote. */ |
@@ -1727,7 +1727,7 @@ thread_main_connection_upgrade (struct MHD_Connection *con) | |||
1727 | { | 1727 | { |
1728 | #ifdef HAVE_MESSAGES | 1728 | #ifdef HAVE_MESSAGES |
1729 | MHD_DLOG (con->daemon, | 1729 | MHD_DLOG (con->daemon, |
1730 | _ ("Error preparing select\n")); | 1730 | _ ("Error preparing select.\n")); |
1731 | #endif | 1731 | #endif |
1732 | break; | 1732 | break; |
1733 | } | 1733 | } |
@@ -1899,7 +1899,7 @@ thread_main_handle_connection (void *data) | |||
1899 | { | 1899 | { |
1900 | #ifdef HAVE_MESSAGES | 1900 | #ifdef HAVE_MESSAGES |
1901 | MHD_DLOG (con->daemon, | 1901 | MHD_DLOG (con->daemon, |
1902 | _ ("Failed to add FD to fd_set\n")); | 1902 | _ ("Failed to add FD to fd_set.\n")); |
1903 | #endif | 1903 | #endif |
1904 | goto exit; | 1904 | goto exit; |
1905 | } | 1905 | } |
@@ -2041,7 +2041,7 @@ thread_main_handle_connection (void *data) | |||
2041 | { | 2041 | { |
2042 | #ifdef HAVE_MESSAGES | 2042 | #ifdef HAVE_MESSAGES |
2043 | MHD_DLOG (con->daemon, | 2043 | MHD_DLOG (con->daemon, |
2044 | _ ("Failed to add FD to fd_set\n")); | 2044 | _ ("Failed to add FD to fd_set.\n")); |
2045 | #endif | 2045 | #endif |
2046 | goto exit; | 2046 | goto exit; |
2047 | } | 2047 | } |
@@ -2181,7 +2181,7 @@ thread_main_handle_connection (void *data) | |||
2181 | #if DEBUG_CLOSE | 2181 | #if DEBUG_CLOSE |
2182 | #ifdef HAVE_MESSAGES | 2182 | #ifdef HAVE_MESSAGES |
2183 | MHD_DLOG (con->daemon, | 2183 | MHD_DLOG (con->daemon, |
2184 | _ ("Processing thread terminating. Closing connection\n")); | 2184 | _ ("Processing thread terminating. Closing connection.\n")); |
2185 | #endif | 2185 | #endif |
2186 | #endif | 2186 | #endif |
2187 | if (MHD_CONNECTION_CLOSED != con->state) | 2187 | if (MHD_CONNECTION_CLOSED != con->state) |
@@ -2211,7 +2211,7 @@ exit: | |||
2211 | #ifdef HAVE_MESSAGES | 2211 | #ifdef HAVE_MESSAGES |
2212 | MHD_DLOG (daemon, | 2212 | MHD_DLOG (daemon, |
2213 | _ ( | 2213 | _ ( |
2214 | "Failed to signal thread termination via inter-thread communication channel.")); | 2214 | "Failed to signal thread termination via inter-thread communication channel.\n")); |
2215 | #endif | 2215 | #endif |
2216 | } | 2216 | } |
2217 | return (MHD_THRD_RTRN_TYPE_) 0; | 2217 | return (MHD_THRD_RTRN_TYPE_) 0; |
@@ -2311,7 +2311,7 @@ psk_gnutls_adapter (gnutls_session_t session, | |||
2311 | #ifdef HAVE_MESSAGES | 2311 | #ifdef HAVE_MESSAGES |
2312 | MHD_DLOG (daemon, | 2312 | MHD_DLOG (daemon, |
2313 | _ ( | 2313 | _ ( |
2314 | "PSK authentication failed: gnutls_malloc failed to allocate memory\n")); | 2314 | "PSK authentication failed: gnutls_malloc failed to allocate memory.\n")); |
2315 | #endif | 2315 | #endif |
2316 | free (app_psk); | 2316 | free (app_psk); |
2317 | return -1; | 2317 | return -1; |
@@ -2320,7 +2320,7 @@ psk_gnutls_adapter (gnutls_session_t session, | |||
2320 | { | 2320 | { |
2321 | #ifdef HAVE_MESSAGES | 2321 | #ifdef HAVE_MESSAGES |
2322 | MHD_DLOG (daemon, | 2322 | MHD_DLOG (daemon, |
2323 | _ ("PSK authentication failed: PSK too long\n")); | 2323 | _ ("PSK authentication failed: PSK too long.\n")); |
2324 | #endif | 2324 | #endif |
2325 | free (app_psk); | 2325 | free (app_psk); |
2326 | return -1; | 2326 | return -1; |
@@ -2451,7 +2451,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2451 | #ifdef HAVE_MESSAGES | 2451 | #ifdef HAVE_MESSAGES |
2452 | #if DEBUG_CONNECT | 2452 | #if DEBUG_CONNECT |
2453 | MHD_DLOG (daemon, | 2453 | MHD_DLOG (daemon, |
2454 | _ ("Accepted connection on socket %d\n"), | 2454 | _ ("Accepted connection on socket %d.\n"), |
2455 | client_socket); | 2455 | client_socket); |
2456 | #endif | 2456 | #endif |
2457 | #endif | 2457 | #endif |
@@ -2614,7 +2614,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2614 | #ifdef HAVE_MESSAGES | 2614 | #ifdef HAVE_MESSAGES |
2615 | MHD_DLOG (connection->daemon, | 2615 | MHD_DLOG (connection->daemon, |
2616 | _ ( | 2616 | _ ( |
2617 | "Failed to setup TLS credentials: unknown credential type %d\n"), | 2617 | "Failed to setup TLS credentials: unknown credential type %d.\n"), |
2618 | daemon->cred_type); | 2618 | daemon->cred_type); |
2619 | #endif | 2619 | #endif |
2620 | MHD_socket_close_chk_ (client_socket); | 2620 | MHD_socket_close_chk_ (client_socket); |
@@ -2623,7 +2623,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2623 | addrlen); | 2623 | addrlen); |
2624 | free (connection->addr); | 2624 | free (connection->addr); |
2625 | free (connection); | 2625 | free (connection); |
2626 | MHD_PANIC (_ ("Unknown credential type")); | 2626 | MHD_PANIC (_ ("Unknown credential type.\n")); |
2627 | #if EINVAL | 2627 | #if EINVAL |
2628 | errno = EINVAL; | 2628 | errno = EINVAL; |
2629 | #endif | 2629 | #endif |
@@ -2753,7 +2753,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2753 | #ifdef HAVE_MESSAGES | 2753 | #ifdef HAVE_MESSAGES |
2754 | MHD_DLOG (daemon, | 2754 | MHD_DLOG (daemon, |
2755 | _ ( | 2755 | _ ( |
2756 | "Failed to signal new connection via inter-thread communication channel.")); | 2756 | "Failed to signal new connection via inter-thread communication channel.\n")); |
2757 | #endif | 2757 | #endif |
2758 | } | 2758 | } |
2759 | return MHD_YES; | 2759 | return MHD_YES; |
@@ -2858,7 +2858,7 @@ internal_suspend_connection_ (struct MHD_Connection *connection) | |||
2858 | EPOLL_CTL_DEL, | 2858 | EPOLL_CTL_DEL, |
2859 | connection->socket_fd, | 2859 | connection->socket_fd, |
2860 | NULL)) | 2860 | NULL)) |
2861 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 2861 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
2862 | connection->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; | 2862 | connection->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; |
2863 | } | 2863 | } |
2864 | connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED; | 2864 | connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED; |
@@ -2915,7 +2915,7 @@ MHD_suspend_connection (struct MHD_Connection *connection) | |||
2915 | #ifdef HAVE_MESSAGES | 2915 | #ifdef HAVE_MESSAGES |
2916 | MHD_DLOG (daemon, | 2916 | MHD_DLOG (daemon, |
2917 | _ ( | 2917 | _ ( |
2918 | "Error: connection scheduled for \"upgrade\" cannot be suspended")); | 2918 | "Error: connection scheduled for \"upgrade\" cannot be suspended.\n")); |
2919 | #endif /* HAVE_MESSAGES */ | 2919 | #endif /* HAVE_MESSAGES */ |
2920 | return; | 2920 | return; |
2921 | } | 2921 | } |
@@ -2954,7 +2954,7 @@ MHD_resume_connection (struct MHD_Connection *connection) | |||
2954 | #ifdef HAVE_MESSAGES | 2954 | #ifdef HAVE_MESSAGES |
2955 | MHD_DLOG (daemon, | 2955 | MHD_DLOG (daemon, |
2956 | _ ( | 2956 | _ ( |
2957 | "Failed to signal resume via inter-thread communication channel.")); | 2957 | "Failed to signal resume via inter-thread communication channel.\n")); |
2958 | #endif | 2958 | #endif |
2959 | } | 2959 | } |
2960 | } | 2960 | } |
@@ -3039,7 +3039,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
3039 | if (0 != (daemon->options & MHD_USE_EPOLL)) | 3039 | if (0 != (daemon->options & MHD_USE_EPOLL)) |
3040 | { | 3040 | { |
3041 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) | 3041 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) |
3042 | MHD_PANIC ("Resumed connection was already in EREADY set\n"); | 3042 | MHD_PANIC ("Resumed connection was already in EREADY set.\n"); |
3043 | /* we always mark resumed connections as ready, as we | 3043 | /* we always mark resumed connections as ready, as we |
3044 | might have missed the edge poll event during suspension */ | 3044 | might have missed the edge poll event during suspension */ |
3045 | EDLL_insert (daemon->eready_head, | 3045 | EDLL_insert (daemon->eready_head, |
@@ -3089,7 +3089,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
3089 | #ifdef HAVE_MESSAGES | 3089 | #ifdef HAVE_MESSAGES |
3090 | MHD_DLOG (daemon, | 3090 | MHD_DLOG (daemon, |
3091 | _ ( | 3091 | _ ( |
3092 | "Failed to signal resume of connection via inter-thread communication channel.")); | 3092 | "Failed to signal resume of connection via inter-thread communication channel.\n")); |
3093 | #endif | 3093 | #endif |
3094 | } | 3094 | } |
3095 | } | 3095 | } |
@@ -3353,7 +3353,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
3353 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 3353 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
3354 | (! pos->thread_joined) && | 3354 | (! pos->thread_joined) && |
3355 | (! MHD_join_thread_ (pos->pid.handle)) ) | 3355 | (! MHD_join_thread_ (pos->pid.handle)) ) |
3356 | MHD_PANIC (_ ("Failed to join a thread\n")); | 3356 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
3357 | #endif | 3357 | #endif |
3358 | #ifdef UPGRADE_SUPPORT | 3358 | #ifdef UPGRADE_SUPPORT |
3359 | cleanup_upgraded_connection (pos); | 3359 | cleanup_upgraded_connection (pos); |
@@ -3395,7 +3395,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
3395 | EPOLL_CTL_DEL, | 3395 | EPOLL_CTL_DEL, |
3396 | pos->socket_fd, | 3396 | pos->socket_fd, |
3397 | NULL)) | 3397 | NULL)) |
3398 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 3398 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
3399 | pos->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; | 3399 | pos->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; |
3400 | } | 3400 | } |
3401 | } | 3401 | } |
@@ -3456,7 +3456,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon, | |||
3456 | { | 3456 | { |
3457 | #ifdef HAVE_MESSAGES | 3457 | #ifdef HAVE_MESSAGES |
3458 | MHD_DLOG (daemon, | 3458 | MHD_DLOG (daemon, |
3459 | _ ("Illegal call to MHD_get_timeout\n")); | 3459 | _ ("Illegal call to MHD_get_timeout.\n")); |
3460 | #endif | 3460 | #endif |
3461 | return MHD_NO; | 3461 | return MHD_NO; |
3462 | } | 3462 | } |
@@ -3733,7 +3733,7 @@ MHD_select (struct MHD_Daemon *daemon, | |||
3733 | { | 3733 | { |
3734 | #ifdef HAVE_MESSAGES | 3734 | #ifdef HAVE_MESSAGES |
3735 | MHD_DLOG (daemon, | 3735 | MHD_DLOG (daemon, |
3736 | _ ("Could not obtain daemon fdsets")); | 3736 | _ ("Could not obtain daemon fdsets.\n")); |
3737 | #endif | 3737 | #endif |
3738 | err_state = MHD_YES; | 3738 | err_state = MHD_YES; |
3739 | } | 3739 | } |
@@ -3750,7 +3750,7 @@ MHD_select (struct MHD_Daemon *daemon, | |||
3750 | { | 3750 | { |
3751 | #ifdef HAVE_MESSAGES | 3751 | #ifdef HAVE_MESSAGES |
3752 | MHD_DLOG (daemon, | 3752 | MHD_DLOG (daemon, |
3753 | _ ("Could not add listen socket to fdset")); | 3753 | _ ("Could not add listen socket to fdset.\n")); |
3754 | #endif | 3754 | #endif |
3755 | return MHD_NO; | 3755 | return MHD_NO; |
3756 | } | 3756 | } |
@@ -3779,7 +3779,7 @@ MHD_select (struct MHD_Daemon *daemon, | |||
3779 | #ifdef HAVE_MESSAGES | 3779 | #ifdef HAVE_MESSAGES |
3780 | MHD_DLOG (daemon, | 3780 | MHD_DLOG (daemon, |
3781 | _ ( | 3781 | _ ( |
3782 | "Could not add control inter-thread communication channel FD to fdset")); | 3782 | "Could not add control inter-thread communication channel FD to fdset.\n")); |
3783 | #endif | 3783 | #endif |
3784 | err_state = MHD_YES; | 3784 | err_state = MHD_YES; |
3785 | #if defined(MHD_WINSOCK_SOCKETS) | 3785 | #if defined(MHD_WINSOCK_SOCKETS) |
@@ -4412,7 +4412,7 @@ MHD_epoll (struct MHD_Daemon *daemon, | |||
4412 | NULL)) && | 4412 | NULL)) && |
4413 | (ENOENT != errno) ) /* ENOENT can happen due to race with | 4413 | (ENOENT != errno) ) /* ENOENT can happen due to race with |
4414 | #MHD_quiesce_daemon() */ | 4414 | #MHD_quiesce_daemon() */ |
4415 | MHD_PANIC ("Failed to remove listen FD from epoll set\n"); | 4415 | MHD_PANIC ("Failed to remove listen FD from epoll set.\n"); |
4416 | daemon->listen_socket_in_epoll = false; | 4416 | daemon->listen_socket_in_epoll = false; |
4417 | } | 4417 | } |
4418 | 4418 | ||
@@ -4448,7 +4448,7 @@ MHD_epoll (struct MHD_Daemon *daemon, | |||
4448 | EPOLL_CTL_DEL, | 4448 | EPOLL_CTL_DEL, |
4449 | ls, | 4449 | ls, |
4450 | NULL)) | 4450 | NULL)) |
4451 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set\n")); | 4451 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set.\n")); |
4452 | daemon->listen_socket_in_epoll = false; | 4452 | daemon->listen_socket_in_epoll = false; |
4453 | } | 4453 | } |
4454 | 4454 | ||
@@ -4890,7 +4890,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4890 | { | 4890 | { |
4891 | #ifdef HAVE_MESSAGES | 4891 | #ifdef HAVE_MESSAGES |
4892 | MHD_DLOG (daemon, | 4892 | MHD_DLOG (daemon, |
4893 | "Using MHD_quiesce_daemon in this mode requires MHD_USE_ITC\n"); | 4893 | "Using MHD_quiesce_daemon in this mode requires MHD_USE_ITC.\n"); |
4894 | #endif | 4894 | #endif |
4895 | return MHD_INVALID_SOCKET; | 4895 | return MHD_INVALID_SOCKET; |
4896 | } | 4896 | } |
@@ -4909,7 +4909,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4909 | EPOLL_CTL_DEL, | 4909 | EPOLL_CTL_DEL, |
4910 | ret, | 4910 | ret, |
4911 | NULL)) | 4911 | NULL)) |
4912 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set\n")); | 4912 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set.\n")); |
4913 | daemon->worker_pool[i].listen_socket_in_epoll = false; | 4913 | daemon->worker_pool[i].listen_socket_in_epoll = false; |
4914 | } | 4914 | } |
4915 | else | 4915 | else |
@@ -4918,7 +4918,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4918 | { | 4918 | { |
4919 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, "q")) | 4919 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, "q")) |
4920 | MHD_PANIC (_ ( | 4920 | MHD_PANIC (_ ( |
4921 | "Failed to signal quiesce via inter-thread communication channel")); | 4921 | "Failed to signal quiesce via inter-thread communication channel.\n")); |
4922 | } | 4922 | } |
4923 | } | 4923 | } |
4924 | #endif | 4924 | #endif |
@@ -4934,14 +4934,14 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4934 | NULL)) && | 4934 | NULL)) && |
4935 | (ENOENT != errno) ) /* ENOENT can happen due to race with | 4935 | (ENOENT != errno) ) /* ENOENT can happen due to race with |
4936 | #MHD_epoll() */ | 4936 | #MHD_epoll() */ |
4937 | MHD_PANIC ("Failed to remove listen FD from epoll set\n"); | 4937 | MHD_PANIC ("Failed to remove listen FD from epoll set.\n"); |
4938 | daemon->listen_socket_in_epoll = false; | 4938 | daemon->listen_socket_in_epoll = false; |
4939 | } | 4939 | } |
4940 | #endif | 4940 | #endif |
4941 | if ( (MHD_ITC_IS_VALID_ (daemon->itc)) && | 4941 | if ( (MHD_ITC_IS_VALID_ (daemon->itc)) && |
4942 | (! MHD_itc_activate_ (daemon->itc, "q")) ) | 4942 | (! MHD_itc_activate_ (daemon->itc, "q")) ) |
4943 | MHD_PANIC (_ ( | 4943 | MHD_PANIC (_ ( |
4944 | "failed to signal quiesce via inter-thread communication channel")); | 4944 | "failed to signal quiesce via inter-thread communication channel.\n")); |
4945 | return ret; | 4945 | return ret; |
4946 | } | 4946 | } |
4947 | 4947 | ||
@@ -5122,7 +5122,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5122 | { | 5122 | { |
5123 | #ifdef HAVE_MESSAGES | 5123 | #ifdef HAVE_MESSAGES |
5124 | MHD_DLOG (daemon, | 5124 | MHD_DLOG (daemon, |
5125 | _ ("Specified thread pool size (%u) too big\n"), | 5125 | _ ("Specified thread pool size (%u) too big.\n"), |
5126 | daemon->worker_pool_size); | 5126 | daemon->worker_pool_size); |
5127 | #endif | 5127 | #endif |
5128 | return MHD_NO; | 5128 | return MHD_NO; |
@@ -5160,7 +5160,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5160 | else | 5160 | else |
5161 | MHD_DLOG (daemon, | 5161 | MHD_DLOG (daemon, |
5162 | _ ( | 5162 | _ ( |
5163 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5163 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5164 | opt); | 5164 | opt); |
5165 | #endif | 5165 | #endif |
5166 | break; | 5166 | break; |
@@ -5173,7 +5173,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5173 | else | 5173 | else |
5174 | MHD_DLOG (daemon, | 5174 | MHD_DLOG (daemon, |
5175 | _ ( | 5175 | _ ( |
5176 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5176 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5177 | opt); | 5177 | opt); |
5178 | #endif | 5178 | #endif |
5179 | break; | 5179 | break; |
@@ -5186,7 +5186,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5186 | else | 5186 | else |
5187 | MHD_DLOG (daemon, | 5187 | MHD_DLOG (daemon, |
5188 | _ ( | 5188 | _ ( |
5189 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5189 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5190 | opt); | 5190 | opt); |
5191 | #endif | 5191 | #endif |
5192 | break; | 5192 | break; |
@@ -5199,7 +5199,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5199 | else | 5199 | else |
5200 | MHD_DLOG (daemon, | 5200 | MHD_DLOG (daemon, |
5201 | _ ( | 5201 | _ ( |
5202 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5202 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5203 | opt); | 5203 | opt); |
5204 | #endif | 5204 | #endif |
5205 | break; | 5205 | break; |
@@ -5219,7 +5219,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5219 | { | 5219 | { |
5220 | #ifdef HAVE_MESSAGES | 5220 | #ifdef HAVE_MESSAGES |
5221 | MHD_DLOG (daemon, | 5221 | MHD_DLOG (daemon, |
5222 | _ ("Error initializing DH parameters\n")); | 5222 | _ ("Error initializing DH parameters.\n")); |
5223 | #endif | 5223 | #endif |
5224 | return MHD_NO; | 5224 | return MHD_NO; |
5225 | } | 5225 | } |
@@ -5229,7 +5229,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5229 | { | 5229 | { |
5230 | #ifdef HAVE_MESSAGES | 5230 | #ifdef HAVE_MESSAGES |
5231 | MHD_DLOG (daemon, | 5231 | MHD_DLOG (daemon, |
5232 | _ ("Diffie-Hellman parameters string too long\n")); | 5232 | _ ("Diffie-Hellman parameters string too long.\n")); |
5233 | #endif | 5233 | #endif |
5234 | return MHD_NO; | 5234 | return MHD_NO; |
5235 | } | 5235 | } |
@@ -5240,7 +5240,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5240 | { | 5240 | { |
5241 | #ifdef HAVE_MESSAGES | 5241 | #ifdef HAVE_MESSAGES |
5242 | MHD_DLOG (daemon, | 5242 | MHD_DLOG (daemon, |
5243 | _ ("Bad Diffie-Hellman parameters format\n")); | 5243 | _ ("Bad Diffie-Hellman parameters format.\n")); |
5244 | #endif | 5244 | #endif |
5245 | gnutls_dh_params_deinit (daemon->https_mem_dhparams); | 5245 | gnutls_dh_params_deinit (daemon->https_mem_dhparams); |
5246 | return MHD_NO; | 5246 | return MHD_NO; |
@@ -5251,7 +5251,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5251 | else | 5251 | else |
5252 | MHD_DLOG (daemon, | 5252 | MHD_DLOG (daemon, |
5253 | _ ( | 5253 | _ ( |
5254 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5254 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5255 | opt); | 5255 | opt); |
5256 | #endif | 5256 | #endif |
5257 | break; | 5257 | break; |
@@ -5280,7 +5280,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5280 | else | 5280 | else |
5281 | MHD_DLOG (daemon, | 5281 | MHD_DLOG (daemon, |
5282 | _ ( | 5282 | _ ( |
5283 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5283 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5284 | opt); | 5284 | opt); |
5285 | #endif | 5285 | #endif |
5286 | break; | 5286 | break; |
@@ -5289,7 +5289,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5289 | #ifdef HAVE_MESSAGES | 5289 | #ifdef HAVE_MESSAGES |
5290 | MHD_DLOG (daemon, | 5290 | MHD_DLOG (daemon, |
5291 | _ ( | 5291 | _ ( |
5292 | "MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0\n")); | 5292 | "MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0.\n")); |
5293 | #endif | 5293 | #endif |
5294 | return MHD_NO; | 5294 | return MHD_NO; |
5295 | #else | 5295 | #else |
@@ -5301,7 +5301,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5301 | #ifdef HAVE_MESSAGES | 5301 | #ifdef HAVE_MESSAGES |
5302 | MHD_DLOG (daemon, | 5302 | MHD_DLOG (daemon, |
5303 | _ ( | 5303 | _ ( |
5304 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5304 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5305 | opt); | 5305 | opt); |
5306 | #endif | 5306 | #endif |
5307 | break; | 5307 | break; |
@@ -5311,7 +5311,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5311 | #ifdef HAVE_MESSAGES | 5311 | #ifdef HAVE_MESSAGES |
5312 | MHD_DLOG (daemon, | 5312 | MHD_DLOG (daemon, |
5313 | _ ( | 5313 | _ ( |
5314 | "MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3\n")); | 5314 | "MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3.\n")); |
5315 | #endif | 5315 | #endif |
5316 | return MHD_NO; | 5316 | return MHD_NO; |
5317 | #else | 5317 | #else |
@@ -5323,7 +5323,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5323 | #ifdef HAVE_MESSAGES | 5323 | #ifdef HAVE_MESSAGES |
5324 | MHD_DLOG (daemon, | 5324 | MHD_DLOG (daemon, |
5325 | _ ( | 5325 | _ ( |
5326 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5326 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5327 | opt); | 5327 | opt); |
5328 | #endif | 5328 | #endif |
5329 | break; | 5329 | break; |
@@ -5382,7 +5382,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5382 | #else /* ! TCP_FASTOPEN */ | 5382 | #else /* ! TCP_FASTOPEN */ |
5383 | #ifdef HAVE_MESSAGES | 5383 | #ifdef HAVE_MESSAGES |
5384 | MHD_DLOG (daemon, | 5384 | MHD_DLOG (daemon, |
5385 | _ ("TCP fastopen is not supported on this platform\n")); | 5385 | _ ("TCP fastopen is not supported on this platform.\n")); |
5386 | return MHD_NO; | 5386 | return MHD_NO; |
5387 | #endif /* HAVE_MESSAGES */ | 5387 | #endif /* HAVE_MESSAGES */ |
5388 | #endif /* ! TCP_FASTOPEN */ | 5388 | #endif /* ! TCP_FASTOPEN */ |
@@ -5536,7 +5536,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5536 | #else | 5536 | #else |
5537 | MHD_DLOG (daemon, | 5537 | MHD_DLOG (daemon, |
5538 | _ ( | 5538 | _ ( |
5539 | "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3\n"), | 5539 | "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3.\n"), |
5540 | opt); | 5540 | opt); |
5541 | return MHD_NO; | 5541 | return MHD_NO; |
5542 | #endif | 5542 | #endif |
@@ -5550,14 +5550,14 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5550 | { | 5550 | { |
5551 | MHD_DLOG (daemon, | 5551 | MHD_DLOG (daemon, |
5552 | _ ( | 5552 | _ ( |
5553 | "MHD HTTPS option %d passed to MHD compiled without HTTPS support\n"), | 5553 | "MHD HTTPS option %d passed to MHD compiled without HTTPS support.\n"), |
5554 | opt); | 5554 | opt); |
5555 | } | 5555 | } |
5556 | else | 5556 | else |
5557 | { | 5557 | { |
5558 | MHD_DLOG (daemon, | 5558 | MHD_DLOG (daemon, |
5559 | _ ( | 5559 | _ ( |
5560 | "Invalid option %d! (Did you terminate the list with MHD_OPTION_END?)\n"), | 5560 | "Invalid option %d! (Did you terminate the list with MHD_OPTION_END?).\n"), |
5561 | opt); | 5561 | opt); |
5562 | } | 5562 | } |
5563 | #endif | 5563 | #endif |
@@ -5928,7 +5928,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5928 | #ifdef HAVE_MESSAGES | 5928 | #ifdef HAVE_MESSAGES |
5929 | MHD_DLOG (daemon, | 5929 | MHD_DLOG (daemon, |
5930 | _ ( | 5930 | _ ( |
5931 | "file descriptor for inter-thread communication channel exceeds maximum value\n")); | 5931 | "file descriptor for inter-thread communication channel exceeds maximum value.\n")); |
5932 | #endif | 5932 | #endif |
5933 | MHD_itc_destroy_chk_ (daemon->itc); | 5933 | MHD_itc_destroy_chk_ (daemon->itc); |
5934 | #ifdef HTTPS_SUPPORT | 5934 | #ifdef HTTPS_SUPPORT |
@@ -5948,7 +5948,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5948 | { | 5948 | { |
5949 | #ifdef HAVE_MESSAGES | 5949 | #ifdef HAVE_MESSAGES |
5950 | MHD_DLOG (daemon, | 5950 | MHD_DLOG (daemon, |
5951 | _ ("Specified value for NC_SIZE too large\n")); | 5951 | _ ("Specified value for NC_SIZE too large.\n")); |
5952 | #endif | 5952 | #endif |
5953 | #ifdef HTTPS_SUPPORT | 5953 | #ifdef HTTPS_SUPPORT |
5954 | if (0 != (*pflags & MHD_USE_TLS)) | 5954 | if (0 != (*pflags & MHD_USE_TLS)) |
@@ -5979,7 +5979,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5979 | { | 5979 | { |
5980 | #ifdef HAVE_MESSAGES | 5980 | #ifdef HAVE_MESSAGES |
5981 | MHD_DLOG (daemon, | 5981 | MHD_DLOG (daemon, |
5982 | _ ("MHD failed to initialize nonce-nc mutex\n")); | 5982 | _ ("MHD failed to initialize nonce-nc mutex.\n")); |
5983 | #endif | 5983 | #endif |
5984 | #ifdef HTTPS_SUPPORT | 5984 | #ifdef HTTPS_SUPPORT |
5985 | if (0 != (*pflags & MHD_USE_TLS)) | 5985 | if (0 != (*pflags & MHD_USE_TLS)) |
@@ -6000,7 +6000,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6000 | #ifdef HAVE_MESSAGES | 6000 | #ifdef HAVE_MESSAGES |
6001 | MHD_DLOG (daemon, | 6001 | MHD_DLOG (daemon, |
6002 | _ ( | 6002 | _ ( |
6003 | "MHD thread polling only works with MHD_USE_INTERNAL_POLLING_THREAD\n")); | 6003 | "MHD thread polling only works with MHD_USE_INTERNAL_POLLING_THREAD.\n")); |
6004 | #endif | 6004 | #endif |
6005 | goto free_and_fail; | 6005 | goto free_and_fail; |
6006 | } | 6006 | } |
@@ -6098,7 +6098,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6098 | #ifdef HAVE_MESSAGES | 6098 | #ifdef HAVE_MESSAGES |
6099 | MHD_DLOG (daemon, | 6099 | MHD_DLOG (daemon, |
6100 | _ ( | 6100 | _ ( |
6101 | "Cannot allow listening address reuse: SO_REUSEPORT not defined\n")); | 6101 | "Cannot allow listening address reuse: SO_REUSEPORT not defined.\n")); |
6102 | #endif | 6102 | #endif |
6103 | goto free_and_fail; | 6103 | goto free_and_fail; |
6104 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ | 6104 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ |
@@ -6134,7 +6134,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6134 | #ifdef HAVE_MESSAGES | 6134 | #ifdef HAVE_MESSAGES |
6135 | MHD_DLOG (daemon, | 6135 | MHD_DLOG (daemon, |
6136 | _ ( | 6136 | _ ( |
6137 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined\n")); | 6137 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined.\n")); |
6138 | #endif | 6138 | #endif |
6139 | goto free_and_fail; | 6139 | goto free_and_fail; |
6140 | #endif /* MHD_WINSOCK_SOCKETS */ | 6140 | #endif /* MHD_WINSOCK_SOCKETS */ |
@@ -6287,7 +6287,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6287 | #ifdef HAVE_MESSAGES | 6287 | #ifdef HAVE_MESSAGES |
6288 | MHD_DLOG (daemon, | 6288 | MHD_DLOG (daemon, |
6289 | _ ( | 6289 | _ ( |
6290 | "Failed to get listen port number (`struct sockaddr_storage` too small!?)\n")); | 6290 | "Failed to get listen port number (`struct sockaddr_storage` too small!?).\n")); |
6291 | #endif /* HAVE_MESSAGES */ | 6291 | #endif /* HAVE_MESSAGES */ |
6292 | } | 6292 | } |
6293 | #ifndef __linux__ | 6293 | #ifndef __linux__ |
@@ -6398,7 +6398,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6398 | { | 6398 | { |
6399 | #ifdef HAVE_MESSAGES | 6399 | #ifdef HAVE_MESSAGES |
6400 | MHD_DLOG (daemon, | 6400 | MHD_DLOG (daemon, |
6401 | _ ("MHD failed to initialize IP connection limit mutex\n")); | 6401 | _ ("MHD failed to initialize IP connection limit mutex.\n")); |
6402 | #endif | 6402 | #endif |
6403 | if (MHD_INVALID_SOCKET != listen_fd) | 6403 | if (MHD_INVALID_SOCKET != listen_fd) |
6404 | MHD_socket_close_chk_ (listen_fd); | 6404 | MHD_socket_close_chk_ (listen_fd); |
@@ -6408,7 +6408,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6408 | { | 6408 | { |
6409 | #ifdef HAVE_MESSAGES | 6409 | #ifdef HAVE_MESSAGES |
6410 | MHD_DLOG (daemon, | 6410 | MHD_DLOG (daemon, |
6411 | _ ("MHD failed to initialize IP connection limit mutex\n")); | 6411 | _ ("MHD failed to initialize IP connection limit mutex.\n")); |
6412 | #endif | 6412 | #endif |
6413 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 6413 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
6414 | MHD_mutex_destroy_chk_ (&daemon->cleanup_connection_mutex); | 6414 | MHD_mutex_destroy_chk_ (&daemon->cleanup_connection_mutex); |
@@ -6426,7 +6426,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6426 | { | 6426 | { |
6427 | #ifdef HAVE_MESSAGES | 6427 | #ifdef HAVE_MESSAGES |
6428 | MHD_DLOG (daemon, | 6428 | MHD_DLOG (daemon, |
6429 | _ ("Failed to initialize TLS support\n")); | 6429 | _ ("Failed to initialize TLS support.\n")); |
6430 | #endif | 6430 | #endif |
6431 | if (MHD_INVALID_SOCKET != listen_fd) | 6431 | if (MHD_INVALID_SOCKET != listen_fd) |
6432 | MHD_socket_close_chk_ (listen_fd); | 6432 | MHD_socket_close_chk_ (listen_fd); |
@@ -6514,7 +6514,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6514 | #ifdef HAVE_MESSAGES | 6514 | #ifdef HAVE_MESSAGES |
6515 | MHD_DLOG (daemon, | 6515 | MHD_DLOG (daemon, |
6516 | _ ( | 6516 | _ ( |
6517 | "File descriptor for worker inter-thread communication channel exceeds maximum value\n")); | 6517 | "File descriptor for worker inter-thread communication channel exceeds maximum value.\n")); |
6518 | #endif | 6518 | #endif |
6519 | MHD_itc_destroy_chk_ (d->itc); | 6519 | MHD_itc_destroy_chk_ (d->itc); |
6520 | goto thread_failed; | 6520 | goto thread_failed; |
@@ -6539,7 +6539,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6539 | { | 6539 | { |
6540 | #ifdef HAVE_MESSAGES | 6540 | #ifdef HAVE_MESSAGES |
6541 | MHD_DLOG (daemon, | 6541 | MHD_DLOG (daemon, |
6542 | _ ("MHD failed to initialize cleanup connection mutex\n")); | 6542 | _ ("MHD failed to initialize cleanup connection mutex.\n")); |
6543 | #endif | 6543 | #endif |
6544 | goto thread_failed; | 6544 | goto thread_failed; |
6545 | } | 6545 | } |
@@ -6609,7 +6609,7 @@ free_and_fail: | |||
6609 | EPOLL_CTL_DEL, | 6609 | EPOLL_CTL_DEL, |
6610 | daemon->epoll_upgrade_fd, | 6610 | daemon->epoll_upgrade_fd, |
6611 | NULL)) | 6611 | NULL)) |
6612 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 6612 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
6613 | daemon->upgrade_fd_in_epoll = false; | 6613 | daemon->upgrade_fd_in_epoll = false; |
6614 | } | 6614 | } |
6615 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 6615 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
@@ -6751,7 +6751,7 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
6751 | (MHD_ITC_IS_VALID_ (daemon->itc)) && | 6751 | (MHD_ITC_IS_VALID_ (daemon->itc)) && |
6752 | (! MHD_itc_activate_ (daemon->itc, "e")) ) | 6752 | (! MHD_itc_activate_ (daemon->itc, "e")) ) |
6753 | MHD_PANIC (_ ( | 6753 | MHD_PANIC (_ ( |
6754 | "Failed to signal shutdown via inter-thread communication channel")); | 6754 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
6755 | #endif | 6755 | #endif |
6756 | } | 6756 | } |
6757 | 6757 | ||
@@ -6766,7 +6766,7 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
6766 | { | 6766 | { |
6767 | MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); | 6767 | MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); |
6768 | if (! MHD_join_thread_ (pos->pid.handle)) | 6768 | if (! MHD_join_thread_ (pos->pid.handle)) |
6769 | MHD_PANIC (_ ("Failed to join a thread\n")); | 6769 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
6770 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); | 6770 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); |
6771 | pos->thread_joined = true; | 6771 | pos->thread_joined = true; |
6772 | /* The thread may have concurrently modified the DLL, | 6772 | /* The thread may have concurrently modified the DLL, |
@@ -6798,7 +6798,7 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
6798 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 6798 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
6799 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 6799 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
6800 | (! pos->thread_joined) ) | 6800 | (! pos->thread_joined) ) |
6801 | MHD_PANIC (_ ("Failed to join a thread\n")); | 6801 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
6802 | #endif | 6802 | #endif |
6803 | close_connection (pos); | 6803 | close_connection (pos); |
6804 | } | 6804 | } |
@@ -6844,7 +6844,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
6844 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, | 6844 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, |
6845 | "e")) | 6845 | "e")) |
6846 | MHD_PANIC (_ ( | 6846 | MHD_PANIC (_ ( |
6847 | "Failed to signal shutdown via inter-thread communication channel.")); | 6847 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
6848 | } | 6848 | } |
6849 | else | 6849 | else |
6850 | mhd_assert (MHD_INVALID_SOCKET != fd); | 6850 | mhd_assert (MHD_INVALID_SOCKET != fd); |
@@ -6882,7 +6882,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
6882 | if (! MHD_itc_activate_ (daemon->itc, | 6882 | if (! MHD_itc_activate_ (daemon->itc, |
6883 | "e")) | 6883 | "e")) |
6884 | MHD_PANIC (_ ( | 6884 | MHD_PANIC (_ ( |
6885 | "Failed to signal shutdown via inter-thread communication channel")); | 6885 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
6886 | } | 6886 | } |
6887 | else | 6887 | else |
6888 | { | 6888 | { |
@@ -6900,7 +6900,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
6900 | 6900 | ||
6901 | if (! MHD_join_thread_ (daemon->pid.handle)) | 6901 | if (! MHD_join_thread_ (daemon->pid.handle)) |
6902 | { | 6902 | { |
6903 | MHD_PANIC (_ ("Failed to join a thread\n")); | 6903 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
6904 | } | 6904 | } |
6905 | /* close_all_connections() was called in daemon thread. */ | 6905 | /* close_all_connections() was called in daemon thread. */ |
6906 | } | 6906 | } |
@@ -7320,10 +7320,10 @@ MHD_init (void) | |||
7320 | 7320 | ||
7321 | #if defined(MHD_WINSOCK_SOCKETS) | 7321 | #if defined(MHD_WINSOCK_SOCKETS) |
7322 | if (0 != WSAStartup (MAKEWORD (2, 2), &wsd)) | 7322 | if (0 != WSAStartup (MAKEWORD (2, 2), &wsd)) |
7323 | MHD_PANIC (_ ("Failed to initialize winsock\n")); | 7323 | MHD_PANIC (_ ("Failed to initialize winsock.\n")); |
7324 | mhd_winsock_inited_ = 1; | 7324 | mhd_winsock_inited_ = 1; |
7325 | if ((2 != LOBYTE (wsd.wVersion)) && (2 != HIBYTE (wsd.wVersion))) | 7325 | if ((2 != LOBYTE (wsd.wVersion)) && (2 != HIBYTE (wsd.wVersion))) |
7326 | MHD_PANIC (_ ("Winsock version 2.2 is not available\n")); | 7326 | MHD_PANIC (_ ("Winsock version 2.2 is not available.\n")); |
7327 | #endif /* MHD_WINSOCK_SOCKETS */ | 7327 | #endif /* MHD_WINSOCK_SOCKETS */ |
7328 | #ifdef HTTPS_SUPPORT | 7328 | #ifdef HTTPS_SUPPORT |
7329 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 7329 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
@@ -7331,17 +7331,17 @@ MHD_init (void) | |||
7331 | #if defined(MHD_USE_POSIX_THREADS) | 7331 | #if defined(MHD_USE_POSIX_THREADS) |
7332 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, | 7332 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, |
7333 | &gcry_threads_pthread)) | 7333 | &gcry_threads_pthread)) |
7334 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt\n")); | 7334 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); |
7335 | #elif defined(MHD_W32_MUTEX_) | 7335 | #elif defined(MHD_W32_MUTEX_) |
7336 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, | 7336 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, |
7337 | &gcry_threads_w32)) | 7337 | &gcry_threads_w32)) |
7338 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt\n")); | 7338 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); |
7339 | #endif /* defined(MHD_W32_MUTEX_) */ | 7339 | #endif /* defined(MHD_W32_MUTEX_) */ |
7340 | gcry_check_version (NULL); | 7340 | gcry_check_version (NULL); |
7341 | #else | 7341 | #else |
7342 | if (NULL == gcry_check_version ("1.6.0")) | 7342 | if (NULL == gcry_check_version ("1.6.0")) |
7343 | MHD_PANIC (_ ( | 7343 | MHD_PANIC (_ ( |
7344 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer\n")); | 7344 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n")); |
7345 | #endif | 7345 | #endif |
7346 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 7346 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
7347 | gnutls_global_init (); | 7347 | gnutls_global_init (); |
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index 49ce4dce..d8d3b4ea 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c | |||
@@ -83,8 +83,8 @@ | |||
83 | * Check that @a n is below #MAX_NONCE | 83 | * Check that @a n is below #MAX_NONCE |
84 | */ | 84 | */ |
85 | #define VLA_CHECK_LEN_DIGEST(n) do { if ((n) > MAX_DIGEST) mhd_panic ( \ | 85 | #define VLA_CHECK_LEN_DIGEST(n) do { if ((n) > MAX_DIGEST) mhd_panic ( \ |
86 | mhd_panic_cls, __FILE__, __LINE__, \ | 86 | mhd_panic_cls, __FILE__, __LINE__, \ |
87 | "VLA too big"); } while (0) | 87 | "VLA too big.\n"); } while (0) |
88 | 88 | ||
89 | 89 | ||
90 | /** | 90 | /** |
@@ -804,7 +804,7 @@ check_argument_match (struct MHD_Connection *connection, | |||
804 | { | 804 | { |
805 | #ifdef HAVE_MESSAGES | 805 | #ifdef HAVE_MESSAGES |
806 | MHD_DLOG (connection->daemon, | 806 | MHD_DLOG (connection->daemon, |
807 | _ ("Failed to allocate memory for copy of URI arguments\n")); | 807 | _ ("Failed to allocate memory for copy of URI arguments.\n")); |
808 | #endif /* HAVE_MESSAGES */ | 808 | #endif /* HAVE_MESSAGES */ |
809 | return MHD_NO; | 809 | return MHD_NO; |
810 | } | 810 | } |
@@ -1041,7 +1041,7 @@ digest_auth_check_all (struct MHD_Connection *connection, | |||
1041 | { | 1041 | { |
1042 | #ifdef HAVE_MESSAGES | 1042 | #ifdef HAVE_MESSAGES |
1043 | MHD_DLOG (daemon, | 1043 | MHD_DLOG (daemon, |
1044 | _ ("Failed to allocate memory for auth header processing\n")); | 1044 | _ ("Failed to allocate memory for auth header processing.\n")); |
1045 | #endif /* HAVE_MESSAGES */ | 1045 | #endif /* HAVE_MESSAGES */ |
1046 | return MHD_NO; | 1046 | return MHD_NO; |
1047 | } | 1047 | } |
@@ -1278,7 +1278,7 @@ MHD_digest_auth_check_digest2 (struct MHD_Connection *connection, | |||
1278 | 1278 | ||
1279 | mhd_assert (NULL != digest); | 1279 | mhd_assert (NULL != digest); |
1280 | if (da.digest_size != digest_size) | 1280 | if (da.digest_size != digest_size) |
1281 | MHD_PANIC (_ ("digest size mismatch")); /* API violation! */ | 1281 | MHD_PANIC (_ ("Digest size mismatch.\n")); /* API violation! */ |
1282 | return digest_auth_check_all (connection, | 1282 | return digest_auth_check_all (connection, |
1283 | &da, | 1283 | &da, |
1284 | realm, | 1284 | realm, |
@@ -1396,7 +1396,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection, | |||
1396 | { | 1396 | { |
1397 | #ifdef HAVE_MESSAGES | 1397 | #ifdef HAVE_MESSAGES |
1398 | MHD_DLOG (connection->daemon, | 1398 | MHD_DLOG (connection->daemon, |
1399 | _ ("Failed to allocate memory for auth response header\n")); | 1399 | _ ("Failed to allocate memory for auth response header.\n")); |
1400 | #endif /* HAVE_MESSAGES */ | 1400 | #endif /* HAVE_MESSAGES */ |
1401 | return MHD_NO; | 1401 | return MHD_NO; |
1402 | } | 1402 | } |
@@ -1438,7 +1438,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection, | |||
1438 | { | 1438 | { |
1439 | #ifdef HAVE_MESSAGES | 1439 | #ifdef HAVE_MESSAGES |
1440 | MHD_DLOG (connection->daemon, | 1440 | MHD_DLOG (connection->daemon, |
1441 | _ ("Failed to add Digest auth header\n")); | 1441 | _ ("Failed to add Digest auth header.\n")); |
1442 | #endif /* HAVE_MESSAGES */ | 1442 | #endif /* HAVE_MESSAGES */ |
1443 | } | 1443 | } |
1444 | return ret; | 1444 | return ret; |
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index abedefcf..25c05163 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -1073,7 +1073,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, | |||
1073 | EPOLL_CTL_DEL, | 1073 | EPOLL_CTL_DEL, |
1074 | connection->socket_fd, | 1074 | connection->socket_fd, |
1075 | &event)) | 1075 | &event)) |
1076 | MHD_PANIC (_ ("Error cleaning up while handling epoll error")); | 1076 | MHD_PANIC (_ ("Error cleaning up while handling epoll error.\n")); |
1077 | #ifdef HAVE_MESSAGES | 1077 | #ifdef HAVE_MESSAGES |
1078 | MHD_DLOG (daemon, | 1078 | MHD_DLOG (daemon, |
1079 | _ ("Call to epoll_ctl failed: %s\n"), | 1079 | _ ("Call to epoll_ctl failed: %s\n"), |
diff --git a/src/microhttpd/test_daemon.c b/src/microhttpd/test_daemon.c index 430c8e18..caeaea3d 100644 --- a/src/microhttpd/test_daemon.c +++ b/src/microhttpd/test_daemon.c | |||
@@ -143,14 +143,14 @@ testExternalRun () | |||
143 | { | 143 | { |
144 | MHD_stop_daemon (d); | 144 | MHD_stop_daemon (d); |
145 | fprintf (stderr, | 145 | fprintf (stderr, |
146 | "Failed in MHD_get_fdset()\n"); | 146 | "Failed in MHD_get_fdset().\n"); |
147 | return 256; | 147 | return 256; |
148 | } | 148 | } |
149 | if (MHD_run (d) == MHD_NO) | 149 | if (MHD_run (d) == MHD_NO) |
150 | { | 150 | { |
151 | MHD_stop_daemon (d); | 151 | MHD_stop_daemon (d); |
152 | fprintf (stderr, | 152 | fprintf (stderr, |
153 | "Failed in MHD_run()\n"); | 153 | "Failed in MHD_run().\n"); |
154 | return 8; | 154 | return 8; |
155 | } | 155 | } |
156 | i++; | 156 | i++; |
@@ -174,14 +174,14 @@ testThread () | |||
174 | if (NULL == d) | 174 | if (NULL == d) |
175 | { | 175 | { |
176 | fprintf (stderr, | 176 | fprintf (stderr, |
177 | "Failed to start daemon on port %u\n", | 177 | "Failed to start daemon on port %u.\n", |
178 | 1082); | 178 | 1082); |
179 | exit (77); | 179 | exit (77); |
180 | } | 180 | } |
181 | if (MHD_run (d) != MHD_NO) | 181 | if (MHD_run (d) != MHD_NO) |
182 | { | 182 | { |
183 | fprintf (stderr, | 183 | fprintf (stderr, |
184 | "Failed in MHD_run()\n"); | 184 | "Failed in MHD_run().\n"); |
185 | return 32; | 185 | return 32; |
186 | } | 186 | } |
187 | MHD_stop_daemon (d); | 187 | MHD_stop_daemon (d); |
@@ -211,7 +211,7 @@ testMultithread () | |||
211 | if (MHD_run (d) != MHD_NO) | 211 | if (MHD_run (d) != MHD_NO) |
212 | { | 212 | { |
213 | fprintf (stderr, | 213 | fprintf (stderr, |
214 | "Failed in MHD_run()\n"); | 214 | "Failed in MHD_run().\n"); |
215 | return 128; | 215 | return 128; |
216 | } | 216 | } |
217 | MHD_stop_daemon (d); | 217 | MHD_stop_daemon (d); |