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 /src/microhttpd | |
parent | ddc770d8f6da59b3788230412c9a40490594d0f3 (diff) | |
download | libmicrohttpd-f84bdf0a8c4c11d956f63bc6378aaa7fa9bb95aa.tar.gz libmicrohttpd-f84bdf0a8c4c11d956f63bc6378aaa7fa9bb95aa.zip |
Sanitized all log and error messages.
Diffstat (limited to 'src/microhttpd')
-rw-r--r-- | src/microhttpd/basicauth.c | 10 | ||||
-rw-r--r-- | src/microhttpd/connection.c | 30 | ||||
-rw-r--r-- | src/microhttpd/connection_https.c | 2 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 162 | ||||
-rw-r--r-- | src/microhttpd/digestauth.c | 14 | ||||
-rw-r--r-- | src/microhttpd/response.c | 2 | ||||
-rw-r--r-- | src/microhttpd/test_daemon.c | 10 |
7 files changed, 115 insertions, 115 deletions
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); |