diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-28 11:46:59 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-28 11:46:59 +0300 |
commit | 4adc14c948ac4981a7b4c91c6e16dc5fc39dd97a (patch) | |
tree | 9f0a0ce79d2e5cd35f23e4affc98fc16cf7281ca | |
parent | 13e217f5c2e5647552e4452406a43c8dc0782a35 (diff) | |
download | libmicrohttpd-4adc14c948ac4981a7b4c91c6e16dc5fc39dd97a.tar.gz libmicrohttpd-4adc14c948ac4981a7b4c91c6e16dc5fc39dd97a.zip |
Some readability improvements
26 files changed, 436 insertions, 450 deletions
diff --git a/doc/examples/websocket.c b/doc/examples/websocket.c index ea29af62..1d25fe5c 100644 --- a/doc/examples/websocket.c +++ b/doc/examples/websocket.c | |||
@@ -411,8 +411,7 @@ access_handler (void *cls, | |||
411 | { | 411 | { |
412 | struct MHD_Response *response; | 412 | struct MHD_Response *response; |
413 | response = | 413 | response = |
414 | MHD_create_response_from_buffer_static (strlen ( | 414 | MHD_create_response_from_buffer_static (strlen (PAGE_NOT_FOUND), |
415 | PAGE_NOT_FOUND), | ||
416 | PAGE_NOT_FOUND); | 415 | PAGE_NOT_FOUND); |
417 | ret = MHD_queue_response (connection, | 416 | ret = MHD_queue_response (connection, |
418 | MHD_HTTP_NOT_FOUND, | 417 | MHD_HTTP_NOT_FOUND, |
diff --git a/src/examples/post_example.c b/src/examples/post_example.c index 6b10afc0..f49b49ff 100644 --- a/src/examples/post_example.c +++ b/src/examples/post_example.c | |||
@@ -373,8 +373,8 @@ fill_v1_v2_form (const void *cls, | |||
373 | size_t slen; | 373 | size_t slen; |
374 | (void) cls; /* Unused. Silent compiler warning. */ | 374 | (void) cls; /* Unused. Silent compiler warning. */ |
375 | 375 | ||
376 | slen = strlen (SECOND_PAGE) + strlen (session->value_1) + strlen ( | 376 | slen = strlen (SECOND_PAGE) + strlen (session->value_1) |
377 | session->value_2); | 377 | + strlen (session->value_2); |
378 | reply = malloc (slen + 1); | 378 | reply = malloc (slen + 1); |
379 | if (NULL == reply) | 379 | if (NULL == reply) |
380 | return MHD_NO; | 380 | return MHD_NO; |
diff --git a/src/examples/websocket_chatserver_example.c b/src/examples/websocket_chatserver_example.c index cd5940db..f01ada43 100644 --- a/src/examples/websocket_chatserver_example.c +++ b/src/examples/websocket_chatserver_example.c | |||
@@ -966,12 +966,9 @@ chat_adduser (struct ConnectedUser *cu) | |||
966 | 966 | ||
967 | /* add the new user to the list */ | 967 | /* add the new user to the list */ |
968 | size_t user_count_ = user_count + 1; | 968 | size_t user_count_ = user_count + 1; |
969 | struct ConnectedUser **users_ = (struct ConnectedUser **) realloc (users, | 969 | struct ConnectedUser **users_ = |
970 | user_count_ | 970 | (struct ConnectedUser **) realloc (users, user_count_ |
971 | * sizeof ( | 971 | * sizeof (struct ConnectedUser *)); |
972 | struct | ||
973 | ConnectedUser | ||
974 | *)); | ||
975 | if (NULL == users_) | 972 | if (NULL == users_) |
976 | { | 973 | { |
977 | /* realloc failed */ | 974 | /* realloc failed */ |
@@ -1546,8 +1543,8 @@ connecteduser_parse_received_websocket_stream (struct ConnectedUser *cu, | |||
1546 | snprintf (result_text + 5, 235, "%d", (int) cu->user_id); | 1543 | snprintf (result_text + 5, 235, "%d", (int) cu->user_id); |
1547 | strcat (result_text, | 1544 | strcat (result_text, |
1548 | "|"); | 1545 | "|"); |
1549 | snprintf (result_text + strlen (result_text), 240 - strlen ( | 1546 | snprintf (result_text + strlen (result_text), 240 |
1550 | result_text), "%d", (int) ping); | 1547 | - strlen (result_text), "%d", (int) ping); |
1551 | chat_addmessage (0, | 1548 | chat_addmessage (0, |
1552 | 0, | 1549 | 0, |
1553 | result_text, | 1550 | result_text, |
@@ -2256,9 +2253,10 @@ access_handler (void *cls, | |||
2256 | { | 2253 | { |
2257 | /* return error page */ | 2254 | /* return error page */ |
2258 | struct MHD_Response *response; | 2255 | struct MHD_Response *response; |
2259 | response = MHD_create_response_from_buffer_static (strlen ( | 2256 | response = |
2260 | PAGE_INVALID_WEBSOCKET_REQUEST), | 2257 | MHD_create_response_from_buffer_static ( \ |
2261 | PAGE_INVALID_WEBSOCKET_REQUEST); | 2258 | strlen (PAGE_INVALID_WEBSOCKET_REQUEST), |
2259 | PAGE_INVALID_WEBSOCKET_REQUEST); | ||
2262 | ret = MHD_queue_response (connection, | 2260 | ret = MHD_queue_response (connection, |
2263 | MHD_HTTP_BAD_REQUEST, | 2261 | MHD_HTTP_BAD_REQUEST, |
2264 | response); | 2262 | response); |
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c index e1580548..e73b1414 100644 --- a/src/examples/websocket_threaded_example.c +++ b/src/examples/websocket_threaded_example.c | |||
@@ -861,18 +861,19 @@ ahc_cb (void *cls, struct MHD_Connection *con, const char *url, | |||
861 | { | 861 | { |
862 | return send_bad_request (con); | 862 | return send_bad_request (con); |
863 | } | 863 | } |
864 | ws_version_header = MHD_lookup_connection_value ( | 864 | ws_version_header = |
865 | con, MHD_HEADER_KIND, MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION); | 865 | MHD_lookup_connection_value (con, MHD_HEADER_KIND, |
866 | MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION); | ||
866 | if ((NULL == ws_version_header) | 867 | if ((NULL == ws_version_header) |
867 | || (0 != strcmp (ws_version_header, WS_SEC_WEBSOCKET_VERSION))) | 868 | || (0 != strcmp (ws_version_header, WS_SEC_WEBSOCKET_VERSION))) |
868 | { | 869 | { |
869 | return send_upgrade_required (con); | 870 | return send_upgrade_required (con); |
870 | } | 871 | } |
871 | ret = MHD_lookup_connection_value_n ( | 872 | ret = MHD_lookup_connection_value_n (con, MHD_HEADER_KIND, |
872 | con, MHD_HEADER_KIND, | 873 | MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY, |
873 | MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY, | 874 | strlen ( |
874 | strlen (MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY), | 875 | MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY), |
875 | &ws_key_header, &key_size); | 876 | &ws_key_header, &key_size); |
876 | if ((MHD_NO == ret) || (key_size != WS_KEY_LEN)) | 877 | if ((MHD_NO == ret) || (key_size != WS_KEY_LEN)) |
877 | { | 878 | { |
878 | return send_bad_request (con); | 879 | return send_bad_request (con); |
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 5e744b69..41c5d2ce 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -3700,8 +3700,8 @@ MHD_create_response_from_callback (uint64_t size, | |||
3700 | * @deprecated use #MHD_create_response_from_buffer instead | 3700 | * @deprecated use #MHD_create_response_from_buffer instead |
3701 | * @ingroup response | 3701 | * @ingroup response |
3702 | */ | 3702 | */ |
3703 | _MHD_DEPR_FUNC ( | 3703 | _MHD_DEPR_FUNC ("MHD_create_response_from_data() is deprecated, " \ |
3704 | "MHD_create_response_from_data() is deprecated, use MHD_create_response_from_buffer()") \ | 3704 | "use MHD_create_response_from_buffer()") \ |
3705 | _MHD_EXTERN struct MHD_Response * | 3705 | _MHD_EXTERN struct MHD_Response * |
3706 | MHD_create_response_from_data (size_t size, | 3706 | MHD_create_response_from_data (size_t size, |
3707 | void *data, | 3707 | void *data, |
@@ -3974,8 +3974,8 @@ MHD_create_response_from_fd64 (uint64_t size, | |||
3974 | * @return NULL on error (i.e. invalid arguments, out of memory) | 3974 | * @return NULL on error (i.e. invalid arguments, out of memory) |
3975 | * @ingroup response | 3975 | * @ingroup response |
3976 | */ | 3976 | */ |
3977 | _MHD_DEPR_FUNC ( | 3977 | _MHD_DEPR_FUNC ("Function MHD_create_response_from_fd_at_offset() is " \ |
3978 | "Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \ | 3978 | "deprecated, use MHD_create_response_from_fd_at_offset64()") \ |
3979 | _MHD_EXTERN struct MHD_Response * | 3979 | _MHD_EXTERN struct MHD_Response * |
3980 | MHD_create_response_from_fd_at_offset (size_t size, | 3980 | MHD_create_response_from_fd_at_offset (size_t size, |
3981 | int fd, | 3981 | int fd, |
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index f187da59..30260402 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -766,13 +766,14 @@ need_100_continue (struct MHD_Connection *connection) | |||
766 | const char *expect; | 766 | const char *expect; |
767 | 767 | ||
768 | return (MHD_IS_HTTP_VER_1_1_COMPAT (connection->rq.http_ver) && | 768 | return (MHD_IS_HTTP_VER_1_1_COMPAT (connection->rq.http_ver) && |
769 | (MHD_NO != MHD_lookup_connection_value_n (connection, | 769 | (MHD_NO != |
770 | MHD_HEADER_KIND, | 770 | MHD_lookup_connection_value_n (connection, |
771 | MHD_HTTP_HEADER_EXPECT, | 771 | MHD_HEADER_KIND, |
772 | MHD_STATICSTR_LEN_ ( | 772 | MHD_HTTP_HEADER_EXPECT, |
773 | MHD_HTTP_HEADER_EXPECT), | 773 | MHD_STATICSTR_LEN_ ( |
774 | &expect, | 774 | MHD_HTTP_HEADER_EXPECT), |
775 | NULL)) && | 775 | &expect, |
776 | NULL)) && | ||
776 | (MHD_str_equal_caseless_ (expect, | 777 | (MHD_str_equal_caseless_ (expect, |
777 | "100-continue")) ); | 778 | "100-continue")) ); |
778 | } | 779 | } |
@@ -1085,8 +1086,8 @@ try_ready_normal_body (struct MHD_Connection *connection) | |||
1085 | MHD_REQUEST_TERMINATED_COMPLETED_OK); | 1086 | MHD_REQUEST_TERMINATED_COMPLETED_OK); |
1086 | else | 1087 | else |
1087 | CONNECTION_CLOSE_ERROR (connection, | 1088 | CONNECTION_CLOSE_ERROR (connection, |
1088 | _ ( | 1089 | _ ("Closing connection (application reported " \ |
1089 | "Closing connection (application reported error generating data).")); | 1090 | "error generating data).")); |
1090 | return MHD_NO; | 1091 | return MHD_NO; |
1091 | } | 1092 | } |
1092 | response->data_start = connection->rp.rsp_write_position; | 1093 | response->data_start = connection->rp.rsp_write_position; |
@@ -1225,8 +1226,8 @@ try_ready_chunked_body (struct MHD_Connection *connection, | |||
1225 | MHD_mutex_unlock_chk_ (&response->mutex); | 1226 | MHD_mutex_unlock_chk_ (&response->mutex); |
1226 | #endif | 1227 | #endif |
1227 | CONNECTION_CLOSE_ERROR (connection, | 1228 | CONNECTION_CLOSE_ERROR (connection, |
1228 | _ ( | 1229 | _ ("Closing connection (application error " \ |
1229 | "Closing connection (application error generating response).")); | 1230 | "generating response).")); |
1230 | return MHD_NO; | 1231 | return MHD_NO; |
1231 | } | 1232 | } |
1232 | if (MHD_CONTENT_READER_END_OF_STREAM == ret) | 1233 | if (MHD_CONTENT_READER_END_OF_STREAM == ret) |
@@ -3100,13 +3101,14 @@ parse_cookie_header (struct MHD_Connection *connection) | |||
3100 | bool strict_parsing; | 3101 | bool strict_parsing; |
3101 | size_t i; | 3102 | size_t i; |
3102 | 3103 | ||
3103 | if (MHD_NO == MHD_lookup_connection_value_n (connection, | 3104 | if (MHD_NO == |
3104 | MHD_HEADER_KIND, | 3105 | MHD_lookup_connection_value_n (connection, |
3105 | MHD_HTTP_HEADER_COOKIE, | 3106 | MHD_HEADER_KIND, |
3106 | MHD_STATICSTR_LEN_ ( | 3107 | MHD_HTTP_HEADER_COOKIE, |
3107 | MHD_HTTP_HEADER_COOKIE), | 3108 | MHD_STATICSTR_LEN_ ( |
3108 | &hdr, | 3109 | MHD_HTTP_HEADER_COOKIE), |
3109 | &hdr_len)) | 3110 | &hdr, |
3111 | &hdr_len)) | ||
3110 | return MHD_PARSE_COOKIE_OK; | 3112 | return MHD_PARSE_COOKIE_OK; |
3111 | if (0 == hdr_len) | 3113 | if (0 == hdr_len) |
3112 | return MHD_PARSE_COOKIE_OK; | 3114 | return MHD_PARSE_COOKIE_OK; |
@@ -3414,8 +3416,8 @@ call_connection_handler (struct MHD_Connection *connection) | |||
3414 | { | 3416 | { |
3415 | /* serious internal error, close connection */ | 3417 | /* serious internal error, close connection */ |
3416 | CONNECTION_CLOSE_ERROR (connection, | 3418 | CONNECTION_CLOSE_ERROR (connection, |
3417 | _ ( | 3419 | _ ("Application reported internal error, " \ |
3418 | "Application reported internal error, closing connection.")); | 3420 | "closing connection.")); |
3419 | return; | 3421 | return; |
3420 | } | 3422 | } |
3421 | } | 3423 | } |
@@ -3939,13 +3941,14 @@ parse_connection_headers (struct MHD_Connection *connection) | |||
3939 | } | 3941 | } |
3940 | 3942 | ||
3941 | connection->rq.remaining_upload_size = 0; | 3943 | connection->rq.remaining_upload_size = 0; |
3942 | if (MHD_NO != MHD_lookup_connection_value_n (connection, | 3944 | if (MHD_NO != |
3943 | MHD_HEADER_KIND, | 3945 | MHD_lookup_connection_value_n (connection, |
3944 | MHD_HTTP_HEADER_TRANSFER_ENCODING, | 3946 | MHD_HEADER_KIND, |
3945 | MHD_STATICSTR_LEN_ ( | 3947 | MHD_HTTP_HEADER_TRANSFER_ENCODING, |
3946 | MHD_HTTP_HEADER_TRANSFER_ENCODING), | 3948 | MHD_STATICSTR_LEN_ ( |
3947 | &enc, | 3949 | MHD_HTTP_HEADER_TRANSFER_ENCODING), |
3948 | NULL)) | 3950 | &enc, |
3951 | NULL)) | ||
3949 | { | 3952 | { |
3950 | connection->rq.remaining_upload_size = MHD_SIZE_UNKNOWN; | 3953 | connection->rq.remaining_upload_size = MHD_SIZE_UNKNOWN; |
3951 | if (MHD_str_equal_caseless_ (enc, | 3954 | if (MHD_str_equal_caseless_ (enc, |
@@ -3954,13 +3957,14 @@ parse_connection_headers (struct MHD_Connection *connection) | |||
3954 | } | 3957 | } |
3955 | else | 3958 | else |
3956 | { | 3959 | { |
3957 | if (MHD_NO != MHD_lookup_connection_value_n (connection, | 3960 | if (MHD_NO != |
3958 | MHD_HEADER_KIND, | 3961 | MHD_lookup_connection_value_n (connection, |
3959 | MHD_HTTP_HEADER_CONTENT_LENGTH, | 3962 | MHD_HEADER_KIND, |
3960 | MHD_STATICSTR_LEN_ ( | 3963 | MHD_HTTP_HEADER_CONTENT_LENGTH, |
3961 | MHD_HTTP_HEADER_CONTENT_LENGTH), | 3964 | MHD_STATICSTR_LEN_ ( |
3962 | &clen, | 3965 | MHD_HTTP_HEADER_CONTENT_LENGTH), |
3963 | &val_len)) | 3966 | &clen, |
3967 | &val_len)) | ||
3964 | { | 3968 | { |
3965 | size_t num_digits; | 3969 | size_t num_digits; |
3966 | 3970 | ||
@@ -4679,8 +4683,8 @@ cleanup_connection (struct MHD_Connection *connection) | |||
4679 | { | 4683 | { |
4680 | #ifdef HAVE_MESSAGES | 4684 | #ifdef HAVE_MESSAGES |
4681 | MHD_DLOG (daemon, | 4685 | MHD_DLOG (daemon, |
4682 | _ ( | 4686 | _ ("Failed to signal end of connection via inter-thread " \ |
4683 | "Failed to signal end of connection via inter-thread communication channel.\n")); | 4687 | "communication channel.\n")); |
4684 | #endif | 4688 | #endif |
4685 | } | 4689 | } |
4686 | } | 4690 | } |
@@ -5189,8 +5193,8 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
5189 | { | 5193 | { |
5190 | /* oops - close! */ | 5194 | /* oops - close! */ |
5191 | CONNECTION_CLOSE_ERROR (connection, | 5195 | CONNECTION_CLOSE_ERROR (connection, |
5192 | _ ( | 5196 | _ ("Closing connection (failed to create " \ |
5193 | "Closing connection (failed to create response footer).")); | 5197 | "response footer).")); |
5194 | continue; | 5198 | continue; |
5195 | } | 5199 | } |
5196 | mhd_assert (connection->write_buffer_send_offset < \ | 5200 | mhd_assert (connection->write_buffer_send_offset < \ |
diff --git a/src/microhttpd/connection_https.c b/src/microhttpd/connection_https.c index 0d691706..5421d5b2 100644 --- a/src/microhttpd/connection_https.c +++ b/src/microhttpd/connection_https.c | |||
@@ -111,9 +111,9 @@ recv_tls_adapter (struct MHD_Connection *connection, | |||
111 | #endif /* EPOLL_SUPPORT */ | 111 | #endif /* EPOLL_SUPPORT */ |
112 | 112 | ||
113 | /* Check whether TLS buffers still have some unread data. */ | 113 | /* Check whether TLS buffers still have some unread data. */ |
114 | connection->tls_read_ready = ( ((size_t) res == i) && | 114 | connection->tls_read_ready = |
115 | (0 != gnutls_record_check_pending ( | 115 | ( ((size_t) res == i) && |
116 | connection->tls_session)) ); | 116 | (0 != gnutls_record_check_pending (connection->tls_session)) ); |
117 | return res; | 117 | return res; |
118 | } | 118 | } |
119 | 119 | ||
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index b1cb5146..6f7bfb58 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -1337,8 +1337,8 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1337 | if (! urh->was_closed) | 1337 | if (! urh->was_closed) |
1338 | { | 1338 | { |
1339 | MHD_DLOG (daemon, | 1339 | MHD_DLOG (daemon, |
1340 | _ ( | 1340 | _ ("Initiated daemon shutdown while \"upgraded\" " \ |
1341 | "Initiated daemon shutdown while \"upgraded\" connection was not closed.\n")); | 1341 | "connection was not closed.\n")); |
1342 | } | 1342 | } |
1343 | #endif | 1343 | #endif |
1344 | urh->was_closed = true; | 1344 | urh->was_closed = true; |
@@ -1352,9 +1352,9 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1352 | { | 1352 | { |
1353 | #ifdef HAVE_MESSAGES | 1353 | #ifdef HAVE_MESSAGES |
1354 | MHD_DLOG (daemon, | 1354 | MHD_DLOG (daemon, |
1355 | _ ("Failed to forward to application " | 1355 | _ ("Failed to forward to application %" PRIu64 \ |
1356 | "%" PRIu64 \ | 1356 | " bytes of data received from remote side: " \ |
1357 | " bytes of data received from remote side: application shut down socket.\n"), | 1357 | "application shut down socket.\n"), |
1358 | (uint64_t) urh->in_buffer_used); | 1358 | (uint64_t) urh->in_buffer_used); |
1359 | #endif | 1359 | #endif |
1360 | 1360 | ||
@@ -1519,10 +1519,8 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1519 | * persistent / unrecoverable error. */ | 1519 | * persistent / unrecoverable error. */ |
1520 | #ifdef HAVE_MESSAGES | 1520 | #ifdef HAVE_MESSAGES |
1521 | MHD_DLOG (daemon, | 1521 | MHD_DLOG (daemon, |
1522 | _ ( | 1522 | _ ("Failed to forward to remote client %" PRIu64 \ |
1523 | "Failed to forward to remote client " | 1523 | " bytes of data received from application: %s\n"), |
1524 | "%" PRIu64 \ | ||
1525 | " bytes of data received from application: %s\n"), | ||
1526 | (uint64_t) urh->out_buffer_used, | 1524 | (uint64_t) urh->out_buffer_used, |
1527 | gnutls_strerror ((int) res)); | 1525 | gnutls_strerror ((int) res)); |
1528 | #endif | 1526 | #endif |
@@ -1589,10 +1587,8 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1589 | * persistent / unrecoverable error. */ | 1587 | * persistent / unrecoverable error. */ |
1590 | #ifdef HAVE_MESSAGES | 1588 | #ifdef HAVE_MESSAGES |
1591 | MHD_DLOG (daemon, | 1589 | MHD_DLOG (daemon, |
1592 | _ ( | 1590 | _ ("Failed to forward to application %" PRIu64 \ |
1593 | "Failed to forward to application " | 1591 | " bytes of data received from remote side: %s\n"), |
1594 | "%" PRIu64 \ | ||
1595 | " bytes of data received from remote side: %s\n"), | ||
1596 | (uint64_t) urh->in_buffer_used, | 1592 | (uint64_t) urh->in_buffer_used, |
1597 | MHD_socket_strerr_ (err)); | 1593 | MHD_socket_strerr_ (err)); |
1598 | #endif | 1594 | #endif |
@@ -1645,10 +1641,8 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1645 | #ifdef HAVE_MESSAGES | 1641 | #ifdef HAVE_MESSAGES |
1646 | if (0 < urh->out_buffer_used) | 1642 | if (0 < urh->out_buffer_used) |
1647 | MHD_DLOG (daemon, | 1643 | MHD_DLOG (daemon, |
1648 | _ ( | 1644 | _ ("Failed to forward to remote client %" PRIu64 \ |
1649 | "Failed to forward to remote client " | 1645 | " bytes of data received from application: daemon shut down.\n"), |
1650 | "%" PRIu64 \ | ||
1651 | " bytes of data received from application: daemon shut down.\n"), | ||
1652 | (uint64_t) urh->out_buffer_used); | 1646 | (uint64_t) urh->out_buffer_used); |
1653 | #endif | 1647 | #endif |
1654 | /* Discard any data unsent to remote. */ | 1648 | /* Discard any data unsent to remote. */ |
@@ -2254,8 +2248,8 @@ exit: | |||
2254 | { | 2248 | { |
2255 | #ifdef HAVE_MESSAGES | 2249 | #ifdef HAVE_MESSAGES |
2256 | MHD_DLOG (daemon, | 2250 | MHD_DLOG (daemon, |
2257 | _ ( | 2251 | _ ("Failed to signal thread termination via inter-thread " \ |
2258 | "Failed to signal thread termination via inter-thread communication channel.\n")); | 2252 | "communication channel.\n")); |
2259 | #endif | 2253 | #endif |
2260 | } | 2254 | } |
2261 | return (MHD_THRD_RTRN_TYPE_) 0; | 2255 | return (MHD_THRD_RTRN_TYPE_) 0; |
@@ -2361,8 +2355,8 @@ psk_gnutls_adapter (gnutls_session_t session, | |||
2361 | { | 2355 | { |
2362 | #ifdef HAVE_MESSAGES | 2356 | #ifdef HAVE_MESSAGES |
2363 | MHD_DLOG (daemon, | 2357 | MHD_DLOG (daemon, |
2364 | _ ( | 2358 | _ ("PSK authentication failed: gnutls_malloc failed to " \ |
2365 | "PSK authentication failed: gnutls_malloc failed to allocate memory.\n")); | 2359 | "allocate memory.\n")); |
2366 | #endif | 2360 | #endif |
2367 | free (app_psk); | 2361 | free (app_psk); |
2368 | return -1; | 2362 | return -1; |
@@ -2446,8 +2440,8 @@ new_connection_prepare_ (struct MHD_Daemon *daemon, | |||
2446 | /* above connection limit - reject */ | 2440 | /* above connection limit - reject */ |
2447 | #ifdef HAVE_MESSAGES | 2441 | #ifdef HAVE_MESSAGES |
2448 | MHD_DLOG (daemon, | 2442 | MHD_DLOG (daemon, |
2449 | _ ( | 2443 | _ ("Server reached connection limit. " \ |
2450 | "Server reached connection limit. Closing inbound connection.\n")); | 2444 | "Closing inbound connection.\n")); |
2451 | #endif | 2445 | #endif |
2452 | MHD_socket_close_chk_ (client_socket); | 2446 | MHD_socket_close_chk_ (client_socket); |
2453 | #if defined(ENFILE) && (ENFILE + 0 != 0) | 2447 | #if defined(ENFILE) && (ENFILE + 0 != 0) |
@@ -2640,8 +2634,8 @@ new_connection_prepare_ (struct MHD_Daemon *daemon, | |||
2640 | default: | 2634 | default: |
2641 | #ifdef HAVE_MESSAGES | 2635 | #ifdef HAVE_MESSAGES |
2642 | MHD_DLOG (daemon, | 2636 | MHD_DLOG (daemon, |
2643 | _ ( | 2637 | _ ("Failed to setup TLS credentials: " \ |
2644 | "Failed to setup TLS credentials: unknown credential type %d.\n"), | 2638 | "unknown credential type %d.\n"), |
2645 | daemon->cred_type); | 2639 | daemon->cred_type); |
2646 | #endif | 2640 | #endif |
2647 | gnutls_deinit (connection->tls_session); | 2641 | gnutls_deinit (connection->tls_session); |
@@ -3212,15 +3206,15 @@ MHD_suspend_connection (struct MHD_Connection *connection) | |||
3212 | #endif /* MHD_USE_THREADS */ | 3206 | #endif /* MHD_USE_THREADS */ |
3213 | 3207 | ||
3214 | if (0 == (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) | 3208 | if (0 == (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) |
3215 | MHD_PANIC (_ ( | 3209 | MHD_PANIC (_ ("Cannot suspend connections without " \ |
3216 | "Cannot suspend connections without enabling MHD_ALLOW_SUSPEND_RESUME!\n")); | 3210 | "enabling MHD_ALLOW_SUSPEND_RESUME!\n")); |
3217 | #ifdef UPGRADE_SUPPORT | 3211 | #ifdef UPGRADE_SUPPORT |
3218 | if (NULL != connection->urh) | 3212 | if (NULL != connection->urh) |
3219 | { | 3213 | { |
3220 | #ifdef HAVE_MESSAGES | 3214 | #ifdef HAVE_MESSAGES |
3221 | MHD_DLOG (daemon, | 3215 | MHD_DLOG (daemon, |
3222 | _ ( | 3216 | _ ("Error: connection scheduled for \"upgrade\" cannot " \ |
3223 | "Error: connection scheduled for \"upgrade\" cannot be suspended.\n")); | 3217 | "be suspended.\n")); |
3224 | #endif /* HAVE_MESSAGES */ | 3218 | #endif /* HAVE_MESSAGES */ |
3225 | return; | 3219 | return; |
3226 | } | 3220 | } |
@@ -3252,8 +3246,8 @@ MHD_resume_connection (struct MHD_Connection *connection) | |||
3252 | #endif /* MHD_USE_THREADS */ | 3246 | #endif /* MHD_USE_THREADS */ |
3253 | 3247 | ||
3254 | if (0 == (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) | 3248 | if (0 == (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) |
3255 | MHD_PANIC (_ ( | 3249 | MHD_PANIC (_ ("Cannot resume connections without enabling " \ |
3256 | "Cannot resume connections without enabling MHD_ALLOW_SUSPEND_RESUME!\n")); | 3250 | "MHD_ALLOW_SUSPEND_RESUME!\n")); |
3257 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 3251 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
3258 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); | 3252 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); |
3259 | #endif | 3253 | #endif |
@@ -3267,8 +3261,8 @@ MHD_resume_connection (struct MHD_Connection *connection) | |||
3267 | { | 3261 | { |
3268 | #ifdef HAVE_MESSAGES | 3262 | #ifdef HAVE_MESSAGES |
3269 | MHD_DLOG (daemon, | 3263 | MHD_DLOG (daemon, |
3270 | _ ( | 3264 | _ ("Failed to signal resume via inter-thread " \ |
3271 | "Failed to signal resume via inter-thread communication channel.\n")); | 3265 | "communication channel.\n")); |
3272 | #endif | 3266 | #endif |
3273 | } | 3267 | } |
3274 | } | 3268 | } |
@@ -3445,8 +3439,8 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
3445 | { | 3439 | { |
3446 | #ifdef HAVE_MESSAGES | 3440 | #ifdef HAVE_MESSAGES |
3447 | MHD_DLOG (daemon, | 3441 | MHD_DLOG (daemon, |
3448 | _ ( | 3442 | _ ("Failed to signal resume of connection via " \ |
3449 | "Failed to signal resume of connection via inter-thread communication channel.\n")); | 3443 | "inter-thread communication channel.\n")); |
3450 | #endif | 3444 | #endif |
3451 | } | 3445 | } |
3452 | } | 3446 | } |
@@ -3559,8 +3553,7 @@ MHD_add_connection (struct MHD_Daemon *daemon, | |||
3559 | { | 3553 | { |
3560 | #ifdef HAVE_MESSAGES | 3554 | #ifdef HAVE_MESSAGES |
3561 | MHD_DLOG (daemon, | 3555 | MHD_DLOG (daemon, |
3562 | _ ( | 3556 | _ ("Failed to suppress SIGPIPE on new client socket: %s\n"), |
3563 | "Failed to suppress SIGPIPE on new client socket: %s\n"), | ||
3564 | MHD_socket_last_strerr_ ()); | 3557 | MHD_socket_last_strerr_ ()); |
3565 | #else /* ! HAVE_MESSAGES */ | 3558 | #else /* ! HAVE_MESSAGES */ |
3566 | (void) 0; /* Mute compiler warning */ | 3559 | (void) 0; /* Mute compiler warning */ |
@@ -3911,8 +3904,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
3911 | EPOLL_CTL_DEL, | 3904 | EPOLL_CTL_DEL, |
3912 | pos->socket_fd, | 3905 | pos->socket_fd, |
3913 | NULL)) | 3906 | NULL)) |
3914 | MHD_PANIC (_ ( | 3907 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
3915 | "Failed to remove FD from epoll set.\n")); | ||
3916 | pos->epoll_state &= | 3908 | pos->epoll_state &= |
3917 | ~((enum MHD_EpollState) | 3909 | ~((enum MHD_EpollState) |
3918 | MHD_EPOLL_STATE_IN_EPOLL_SET); | 3910 | MHD_EPOLL_STATE_IN_EPOLL_SET); |
@@ -5794,8 +5786,8 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
5794 | { | 5786 | { |
5795 | #ifdef HAVE_MESSAGES | 5787 | #ifdef HAVE_MESSAGES |
5796 | MHD_DLOG (daemon, | 5788 | MHD_DLOG (daemon, |
5797 | _ ( | 5789 | _ ("Using MHD_quiesce_daemon in this mode " \ |
5798 | "Using MHD_quiesce_daemon in this mode requires MHD_USE_ITC.\n")); | 5790 | "requires MHD_USE_ITC.\n")); |
5799 | #endif | 5791 | #endif |
5800 | return MHD_INVALID_SOCKET; | 5792 | return MHD_INVALID_SOCKET; |
5801 | } | 5793 | } |
@@ -5822,8 +5814,8 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
5822 | if (MHD_ITC_IS_VALID_ (daemon->worker_pool[i].itc)) | 5814 | if (MHD_ITC_IS_VALID_ (daemon->worker_pool[i].itc)) |
5823 | { | 5815 | { |
5824 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, "q")) | 5816 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, "q")) |
5825 | MHD_PANIC (_ ( | 5817 | MHD_PANIC (_ ("Failed to signal quiesce via inter-thread " \ |
5826 | "Failed to signal quiesce via inter-thread communication channel.\n")); | 5818 | "communication channel.\n")); |
5827 | } | 5819 | } |
5828 | } | 5820 | } |
5829 | #endif | 5821 | #endif |
@@ -5845,8 +5837,8 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
5845 | #endif | 5837 | #endif |
5846 | if ( (MHD_ITC_IS_VALID_ (daemon->itc)) && | 5838 | if ( (MHD_ITC_IS_VALID_ (daemon->itc)) && |
5847 | (! MHD_itc_activate_ (daemon->itc, "q")) ) | 5839 | (! MHD_itc_activate_ (daemon->itc, "q")) ) |
5848 | MHD_PANIC (_ ( | 5840 | MHD_PANIC (_ ("failed to signal quiesce via inter-thread " \ |
5849 | "failed to signal quiesce via inter-thread communication channel.\n")); | 5841 | "communication channel.\n")); |
5850 | return ret; | 5842 | return ret; |
5851 | } | 5843 | } |
5852 | 5844 | ||
@@ -6007,18 +5999,16 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6007 | { | 5999 | { |
6008 | #ifdef HAVE_MESSAGES | 6000 | #ifdef HAVE_MESSAGES |
6009 | MHD_DLOG (daemon, | 6001 | MHD_DLOG (daemon, |
6010 | _ ( | 6002 | _ ("Warning: Zero size, specified for thread pool size," \ |
6011 | "Warning: Zero size, specified for thread pool size, is ignored. " | 6003 | " is ignored. Thread pool is not used.\n")); |
6012 | "Thread pool is not used.\n")); | ||
6013 | #endif | 6004 | #endif |
6014 | } | 6005 | } |
6015 | else if (1 == daemon->worker_pool_size) | 6006 | else if (1 == daemon->worker_pool_size) |
6016 | { | 6007 | { |
6017 | #ifdef HAVE_MESSAGES | 6008 | #ifdef HAVE_MESSAGES |
6018 | MHD_DLOG (daemon, | 6009 | MHD_DLOG (daemon, |
6019 | _ ( | 6010 | _ ("Warning: \"1\", specified for thread pool size, " \ |
6020 | "Warning: \"1\", specified for thread pool size, is ignored. " | 6011 | "is ignored. Thread pool is not used.\n")); |
6021 | "Thread pool is not used.\n")); | ||
6022 | #endif | 6012 | #endif |
6023 | daemon->worker_pool_size = 0; | 6013 | daemon->worker_pool_size = 0; |
6024 | } | 6014 | } |
@@ -6069,8 +6059,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6069 | #ifdef HAVE_MESSAGES | 6059 | #ifdef HAVE_MESSAGES |
6070 | else | 6060 | else |
6071 | MHD_DLOG (daemon, | 6061 | MHD_DLOG (daemon, |
6072 | _ ( | 6062 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6073 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6063 | "MHD_USE_TLS not set.\n"), |
6074 | opt); | 6064 | opt); |
6075 | #endif | 6065 | #endif |
6076 | break; | 6066 | break; |
@@ -6082,8 +6072,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6082 | #ifdef HAVE_MESSAGES | 6072 | #ifdef HAVE_MESSAGES |
6083 | else | 6073 | else |
6084 | MHD_DLOG (daemon, | 6074 | MHD_DLOG (daemon, |
6085 | _ ( | 6075 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6086 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6076 | "MHD_USE_TLS not set.\n"), |
6087 | opt); | 6077 | opt); |
6088 | #endif | 6078 | #endif |
6089 | break; | 6079 | break; |
@@ -6095,8 +6085,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6095 | #ifdef HAVE_MESSAGES | 6085 | #ifdef HAVE_MESSAGES |
6096 | else | 6086 | else |
6097 | MHD_DLOG (daemon, | 6087 | MHD_DLOG (daemon, |
6098 | _ ( | 6088 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6099 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6089 | "MHD_USE_TLS not set.\n"), |
6100 | opt); | 6090 | opt); |
6101 | #endif | 6091 | #endif |
6102 | break; | 6092 | break; |
@@ -6108,8 +6098,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6108 | #ifdef HAVE_MESSAGES | 6098 | #ifdef HAVE_MESSAGES |
6109 | else | 6099 | else |
6110 | MHD_DLOG (daemon, | 6100 | MHD_DLOG (daemon, |
6111 | _ ( | 6101 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6112 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6102 | "MHD_USE_TLS not set.\n"), |
6113 | opt); | 6103 | opt); |
6114 | #endif | 6104 | #endif |
6115 | break; | 6105 | break; |
@@ -6160,8 +6150,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6160 | #ifdef HAVE_MESSAGES | 6150 | #ifdef HAVE_MESSAGES |
6161 | else | 6151 | else |
6162 | MHD_DLOG (daemon, | 6152 | MHD_DLOG (daemon, |
6163 | _ ( | 6153 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6164 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6154 | "MHD_USE_TLS not set.\n"), |
6165 | opt); | 6155 | opt); |
6166 | #endif | 6156 | #endif |
6167 | break; | 6157 | break; |
@@ -6190,8 +6180,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6190 | #ifdef HAVE_MESSAGES | 6180 | #ifdef HAVE_MESSAGES |
6191 | else | 6181 | else |
6192 | MHD_DLOG (daemon, | 6182 | MHD_DLOG (daemon, |
6193 | _ ( | 6183 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6194 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6184 | "MHD_USE_TLS not set.\n"), |
6195 | opt); | 6185 | opt); |
6196 | #endif | 6186 | #endif |
6197 | break; | 6187 | break; |
@@ -6199,8 +6189,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6199 | #if GNUTLS_VERSION_MAJOR < 3 | 6189 | #if GNUTLS_VERSION_MAJOR < 3 |
6200 | #ifdef HAVE_MESSAGES | 6190 | #ifdef HAVE_MESSAGES |
6201 | MHD_DLOG (daemon, | 6191 | MHD_DLOG (daemon, |
6202 | _ ( | 6192 | _ ("MHD_OPTION_HTTPS_CERT_CALLBACK requires building " \ |
6203 | "MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0.\n")); | 6193 | "MHD with GnuTLS >= 3.0.\n")); |
6204 | #endif | 6194 | #endif |
6205 | return MHD_NO; | 6195 | return MHD_NO; |
6206 | #else | 6196 | #else |
@@ -6211,8 +6201,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6211 | #ifdef HAVE_MESSAGES | 6201 | #ifdef HAVE_MESSAGES |
6212 | else | 6202 | else |
6213 | MHD_DLOG (daemon, | 6203 | MHD_DLOG (daemon, |
6214 | _ ( | 6204 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6215 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6205 | "MHD_USE_TLS not set.\n"), |
6216 | opt); | 6206 | opt); |
6217 | #endif /* HAVE_MESSAGES */ | 6207 | #endif /* HAVE_MESSAGES */ |
6218 | break; | 6208 | break; |
@@ -6221,8 +6211,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6221 | #if GNUTLS_VERSION_NUMBER < 0x030603 | 6211 | #if GNUTLS_VERSION_NUMBER < 0x030603 |
6222 | #ifdef HAVE_MESSAGES | 6212 | #ifdef HAVE_MESSAGES |
6223 | MHD_DLOG (daemon, | 6213 | MHD_DLOG (daemon, |
6224 | _ ( | 6214 | _ ("MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building " \ |
6225 | "MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3.\n")); | 6215 | "MHD with GnuTLS >= 3.6.3.\n")); |
6226 | #endif | 6216 | #endif |
6227 | return MHD_NO; | 6217 | return MHD_NO; |
6228 | #else | 6218 | #else |
@@ -6233,8 +6223,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6233 | #ifdef HAVE_MESSAGES | 6223 | #ifdef HAVE_MESSAGES |
6234 | else | 6224 | else |
6235 | MHD_DLOG (daemon, | 6225 | MHD_DLOG (daemon, |
6236 | _ ( | 6226 | _ ("MHD HTTPS option %d passed to MHD but " \ |
6237 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), | 6227 | "MHD_USE_TLS not set.\n"), |
6238 | opt); | 6228 | opt); |
6239 | #endif /* HAVE_MESSAGES */ | 6229 | #endif /* HAVE_MESSAGES */ |
6240 | break; | 6230 | break; |
@@ -6491,8 +6481,8 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6491 | break; | 6481 | break; |
6492 | #else | 6482 | #else |
6493 | MHD_DLOG (daemon, | 6483 | MHD_DLOG (daemon, |
6494 | _ ( | 6484 | _ ("MHD HTTPS option %d passed to MHD compiled " \ |
6495 | "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3.\n"), | 6485 | "without GNUtls >= 3.\n"), |
6496 | opt); | 6486 | opt); |
6497 | return MHD_NO; | 6487 | return MHD_NO; |
6498 | #endif | 6488 | #endif |
@@ -6875,10 +6865,11 @@ MHD_start_daemon_va (unsigned int flags, | |||
6875 | (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) ) | 6865 | (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) ) |
6876 | { | 6866 | { |
6877 | MHD_DLOG (daemon, | 6867 | MHD_DLOG (daemon, |
6878 | _ ( | 6868 | _ ("Warning: MHD_USE_THREAD_PER_CONNECTION must be used " \ |
6879 | "Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with " | 6869 | "only with MHD_USE_INTERNAL_POLLING_THREAD. " \ |
6880 | "MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD " | 6870 | "Flag MHD_USE_INTERNAL_POLLING_THREAD was added. " \ |
6881 | "was added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.\n")); | 6871 | "Consider setting MHD_USE_INTERNAL_POLLING_THREAD " \ |
6872 | "explicitly.\n")); | ||
6882 | } | 6873 | } |
6883 | #endif | 6874 | #endif |
6884 | 6875 | ||
@@ -6919,8 +6910,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
6919 | { | 6910 | { |
6920 | #ifdef HAVE_MESSAGES | 6911 | #ifdef HAVE_MESSAGES |
6921 | MHD_DLOG (daemon, | 6912 | MHD_DLOG (daemon, |
6922 | _ ( | 6913 | _ ("file descriptor for inter-thread communication " \ |
6923 | "file descriptor for inter-thread communication channel exceeds maximum value.\n")); | 6914 | "channel exceeds maximum value.\n")); |
6924 | #endif | 6915 | #endif |
6925 | MHD_itc_destroy_chk_ (daemon->itc); | 6916 | MHD_itc_destroy_chk_ (daemon->itc); |
6926 | #ifdef HTTPS_SUPPORT | 6917 | #ifdef HTTPS_SUPPORT |
@@ -7013,8 +7004,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7013 | { | 7004 | { |
7014 | #ifdef HAVE_MESSAGES | 7005 | #ifdef HAVE_MESSAGES |
7015 | MHD_DLOG (daemon, | 7006 | MHD_DLOG (daemon, |
7016 | _ ( | 7007 | _ ("MHD thread polling only works with " \ |
7017 | "MHD thread polling only works with MHD_USE_INTERNAL_POLLING_THREAD.\n")); | 7008 | "MHD_USE_INTERNAL_POLLING_THREAD.\n")); |
7018 | #endif | 7009 | #endif |
7019 | goto free_and_fail; | 7010 | goto free_and_fail; |
7020 | } | 7011 | } |
@@ -7111,8 +7102,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7111 | on this platform we cannot; fail hard */ | 7102 | on this platform we cannot; fail hard */ |
7112 | #ifdef HAVE_MESSAGES | 7103 | #ifdef HAVE_MESSAGES |
7113 | MHD_DLOG (daemon, | 7104 | MHD_DLOG (daemon, |
7114 | _ ( | 7105 | _ ("Cannot allow listening address reuse: " \ |
7115 | "Cannot allow listening address reuse: SO_REUSEPORT not defined.\n")); | 7106 | "SO_REUSEPORT not defined.\n")); |
7116 | #endif | 7107 | #endif |
7117 | goto free_and_fail; | 7108 | goto free_and_fail; |
7118 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ | 7109 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ |
@@ -7147,8 +7138,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7147 | #elif defined(MHD_WINSOCK_SOCKETS) /* SO_EXCLUSIVEADDRUSE not defined on W32? */ | 7138 | #elif defined(MHD_WINSOCK_SOCKETS) /* SO_EXCLUSIVEADDRUSE not defined on W32? */ |
7148 | #ifdef HAVE_MESSAGES | 7139 | #ifdef HAVE_MESSAGES |
7149 | MHD_DLOG (daemon, | 7140 | MHD_DLOG (daemon, |
7150 | _ ( | 7141 | _ ("Cannot disallow listening address reuse: " \ |
7151 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined.\n")); | 7142 | "SO_EXCLUSIVEADDRUSE not defined.\n")); |
7152 | #endif | 7143 | #endif |
7153 | goto free_and_fail; | 7144 | goto free_and_fail; |
7154 | #endif /* MHD_WINSOCK_SOCKETS */ | 7145 | #endif /* MHD_WINSOCK_SOCKETS */ |
@@ -7299,8 +7290,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7299 | /* should be impossible with `struct sockaddr_storage` */ | 7290 | /* should be impossible with `struct sockaddr_storage` */ |
7300 | #ifdef HAVE_MESSAGES | 7291 | #ifdef HAVE_MESSAGES |
7301 | MHD_DLOG (daemon, | 7292 | MHD_DLOG (daemon, |
7302 | _ ( | 7293 | _ ("Failed to get listen port number " \ |
7303 | "Failed to get listen port number (`struct sockaddr_storage` too small!?).\n")); | 7294 | "(`struct sockaddr_storage` too small!?).\n")); |
7304 | #endif /* HAVE_MESSAGES */ | 7295 | #endif /* HAVE_MESSAGES */ |
7305 | } | 7296 | } |
7306 | #ifndef __linux__ | 7297 | #ifndef __linux__ |
@@ -7404,8 +7395,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7404 | { | 7395 | { |
7405 | #ifdef HAVE_MESSAGES | 7396 | #ifdef HAVE_MESSAGES |
7406 | MHD_DLOG (daemon, | 7397 | MHD_DLOG (daemon, |
7407 | _ ( | 7398 | _ ("Combining MHD_USE_THREAD_PER_CONNECTION and " \ |
7408 | "Combining MHD_USE_THREAD_PER_CONNECTION and MHD_USE_EPOLL is not supported.\n")); | 7399 | "MHD_USE_EPOLL is not supported.\n")); |
7409 | #endif | 7400 | #endif |
7410 | goto free_and_fail; | 7401 | goto free_and_fail; |
7411 | } | 7402 | } |
@@ -7569,8 +7560,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7569 | { | 7560 | { |
7570 | #ifdef HAVE_MESSAGES | 7561 | #ifdef HAVE_MESSAGES |
7571 | MHD_DLOG (daemon, | 7562 | MHD_DLOG (daemon, |
7572 | _ ( | 7563 | _ ("Failed to create worker inter-thread " \ |
7573 | "Failed to create worker inter-thread communication channel: %s\n"), | 7564 | "communication channel: %s\n"), |
7574 | MHD_itc_last_strerror_ () ); | 7565 | MHD_itc_last_strerror_ () ); |
7575 | #endif | 7566 | #endif |
7576 | MHD_mutex_destroy_chk_ (&d->new_connections_mutex); | 7567 | MHD_mutex_destroy_chk_ (&d->new_connections_mutex); |
@@ -7583,8 +7574,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
7583 | { | 7574 | { |
7584 | #ifdef HAVE_MESSAGES | 7575 | #ifdef HAVE_MESSAGES |
7585 | MHD_DLOG (daemon, | 7576 | MHD_DLOG (daemon, |
7586 | _ ( | 7577 | _ ("File descriptor for worker inter-thread " \ |
7587 | "File descriptor for worker inter-thread communication channel exceeds maximum value.\n")); | 7578 | "communication channel exceeds maximum value.\n")); |
7588 | #endif | 7579 | #endif |
7589 | MHD_itc_destroy_chk_ (d->itc); | 7580 | MHD_itc_destroy_chk_ (d->itc); |
7590 | MHD_mutex_destroy_chk_ (&d->new_connections_mutex); | 7581 | MHD_mutex_destroy_chk_ (&d->new_connections_mutex); |
@@ -7855,8 +7846,8 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
7855 | while (NULL != susp) | 7846 | while (NULL != susp) |
7856 | { | 7847 | { |
7857 | if (NULL == susp->urh) /* "Upgraded" connection? */ | 7848 | if (NULL == susp->urh) /* "Upgraded" connection? */ |
7858 | MHD_PANIC (_ ( | 7849 | MHD_PANIC (_ ("MHD_stop_daemon() called while we have " \ |
7859 | "MHD_stop_daemon() called while we have suspended connections.\n")); | 7850 | "suspended connections.\n")); |
7860 | #ifdef HTTPS_SUPPORT | 7851 | #ifdef HTTPS_SUPPORT |
7861 | else if (used_tls && | 7852 | else if (used_tls && |
7862 | used_thr_p_c && | 7853 | used_thr_p_c && |
@@ -7869,8 +7860,8 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
7869 | #ifdef HAVE_MESSAGES | 7860 | #ifdef HAVE_MESSAGES |
7870 | if (! susp->urh->was_closed) | 7861 | if (! susp->urh->was_closed) |
7871 | MHD_DLOG (daemon, | 7862 | MHD_DLOG (daemon, |
7872 | _ ( | 7863 | _ ("Initiated daemon shutdown while \"upgraded\" " \ |
7873 | "Initiated daemon shutdown while \"upgraded\" connection was not closed.\n")); | 7864 | "connection was not closed.\n")); |
7874 | #endif | 7865 | #endif |
7875 | susp->urh->was_closed = true; | 7866 | susp->urh->was_closed = true; |
7876 | /* If thread-per-connection is used, connection's thread | 7867 | /* If thread-per-connection is used, connection's thread |
@@ -7888,8 +7879,8 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
7888 | else /* This 'else' is combined with next 'if' */ | 7879 | else /* This 'else' is combined with next 'if' */ |
7889 | #endif /* UPGRADE_SUPPORT */ | 7880 | #endif /* UPGRADE_SUPPORT */ |
7890 | if (NULL != daemon->suspended_connections_head) | 7881 | if (NULL != daemon->suspended_connections_head) |
7891 | MHD_PANIC (_ ( | 7882 | MHD_PANIC (_ ("MHD_stop_daemon() called while we have " \ |
7892 | "MHD_stop_daemon() called while we have suspended connections.\n")); | 7883 | "suspended connections.\n")); |
7893 | #if defined(UPGRADE_SUPPORT) && defined(HTTPS_SUPPORT) | 7884 | #if defined(UPGRADE_SUPPORT) && defined(HTTPS_SUPPORT) |
7894 | #ifdef MHD_USE_THREADS | 7885 | #ifdef MHD_USE_THREADS |
7895 | if (upg_allowed && used_tls && used_thr_p_c) | 7886 | if (upg_allowed && used_tls && used_thr_p_c) |
@@ -7927,8 +7918,8 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
7927 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 7918 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
7928 | (MHD_ITC_IS_VALID_ (daemon->itc)) && | 7919 | (MHD_ITC_IS_VALID_ (daemon->itc)) && |
7929 | (! MHD_itc_activate_ (daemon->itc, "e")) ) | 7920 | (! MHD_itc_activate_ (daemon->itc, "e")) ) |
7930 | MHD_PANIC (_ ( | 7921 | MHD_PANIC (_ ("Failed to signal shutdown via inter-thread " \ |
7931 | "Failed to signal shutdown via inter-thread communication channel.\n")); | 7922 | "communication channel.\n")); |
7932 | #endif | 7923 | #endif |
7933 | } | 7924 | } |
7934 | 7925 | ||
@@ -8025,8 +8016,8 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
8025 | { | 8016 | { |
8026 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, | 8017 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, |
8027 | "e")) | 8018 | "e")) |
8028 | MHD_PANIC (_ ( | 8019 | MHD_PANIC (_ ("Failed to signal shutdown via inter-thread " \ |
8029 | "Failed to signal shutdown via inter-thread communication channel.\n")); | 8020 | "communication channel.\n")); |
8030 | } | 8021 | } |
8031 | else | 8022 | else |
8032 | mhd_assert (MHD_INVALID_SOCKET != fd); | 8023 | mhd_assert (MHD_INVALID_SOCKET != fd); |
@@ -8063,8 +8054,8 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
8063 | { | 8054 | { |
8064 | if (! MHD_itc_activate_ (daemon->itc, | 8055 | if (! MHD_itc_activate_ (daemon->itc, |
8065 | "e")) | 8056 | "e")) |
8066 | MHD_PANIC (_ ( | 8057 | MHD_PANIC (_ ("Failed to signal shutdown via inter-thread " \ |
8067 | "Failed to signal shutdown via inter-thread communication channel.\n")); | 8058 | "communication channel.\n")); |
8068 | } | 8059 | } |
8069 | else | 8060 | else |
8070 | { | 8061 | { |
@@ -8573,8 +8564,8 @@ MHD_init (void) | |||
8573 | gcry_check_version (NULL); | 8564 | gcry_check_version (NULL); |
8574 | #else | 8565 | #else |
8575 | if (NULL == gcry_check_version ("1.6.0")) | 8566 | if (NULL == gcry_check_version ("1.6.0")) |
8576 | MHD_PANIC (_ ( | 8567 | MHD_PANIC (_ ("libgcrypt is too old. MHD was compiled for " \ |
8577 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n")); | 8568 | "libgcrypt 1.6.0 or newer.\n")); |
8578 | #endif | 8569 | #endif |
8579 | #endif /* MHD_HTTPS_REQUIRE_GCRYPT */ | 8570 | #endif /* MHD_HTTPS_REQUIRE_GCRYPT */ |
8580 | gnutls_global_init (); | 8571 | gnutls_global_init (); |
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c index a9738906..99074215 100644 --- a/src/microhttpd/postprocessor.c +++ b/src/microhttpd/postprocessor.c | |||
@@ -54,13 +54,14 @@ MHD_create_post_processor (struct MHD_Connection *connection, | |||
54 | (NULL == iter)) | 54 | (NULL == iter)) |
55 | MHD_PANIC (_ ("libmicrohttpd API violation.\n")); | 55 | MHD_PANIC (_ ("libmicrohttpd API violation.\n")); |
56 | encoding = NULL; | 56 | encoding = NULL; |
57 | if (MHD_NO == MHD_lookup_connection_value_n (connection, | 57 | if (MHD_NO == |
58 | MHD_HEADER_KIND, | 58 | MHD_lookup_connection_value_n (connection, |
59 | MHD_HTTP_HEADER_CONTENT_TYPE, | 59 | MHD_HEADER_KIND, |
60 | MHD_STATICSTR_LEN_ ( | 60 | MHD_HTTP_HEADER_CONTENT_TYPE, |
61 | MHD_HTTP_HEADER_CONTENT_TYPE), | 61 | MHD_STATICSTR_LEN_ ( |
62 | &encoding, | 62 | MHD_HTTP_HEADER_CONTENT_TYPE), |
63 | NULL)) | 63 | &encoding, |
64 | NULL)) | ||
64 | return NULL; | 65 | return NULL; |
65 | mhd_assert (NULL != encoding); | 66 | mhd_assert (NULL != encoding); |
66 | boundary = NULL; | 67 | boundary = NULL; |
diff --git a/src/microhttpd/test_client_put_stop.c b/src/microhttpd/test_client_put_stop.c index c26ff78a..03a9e87c 100644 --- a/src/microhttpd/test_client_put_stop.c +++ b/src/microhttpd/test_client_put_stop.c | |||
@@ -623,8 +623,8 @@ _MHD_dumbClient_create (uint16_t port, const char *method, const char *url, | |||
623 | int prn_size; | 623 | int prn_size; |
624 | memcpy (send_buf + clnt->req_size, MHD_HTTP_HEADER_CONTENT_LENGTH ": ", | 624 | memcpy (send_buf + clnt->req_size, MHD_HTTP_HEADER_CONTENT_LENGTH ": ", |
625 | MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_LENGTH ": ")); | 625 | MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_LENGTH ": ")); |
626 | clnt->req_size += MHD_STATICSTR_LEN_ ( | 626 | clnt->req_size += |
627 | MHD_HTTP_HEADER_CONTENT_LENGTH ": "); | 627 | MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_LENGTH ": "); |
628 | prn_size = snprintf (send_buf + clnt->req_size, | 628 | prn_size = snprintf (send_buf + clnt->req_size, |
629 | (buf_alloc_size - clnt->req_size), | 629 | (buf_alloc_size - clnt->req_size), |
630 | "%u", (unsigned int) req_body_size); | 630 | "%u", (unsigned int) req_body_size); |
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c index ac1e704c..f7a88f11 100644 --- a/src/microhttpd/test_postprocessor.c +++ b/src/microhttpd/test_postprocessor.c | |||
@@ -394,8 +394,9 @@ test_multipart_garbage (void) | |||
394 | header.value = | 394 | header.value = |
395 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; | 395 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"; |
396 | header.header_size = MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_TYPE); | 396 | header.header_size = MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_TYPE); |
397 | header.value_size = MHD_STATICSTR_LEN_ ( | 397 | header.value_size = |
398 | MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ", boundary=AaB03x"); | 398 | MHD_STATICSTR_LEN_ (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA \ |
399 | ", boundary=AaB03x"); | ||
399 | header.kind = MHD_HEADER_KIND; | 400 | header.kind = MHD_HEADER_KIND; |
400 | pp = MHD_create_post_processor (&connection, | 401 | pp = MHD_create_post_processor (&connection, |
401 | 1024, &value_checker, &want_off); | 402 | 1024, &value_checker, &want_off); |
diff --git a/src/microhttpd/test_set_panic.c b/src/microhttpd/test_set_panic.c index a2d889c1..ac803a26 100644 --- a/src/microhttpd/test_set_panic.c +++ b/src/microhttpd/test_set_panic.c | |||
@@ -530,8 +530,8 @@ _MHD_dumbClient_create (uint16_t port, const char *method, const char *url, | |||
530 | memcpy (send_buf + clnt->req_size, | 530 | memcpy (send_buf + clnt->req_size, |
531 | MHD_HTTP_HEADER_CONTENT_LENGTH ": ", | 531 | MHD_HTTP_HEADER_CONTENT_LENGTH ": ", |
532 | MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_LENGTH ": ")); | 532 | MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_LENGTH ": ")); |
533 | clnt->req_size += MHD_STATICSTR_LEN_ ( | 533 | clnt->req_size += |
534 | MHD_HTTP_HEADER_CONTENT_LENGTH ": "); | 534 | MHD_STATICSTR_LEN_ (MHD_HTTP_HEADER_CONTENT_LENGTH ": "); |
535 | prn_size = snprintf (send_buf + clnt->req_size, | 535 | prn_size = snprintf (send_buf + clnt->req_size, |
536 | (buf_alloc_size - clnt->req_size), | 536 | (buf_alloc_size - clnt->req_size), |
537 | "%u", (unsigned int) req_body_size); | 537 | "%u", (unsigned int) req_body_size); |
diff --git a/src/microhttpd/test_sha1.c b/src/microhttpd/test_sha1.c index 4426a3c7..c90f8918 100644 --- a/src/microhttpd/test_sha1.c +++ b/src/microhttpd/test_sha1.c | |||
@@ -249,9 +249,9 @@ check_result (const char *test_name, | |||
249 | { | 249 | { |
250 | char calc_str[SHA1_DIGEST_STRING_SIZE]; | 250 | char calc_str[SHA1_DIGEST_STRING_SIZE]; |
251 | bin2hex (calculated, SHA1_DIGEST_SIZE, calc_str); | 251 | bin2hex (calculated, SHA1_DIGEST_SIZE, calc_str); |
252 | printf ( | 252 | printf ("PASSED: %s check %u: calculated digest %s matches " \ |
253 | "PASSED: %s check %u: calculated digest %s matches expected digest.\n", | 253 | "expected digest.\n", |
254 | test_name, check_num, calc_str); | 254 | test_name, check_num, calc_str); |
255 | fflush (stdout); | 255 | fflush (stdout); |
256 | } | 256 | } |
257 | return failed ? 1 : 0; | 257 | return failed ? 1 : 0; |
@@ -275,7 +275,7 @@ test1_str (void) | |||
275 | uint8_t digest[SHA1_DIGEST_SIZE]; | 275 | uint8_t digest[SHA1_DIGEST_SIZE]; |
276 | 276 | ||
277 | MHD_SHA1_init (&ctx); | 277 | MHD_SHA1_init (&ctx); |
278 | MHD_SHA1_update (&ctx, (const uint8_t*) data_units1[i].str_l.str, | 278 | MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str, |
279 | data_units1[i].str_l.len); | 279 | data_units1[i].str_l.len); |
280 | MHD_SHA1_finish (&ctx, digest); | 280 | MHD_SHA1_finish (&ctx, digest); |
281 | num_failed += check_result (__FUNCTION__, i, digest, | 281 | num_failed += check_result (__FUNCTION__, i, digest, |
@@ -321,8 +321,8 @@ test2_str (void) | |||
321 | size_t part_s = data_units1[i].str_l.len / 4; | 321 | size_t part_s = data_units1[i].str_l.len / 4; |
322 | 322 | ||
323 | MHD_SHA1_init (&ctx); | 323 | MHD_SHA1_init (&ctx); |
324 | MHD_SHA1_update (&ctx, (const uint8_t*) data_units1[i].str_l.str, part_s); | 324 | MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str, part_s); |
325 | MHD_SHA1_update (&ctx, (const uint8_t*) data_units1[i].str_l.str + part_s, | 325 | MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str + part_s, |
326 | data_units1[i].str_l.len - part_s); | 326 | data_units1[i].str_l.len - part_s); |
327 | MHD_SHA1_finish (&ctx, digest); | 327 | MHD_SHA1_finish (&ctx, digest); |
328 | num_failed += check_result (__FUNCTION__, i, digest, | 328 | num_failed += check_result (__FUNCTION__, i, digest, |
diff --git a/src/microhttpd/test_sha512_256.c b/src/microhttpd/test_sha512_256.c index 81a505c0..192cb1fb 100644 --- a/src/microhttpd/test_sha512_256.c +++ b/src/microhttpd/test_sha512_256.c | |||
@@ -427,9 +427,9 @@ check_result (const char *test_name, | |||
427 | { | 427 | { |
428 | char calc_str[SHA512_256_DIGEST_SIZE * 2 + 1]; | 428 | char calc_str[SHA512_256_DIGEST_SIZE * 2 + 1]; |
429 | bin2hex (calculated, SHA512_256_DIGEST_SIZE, calc_str); | 429 | bin2hex (calculated, SHA512_256_DIGEST_SIZE, calc_str); |
430 | printf ( | 430 | printf ("PASSED: %s check %u: calculated digest %s matches " \ |
431 | "PASSED: %s check %u: calculated digest %s matches expected digest.\n", | 431 | "expected digest.\n", |
432 | test_name, check_num, calc_str); | 432 | test_name, check_num, calc_str); |
433 | fflush (stdout); | 433 | fflush (stdout); |
434 | } | 434 | } |
435 | return failed ? 1 : 0; | 435 | return failed ? 1 : 0; |
diff --git a/src/microhttpd/test_str.c b/src/microhttpd/test_str.c index 35e31319..650510a1 100644 --- a/src/microhttpd/test_str.c +++ b/src/microhttpd/test_str.c | |||
@@ -312,22 +312,22 @@ struct two_eq_strs | |||
312 | }; | 312 | }; |
313 | 313 | ||
314 | static const struct two_eq_strs eq_strings[] = { | 314 | static const struct two_eq_strs eq_strings[] = { |
315 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), D_STR_W_LEN ( | 315 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), |
316 | "1234567890!@~%&$@#{}[]\\/!?`.")}, | 316 | D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`.")}, |
317 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple string.")}, | 317 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple string.")}, |
318 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("SIMPLE STRING.")}, | 318 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("SIMPLE STRING.")}, |
319 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string.")}, | 319 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string.")}, |
320 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("Simple String.")}, | 320 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("Simple String.")}, |
321 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SiMpLe sTrInG.")}, | 321 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SiMpLe sTrInG.")}, |
322 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.")}, | 322 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.")}, |
323 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), D_STR_W_LEN ( | 323 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), |
324 | "abcdefghijklmnopqrstuvwxyz")}, | 324 | D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz")}, |
325 | {D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), D_STR_W_LEN ( | 325 | {D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), |
326 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, | 326 | D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, |
327 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), D_STR_W_LEN ( | 327 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), |
328 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, | 328 | D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, |
329 | {D_STR_W_LEN ("zyxwvutsrqponMLKJIHGFEDCBA"), D_STR_W_LEN ( | 329 | {D_STR_W_LEN ("zyxwvutsrqponMLKJIHGFEDCBA"), |
330 | "ZYXWVUTSRQPONmlkjihgfedcba")}, | 330 | D_STR_W_LEN ("ZYXWVUTSRQPONmlkjihgfedcba")}, |
331 | 331 | ||
332 | {D_STR_W_LEN ("Cha\x8cne pour le test."), | 332 | {D_STR_W_LEN ("Cha\x8cne pour le test."), |
333 | D_STR_W_LEN ("Cha\x8cne pour le test.")}, /* "Chaîne pour le test." in CP850 */ | 333 | D_STR_W_LEN ("Cha\x8cne pour le test.")}, /* "Chaîne pour le test." in CP850 */ |
@@ -445,21 +445,21 @@ struct two_neq_strs | |||
445 | }; | 445 | }; |
446 | 446 | ||
447 | static const struct two_neq_strs neq_strings[] = { | 447 | static const struct two_neq_strs neq_strings[] = { |
448 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), D_STR_W_LEN ( | 448 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), |
449 | "1234567890!@~%&$@#{}[]\\/!?`"), 27}, | 449 | D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`"), 27}, |
450 | {D_STR_W_LEN (".1234567890!@~%&$@#{}[]\\/!?`."), D_STR_W_LEN ( | 450 | {D_STR_W_LEN (".1234567890!@~%&$@#{}[]\\/!?`."), |
451 | "1234567890!@~%&$@#{}[]\\/!?`"), 0}, | 451 | D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`"), 0}, |
452 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple ctring."), 7}, | 452 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple ctring."), 7}, |
453 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string"), 13}, | 453 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string"), 13}, |
454 | {D_STR_W_LEN ("simple strings"), D_STR_W_LEN ("Simple String."), 13}, | 454 | {D_STR_W_LEN ("simple strings"), D_STR_W_LEN ("Simple String."), 13}, |
455 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SYMpLe sTrInG."), 1}, | 455 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SYMpLe sTrInG."), 1}, |
456 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.2"), 14}, | 456 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.2"), 14}, |
457 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz,"), D_STR_W_LEN ( | 457 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz,"), |
458 | "abcdefghijklmnopqrstuvwxyz."), 26}, | 458 | D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz."), 26}, |
459 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz!"), D_STR_W_LEN ( | 459 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz!"), |
460 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ?"), 26}, | 460 | D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ?"), 26}, |
461 | {D_STR_W_LEN ("zyxwvutsrqponwMLKJIHGFEDCBA"), D_STR_W_LEN ( | 461 | {D_STR_W_LEN ("zyxwvutsrqponwMLKJIHGFEDCBA"), |
462 | "ZYXWVUTSRQPON%mlkjihgfedcba"), 13}, | 462 | D_STR_W_LEN ("ZYXWVUTSRQPON%mlkjihgfedcba"), 13}, |
463 | 463 | ||
464 | {D_STR_W_LEN ("S\xbdur veulent plus d'\xbdufs."), /* "SÅ“ur veulent plus d'Å“ufs." in ISO-8859-15 */ | 464 | {D_STR_W_LEN ("S\xbdur veulent plus d'\xbdufs."), /* "SÅ“ur veulent plus d'Å“ufs." in ISO-8859-15 */ |
465 | D_STR_W_LEN ("S\xbcUR VEULENT PLUS D'\xbcUFS."), 1}, /* "SÅ’UR VEULENT PLUS D'Å’UFS." in ISO-8859-15 */ | 465 | D_STR_W_LEN ("S\xbcUR VEULENT PLUS D'\xbcUFS."), 1}, /* "SÅ’UR VEULENT PLUS D'Å’UFS." in ISO-8859-15 */ |
@@ -644,11 +644,12 @@ check_eq_strings_n (void) | |||
644 | } | 644 | } |
645 | } | 645 | } |
646 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 646 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
647 | printf ( | 647 | printf ("PASSED: MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) " \ |
648 | "PASSED: MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) != 0 && \\\n" | 648 | "!= 0 && \\\n" \ |
649 | " MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) != 0, where N is 0..%u\n", | 649 | " MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) " \ |
650 | n_prnt (t->s1.str), n_prnt (t->s2.str), n_prnt (t->s2.str), | 650 | "!= 0, where N is 0..%u\n", |
651 | n_prnt (t->s1.str), (unsigned int) m_len + 1); | 651 | n_prnt (t->s1.str), n_prnt (t->s2.str), n_prnt (t->s2.str), |
652 | n_prnt (t->s1.str), (unsigned int) m_len + 1); | ||
652 | } | 653 | } |
653 | } | 654 | } |
654 | return t_failed; | 655 | return t_failed; |
@@ -1174,14 +1175,14 @@ check_str_to_uint64_valid (void) | |||
1174 | "FAILED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 | 1175 | "FAILED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 |
1175 | ") converted string to value %" | 1176 | ") converted string to value %" |
1176 | PRIu64 "," | 1177 | PRIu64 "," |
1177 | " while expecting result %" PRIu64 ". Locale: %s\n", n_prnt ( | 1178 | " while expecting result %" PRIu64 ". Locale: %s\n", |
1178 | t->str.str), rv, rv, | 1179 | n_prnt (t->str.str), rv, rv, |
1179 | t->val, get_current_locale_str ()); | 1180 | t->val, get_current_locale_str ()); |
1180 | } | 1181 | } |
1181 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1182 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1182 | printf ( | 1183 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 ") == %" \ |
1183 | "PASSED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 ") == %" PRIuPTR "\n", | 1184 | PRIuPTR "\n", |
1184 | n_prnt (t->str.str), rv, rs); | 1185 | n_prnt (t->str.str), rv, rs); |
1185 | } | 1186 | } |
1186 | } | 1187 | } |
1187 | return t_failed; | 1188 | return t_failed; |
@@ -1245,9 +1246,9 @@ check_str_to_uint64_all_chars (void) | |||
1245 | char test_str[] = "0123"; | 1246 | char test_str[] = "0123"; |
1246 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 1247 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
1247 | 1248 | ||
1248 | printf ( | 1249 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, " |
1249 | "PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1250 | "value of ret_val is unmodified\n", |
1250 | n_prnt (test_str)); | 1251 | n_prnt (test_str)); |
1251 | } | 1252 | } |
1252 | } | 1253 | } |
1253 | } | 1254 | } |
@@ -1304,9 +1305,9 @@ check_str_to_uint64_overflow (void) | |||
1304 | } | 1305 | } |
1305 | } | 1306 | } |
1306 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1307 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1307 | printf ( | 1308 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, " |
1308 | "PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1309 | "value of ret_val is unmodified\n", |
1309 | n_prnt (t->str)); | 1310 | n_prnt (t->str)); |
1310 | } | 1311 | } |
1311 | } | 1312 | } |
1312 | return t_failed; | 1313 | return t_failed; |
@@ -1362,9 +1363,9 @@ check_str_to_uint64_no_val (void) | |||
1362 | } | 1363 | } |
1363 | } | 1364 | } |
1364 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1365 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1365 | printf ( | 1366 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, " |
1366 | "PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1367 | "value of ret_val is unmodified\n", |
1367 | n_prnt (t->str)); | 1368 | n_prnt (t->str)); |
1368 | } | 1369 | } |
1369 | } | 1370 | } |
1370 | return t_failed; | 1371 | return t_failed; |
@@ -1431,12 +1432,11 @@ check_str_to_uint64_n_valid (void) | |||
1431 | } | 1432 | } |
1432 | } | 1433 | } |
1433 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1434 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1434 | printf ( | 1435 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" |
1435 | "PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR ", ->%" | 1436 | PRIuPTR ", ->%" PRIu64 ")" " == %" PRIuPTR "\n", |
1436 | PRIu64 ")" | 1437 | n_prnt (t->str.str), |
1437 | " == %" PRIuPTR "\n", n_prnt (t->str.str), | 1438 | (uintptr_t) t->num_of_digt, |
1438 | (uintptr_t) t->num_of_digt, | 1439 | (uintptr_t) t->str.len + 1, rv, rs); |
1439 | (uintptr_t) t->str.len + 1, rv, rs); | ||
1440 | } | 1440 | } |
1441 | } | 1441 | } |
1442 | return t_failed; | 1442 | return t_failed; |
@@ -1510,9 +1510,9 @@ check_str_to_uint64_n_all_chars (void) | |||
1510 | char test_str[] = "0123"; | 1510 | char test_str[] = "0123"; |
1511 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 1511 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
1512 | 1512 | ||
1513 | printf ( | 1513 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, " |
1514 | "PASSED: MHD_str_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, value of ret_val is unmodified\n", | 1514 | "value of ret_val is unmodified\n", |
1515 | n_prnt (test_str)); | 1515 | n_prnt (test_str)); |
1516 | } | 1516 | } |
1517 | } | 1517 | } |
1518 | } | 1518 | } |
@@ -1577,12 +1577,11 @@ check_str_to_uint64_n_overflow (void) | |||
1577 | } | 1577 | } |
1578 | } | 1578 | } |
1579 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1579 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1580 | printf ( | 1580 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
1581 | "PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 1581 | ", &ret_val) == 0," |
1582 | ", &ret_val) == 0," | 1582 | " value of ret_val is unmodified\n", n_prnt (t->str), |
1583 | " value of ret_val is unmodified\n", n_prnt (t->str), | 1583 | (uintptr_t) t->len, |
1584 | (uintptr_t) t->len, | 1584 | (uintptr_t) t->len + 1); |
1585 | (uintptr_t) t->len + 1); | ||
1586 | } | 1585 | } |
1587 | } | 1586 | } |
1588 | return t_failed; | 1587 | return t_failed; |
@@ -1646,11 +1645,10 @@ check_str_to_uint64_n_no_val (void) | |||
1646 | } | 1645 | } |
1647 | } | 1646 | } |
1648 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1647 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1649 | printf ( | 1648 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", 0..%" PRIuPTR |
1650 | "PASSED: MHD_str_to_uint64_n_(\"%s\", 0..%" PRIuPTR | 1649 | ", &ret_val) == 0," |
1651 | ", &ret_val) == 0," | 1650 | " value of ret_val is unmodified\n", n_prnt (t->str), |
1652 | " value of ret_val is unmodified\n", n_prnt (t->str), | 1651 | (uintptr_t) t->len + 1); |
1653 | (uintptr_t) t->len + 1); | ||
1654 | } | 1652 | } |
1655 | } | 1653 | } |
1656 | return t_failed; | 1654 | return t_failed; |
@@ -1715,15 +1713,14 @@ check_strx_to_uint32_valid (void) | |||
1715 | "FAILED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 | 1713 | "FAILED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 |
1716 | ") converted string to value 0x%" | 1714 | ") converted string to value 0x%" |
1717 | PRIX64 "," | 1715 | PRIX64 "," |
1718 | " while expecting result 0x%" PRIX64 ". Locale: %s\n", n_prnt ( | 1716 | " while expecting result 0x%" PRIX64 ". Locale: %s\n", |
1719 | t->str.str), (uint64_t) rv, (uint64_t) rv, | 1717 | n_prnt (t->str.str), (uint64_t) rv, (uint64_t) rv, |
1720 | t->val, get_current_locale_str ()); | 1718 | t->val, get_current_locale_str ()); |
1721 | } | 1719 | } |
1722 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1720 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1723 | printf ( | 1721 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 ") == %" |
1724 | "PASSED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 ") == %" PRIuPTR | 1722 | PRIuPTR "\n", |
1725 | "\n", | 1723 | n_prnt (t->str.str), (uint64_t) rv, rs); |
1726 | n_prnt (t->str.str), (uint64_t) rv, rs); | ||
1727 | } | 1724 | } |
1728 | } | 1725 | } |
1729 | return t_failed; | 1726 | return t_failed; |
@@ -1792,9 +1789,9 @@ check_strx_to_uint32_all_chars (void) | |||
1792 | char test_str[] = "0123"; | 1789 | char test_str[] = "0123"; |
1793 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 1790 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
1794 | 1791 | ||
1795 | printf ( | 1792 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, " |
1796 | "PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1793 | "value of ret_val is unmodified\n", |
1797 | n_prnt (test_str)); | 1794 | n_prnt (test_str)); |
1798 | } | 1795 | } |
1799 | } | 1796 | } |
1800 | } | 1797 | } |
@@ -1869,9 +1866,9 @@ check_strx_to_uint32_overflow (void) | |||
1869 | } | 1866 | } |
1870 | } | 1867 | } |
1871 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1868 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1872 | printf ( | 1869 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, " |
1873 | "PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1870 | "value of ret_val is unmodified\n", |
1874 | n_prnt (str)); | 1871 | n_prnt (str)); |
1875 | } | 1872 | } |
1876 | } | 1873 | } |
1877 | return t_failed; | 1874 | return t_failed; |
@@ -1928,9 +1925,9 @@ check_strx_to_uint32_no_val (void) | |||
1928 | } | 1925 | } |
1929 | } | 1926 | } |
1930 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1927 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1931 | printf ( | 1928 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, " |
1932 | "PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1929 | "value of ret_val is unmodified\n", |
1933 | n_prnt (t->str)); | 1930 | n_prnt (t->str)); |
1934 | } | 1931 | } |
1935 | } | 1932 | } |
1936 | return t_failed; | 1933 | return t_failed; |
@@ -2086,9 +2083,9 @@ check_strx_to_uint32_n_all_chars (void) | |||
2086 | char test_str[] = "0123"; | 2083 | char test_str[] = "0123"; |
2087 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 2084 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
2088 | 2085 | ||
2089 | printf ( | 2086 | printf ("PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..5, &ret_val) == 0, " |
2090 | "PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..5, &ret_val) == 0, value of ret_val is unmodified\n", | 2087 | "value of ret_val is unmodified\n", |
2091 | n_prnt (test_str)); | 2088 | n_prnt (test_str)); |
2092 | } | 2089 | } |
2093 | } | 2090 | } |
2094 | } | 2091 | } |
@@ -2186,12 +2183,11 @@ check_strx_to_uint32_n_overflow (void) | |||
2186 | } | 2183 | } |
2187 | } | 2184 | } |
2188 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2185 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2189 | printf ( | 2186 | printf ("PASSED: MHD_strx_to_uint32_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
2190 | "PASSED: MHD_strx_to_uint32_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 2187 | ", &ret_val) == 0," |
2191 | ", &ret_val) == 0," | 2188 | " value of ret_val is unmodified\n", n_prnt (str), |
2192 | " value of ret_val is unmodified\n", n_prnt (str), | 2189 | (uintptr_t) min_len, |
2193 | (uintptr_t) min_len, | 2190 | (uintptr_t) max_len); |
2194 | (uintptr_t) max_len); | ||
2195 | } | 2191 | } |
2196 | } | 2192 | } |
2197 | return t_failed; | 2193 | return t_failed; |
@@ -2256,11 +2252,10 @@ check_strx_to_uint32_n_no_val (void) | |||
2256 | } | 2252 | } |
2257 | } | 2253 | } |
2258 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2254 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2259 | printf ( | 2255 | printf ("PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..%" PRIuPTR |
2260 | "PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..%" PRIuPTR | 2256 | ", &ret_val) == 0," |
2261 | ", &ret_val) == 0," | 2257 | " value of ret_val is unmodified\n", n_prnt (t->str), |
2262 | " value of ret_val is unmodified\n", n_prnt (t->str), | 2258 | (uintptr_t) t->len + 1); |
2263 | (uintptr_t) t->len + 1); | ||
2264 | } | 2259 | } |
2265 | } | 2260 | } |
2266 | return t_failed; | 2261 | return t_failed; |
@@ -2326,10 +2321,9 @@ check_strx_to_uint64_valid (void) | |||
2326 | t->val, get_current_locale_str ()); | 2321 | t->val, get_current_locale_str ()); |
2327 | } | 2322 | } |
2328 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2323 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2329 | printf ( | 2324 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", ->0x%" PRIX64 ") == %" |
2330 | "PASSED: MHD_strx_to_uint64_(\"%s\", ->0x%" PRIX64 ") == %" PRIuPTR | 2325 | PRIuPTR "\n", |
2331 | "\n", | 2326 | n_prnt (t->str.str), rv, rs); |
2332 | n_prnt (t->str.str), rv, rs); | ||
2333 | } | 2327 | } |
2334 | } | 2328 | } |
2335 | return t_failed; | 2329 | return t_failed; |
@@ -2397,9 +2391,9 @@ check_strx_to_uint64_all_chars (void) | |||
2397 | char test_str[] = "0123"; | 2391 | char test_str[] = "0123"; |
2398 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 2392 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
2399 | 2393 | ||
2400 | printf ( | 2394 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, " |
2401 | "PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 2395 | "value of ret_val is unmodified\n", |
2402 | n_prnt (test_str)); | 2396 | n_prnt (test_str)); |
2403 | } | 2397 | } |
2404 | } | 2398 | } |
2405 | } | 2399 | } |
@@ -2456,9 +2450,9 @@ check_strx_to_uint64_overflow (void) | |||
2456 | } | 2450 | } |
2457 | } | 2451 | } |
2458 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2452 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2459 | printf ( | 2453 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, " |
2460 | "PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 2454 | "value of ret_val is unmodified\n", |
2461 | n_prnt (t->str)); | 2455 | n_prnt (t->str)); |
2462 | } | 2456 | } |
2463 | } | 2457 | } |
2464 | return t_failed; | 2458 | return t_failed; |
@@ -2514,9 +2508,9 @@ check_strx_to_uint64_no_val (void) | |||
2514 | } | 2508 | } |
2515 | } | 2509 | } |
2516 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2510 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2517 | printf ( | 2511 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, " |
2518 | "PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 2512 | "value of ret_val is unmodified\n", |
2519 | n_prnt (t->str)); | 2513 | n_prnt (t->str)); |
2520 | } | 2514 | } |
2521 | } | 2515 | } |
2522 | return t_failed; | 2516 | return t_failed; |
@@ -2583,13 +2577,12 @@ check_strx_to_uint64_n_valid (void) | |||
2583 | } | 2577 | } |
2584 | } | 2578 | } |
2585 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2579 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2586 | printf ( | 2580 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
2587 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 2581 | ", ->0x%" |
2588 | ", ->0x%" | 2582 | PRIX64 ")" |
2589 | PRIX64 ")" | 2583 | " == %" PRIuPTR "\n", n_prnt (t->str.str), |
2590 | " == %" PRIuPTR "\n", n_prnt (t->str.str), | 2584 | (uintptr_t) t->num_of_digt, |
2591 | (uintptr_t) t->num_of_digt, | 2585 | (uintptr_t) t->str.len + 1, rv, rs); |
2592 | (uintptr_t) t->str.len + 1, rv, rs); | ||
2593 | } | 2586 | } |
2594 | } | 2587 | } |
2595 | return t_failed; | 2588 | return t_failed; |
@@ -2668,9 +2661,9 @@ check_strx_to_uint64_n_all_chars (void) | |||
2668 | char test_str[] = "0123"; | 2661 | char test_str[] = "0123"; |
2669 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 2662 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
2670 | 2663 | ||
2671 | printf ( | 2664 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, " |
2672 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, value of ret_val is unmodified\n", | 2665 | "value of ret_val is unmodified\n", |
2673 | n_prnt (test_str)); | 2666 | n_prnt (test_str)); |
2674 | } | 2667 | } |
2675 | } | 2668 | } |
2676 | } | 2669 | } |
@@ -2736,12 +2729,11 @@ check_strx_to_uint64_n_overflow (void) | |||
2736 | } | 2729 | } |
2737 | } | 2730 | } |
2738 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2731 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2739 | printf ( | 2732 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
2740 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 2733 | ", &ret_val) == 0," |
2741 | ", &ret_val) == 0," | 2734 | " value of ret_val is unmodified\n", n_prnt (t->str), |
2742 | " value of ret_val is unmodified\n", n_prnt (t->str), | 2735 | (uintptr_t) t->len, |
2743 | (uintptr_t) t->len, | 2736 | (uintptr_t) t->len + 1); |
2744 | (uintptr_t) t->len + 1); | ||
2745 | } | 2737 | } |
2746 | } | 2738 | } |
2747 | return t_failed; | 2739 | return t_failed; |
@@ -2806,11 +2798,10 @@ check_strx_to_uint64_n_no_val (void) | |||
2806 | } | 2798 | } |
2807 | } | 2799 | } |
2808 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2800 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2809 | printf ( | 2801 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..%" PRIuPTR |
2810 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..%" PRIuPTR | 2802 | ", &ret_val) == 0," |
2811 | ", &ret_val) == 0," | 2803 | " value of ret_val is unmodified\n", n_prnt (t->str), |
2812 | " value of ret_val is unmodified\n", n_prnt (t->str), | 2804 | (uintptr_t) t->len + 1); |
2813 | (uintptr_t) t->len + 1); | ||
2814 | } | 2805 | } |
2815 | } | 2806 | } |
2816 | return t_failed; | 2807 | return t_failed; |
@@ -2847,8 +2838,8 @@ run_str_to_X_tests (void) | |||
2847 | "FAILED: testcase check_str_to_uint64_all_chars() failed.\n\n"); | 2838 | "FAILED: testcase check_str_to_uint64_all_chars() failed.\n\n"); |
2848 | } | 2839 | } |
2849 | else if (verbose > 1) | 2840 | else if (verbose > 1) |
2850 | printf ( | 2841 | printf ("PASSED: testcase check_str_to_uint64_all_chars() " |
2851 | "PASSED: testcase check_str_to_uint64_all_chars() successfully passed.\n\n"); | 2842 | "successfully passed.\n\n"); |
2852 | 2843 | ||
2853 | res = check_str_to_uint64_overflow (); | 2844 | res = check_str_to_uint64_overflow (); |
2854 | if (res != 0) | 2845 | if (res != 0) |
@@ -2858,8 +2849,8 @@ run_str_to_X_tests (void) | |||
2858 | "FAILED: testcase check_str_to_uint64_overflow() failed.\n\n"); | 2849 | "FAILED: testcase check_str_to_uint64_overflow() failed.\n\n"); |
2859 | } | 2850 | } |
2860 | else if (verbose > 1) | 2851 | else if (verbose > 1) |
2861 | printf ( | 2852 | printf ("PASSED: testcase check_str_to_uint64_overflow() " |
2862 | "PASSED: testcase check_str_to_uint64_overflow() successfully passed.\n\n"); | 2853 | "successfully passed.\n\n"); |
2863 | 2854 | ||
2864 | res = check_str_to_uint64_no_val (); | 2855 | res = check_str_to_uint64_no_val (); |
2865 | if (res != 0) | 2856 | if (res != 0) |
@@ -2869,8 +2860,8 @@ run_str_to_X_tests (void) | |||
2869 | "FAILED: testcase check_str_to_uint64_no_val() failed.\n\n"); | 2860 | "FAILED: testcase check_str_to_uint64_no_val() failed.\n\n"); |
2870 | } | 2861 | } |
2871 | else if (verbose > 1) | 2862 | else if (verbose > 1) |
2872 | printf ( | 2863 | printf ("PASSED: testcase check_str_to_uint64_no_val() " |
2873 | "PASSED: testcase check_str_to_uint64_no_val() successfully passed.\n\n"); | 2864 | "successfully passed.\n\n"); |
2874 | 2865 | ||
2875 | if (str_to_uint64_fails) | 2866 | if (str_to_uint64_fails) |
2876 | fprintf (stderr, | 2867 | fprintf (stderr, |
@@ -2878,8 +2869,8 @@ run_str_to_X_tests (void) | |||
2878 | (unsigned long) str_to_uint64_fails, | 2869 | (unsigned long) str_to_uint64_fails, |
2879 | str_to_uint64_fails == 1 ? "" : "s"); | 2870 | str_to_uint64_fails == 1 ? "" : "s"); |
2880 | else if (verbose > 0) | 2871 | else if (verbose > 0) |
2881 | printf ( | 2872 | printf ("PASSED: function MHD_str_to_uint64_() successfully " |
2882 | "PASSED: function MHD_str_to_uint64_() successfully passed all checks.\n\n"); | 2873 | "passed all checks.\n\n"); |
2883 | 2874 | ||
2884 | res = check_str_to_uint64_n_valid (); | 2875 | res = check_str_to_uint64_n_valid (); |
2885 | if (res != 0) | 2876 | if (res != 0) |
@@ -2889,8 +2880,8 @@ run_str_to_X_tests (void) | |||
2889 | "FAILED: testcase check_str_to_uint64_n_valid() failed.\n\n"); | 2880 | "FAILED: testcase check_str_to_uint64_n_valid() failed.\n\n"); |
2890 | } | 2881 | } |
2891 | else if (verbose > 1) | 2882 | else if (verbose > 1) |
2892 | printf ( | 2883 | printf ("PASSED: testcase check_str_to_uint64_n_valid() " |
2893 | "PASSED: testcase check_str_to_uint64_n_valid() successfully passed.\n\n"); | 2884 | "successfully passed.\n\n"); |
2894 | 2885 | ||
2895 | res = check_str_to_uint64_n_all_chars (); | 2886 | res = check_str_to_uint64_n_all_chars (); |
2896 | if (res != 0) | 2887 | if (res != 0) |
@@ -2900,8 +2891,8 @@ run_str_to_X_tests (void) | |||
2900 | "FAILED: testcase check_str_to_uint64_n_all_chars() failed.\n\n"); | 2891 | "FAILED: testcase check_str_to_uint64_n_all_chars() failed.\n\n"); |
2901 | } | 2892 | } |
2902 | else if (verbose > 1) | 2893 | else if (verbose > 1) |
2903 | printf ( | 2894 | printf ("PASSED: testcase check_str_to_uint64_n_all_chars() " |
2904 | "PASSED: testcase check_str_to_uint64_n_all_chars() successfully passed.\n\n"); | 2895 | "successfully passed.\n\n"); |
2905 | 2896 | ||
2906 | res = check_str_to_uint64_n_overflow (); | 2897 | res = check_str_to_uint64_n_overflow (); |
2907 | if (res != 0) | 2898 | if (res != 0) |
@@ -2911,8 +2902,8 @@ run_str_to_X_tests (void) | |||
2911 | "FAILED: testcase check_str_to_uint64_n_overflow() failed.\n\n"); | 2902 | "FAILED: testcase check_str_to_uint64_n_overflow() failed.\n\n"); |
2912 | } | 2903 | } |
2913 | else if (verbose > 1) | 2904 | else if (verbose > 1) |
2914 | printf ( | 2905 | printf ("PASSED: testcase check_str_to_uint64_n_overflow() " |
2915 | "PASSED: testcase check_str_to_uint64_n_overflow() successfully passed.\n\n"); | 2906 | "successfully passed.\n\n"); |
2916 | 2907 | ||
2917 | res = check_str_to_uint64_n_no_val (); | 2908 | res = check_str_to_uint64_n_no_val (); |
2918 | if (res != 0) | 2909 | if (res != 0) |
@@ -2922,8 +2913,8 @@ run_str_to_X_tests (void) | |||
2922 | "FAILED: testcase check_str_to_uint64_n_no_val() failed.\n\n"); | 2913 | "FAILED: testcase check_str_to_uint64_n_no_val() failed.\n\n"); |
2923 | } | 2914 | } |
2924 | else if (verbose > 1) | 2915 | else if (verbose > 1) |
2925 | printf ( | 2916 | printf ("PASSED: testcase check_str_to_uint64_n_no_val() " |
2926 | "PASSED: testcase check_str_to_uint64_n_no_val() successfully passed.\n\n"); | 2917 | "successfully passed.\n\n"); |
2927 | 2918 | ||
2928 | if (str_to_uint64_n_fails) | 2919 | if (str_to_uint64_n_fails) |
2929 | fprintf (stderr, | 2920 | fprintf (stderr, |
@@ -2931,8 +2922,8 @@ run_str_to_X_tests (void) | |||
2931 | (unsigned long) str_to_uint64_n_fails, | 2922 | (unsigned long) str_to_uint64_n_fails, |
2932 | str_to_uint64_n_fails == 1 ? "" : "s"); | 2923 | str_to_uint64_n_fails == 1 ? "" : "s"); |
2933 | else if (verbose > 0) | 2924 | else if (verbose > 0) |
2934 | printf ( | 2925 | printf ("PASSED: function MHD_str_to_uint64_n_() successfully " |
2935 | "PASSED: function MHD_str_to_uint64_n_() successfully passed all checks.\n\n"); | 2926 | "passed all checks.\n\n"); |
2936 | 2927 | ||
2937 | res = check_strx_to_uint32_valid (); | 2928 | res = check_strx_to_uint32_valid (); |
2938 | if (res != 0) | 2929 | if (res != 0) |
@@ -2942,8 +2933,8 @@ run_str_to_X_tests (void) | |||
2942 | "FAILED: testcase check_strx_to_uint32_valid() failed.\n\n"); | 2933 | "FAILED: testcase check_strx_to_uint32_valid() failed.\n\n"); |
2943 | } | 2934 | } |
2944 | else if (verbose > 1) | 2935 | else if (verbose > 1) |
2945 | printf ( | 2936 | printf ("PASSED: testcase check_strx_to_uint32_valid() " |
2946 | "PASSED: testcase check_strx_to_uint32_valid() successfully passed.\n\n"); | 2937 | "successfully passed.\n\n"); |
2947 | 2938 | ||
2948 | res = check_strx_to_uint32_all_chars (); | 2939 | res = check_strx_to_uint32_all_chars (); |
2949 | if (res != 0) | 2940 | if (res != 0) |
@@ -2953,8 +2944,8 @@ run_str_to_X_tests (void) | |||
2953 | "FAILED: testcase check_strx_to_uint32_all_chars() failed.\n\n"); | 2944 | "FAILED: testcase check_strx_to_uint32_all_chars() failed.\n\n"); |
2954 | } | 2945 | } |
2955 | else if (verbose > 1) | 2946 | else if (verbose > 1) |
2956 | printf ( | 2947 | printf ("PASSED: testcase check_strx_to_uint32_all_chars() " |
2957 | "PASSED: testcase check_strx_to_uint32_all_chars() successfully passed.\n\n"); | 2948 | "successfully passed.\n\n"); |
2958 | 2949 | ||
2959 | res = check_strx_to_uint32_overflow (); | 2950 | res = check_strx_to_uint32_overflow (); |
2960 | if (res != 0) | 2951 | if (res != 0) |
@@ -2964,8 +2955,8 @@ run_str_to_X_tests (void) | |||
2964 | "FAILED: testcase check_strx_to_uint32_overflow() failed.\n\n"); | 2955 | "FAILED: testcase check_strx_to_uint32_overflow() failed.\n\n"); |
2965 | } | 2956 | } |
2966 | else if (verbose > 1) | 2957 | else if (verbose > 1) |
2967 | printf ( | 2958 | printf ("PASSED: testcase check_strx_to_uint32_overflow() " |
2968 | "PASSED: testcase check_strx_to_uint32_overflow() successfully passed.\n\n"); | 2959 | "successfully passed.\n\n"); |
2969 | 2960 | ||
2970 | res = check_strx_to_uint32_no_val (); | 2961 | res = check_strx_to_uint32_no_val (); |
2971 | if (res != 0) | 2962 | if (res != 0) |
@@ -2975,8 +2966,8 @@ run_str_to_X_tests (void) | |||
2975 | "FAILED: testcase check_strx_to_uint32_no_val() failed.\n\n"); | 2966 | "FAILED: testcase check_strx_to_uint32_no_val() failed.\n\n"); |
2976 | } | 2967 | } |
2977 | else if (verbose > 1) | 2968 | else if (verbose > 1) |
2978 | printf ( | 2969 | printf ("PASSED: testcase check_strx_to_uint32_no_val() " |
2979 | "PASSED: testcase check_strx_to_uint32_no_val() successfully passed.\n\n"); | 2970 | "successfully passed.\n\n"); |
2980 | 2971 | ||
2981 | if (strx_to_uint32_fails) | 2972 | if (strx_to_uint32_fails) |
2982 | fprintf (stderr, | 2973 | fprintf (stderr, |
@@ -2984,8 +2975,8 @@ run_str_to_X_tests (void) | |||
2984 | (unsigned long) strx_to_uint32_fails, | 2975 | (unsigned long) strx_to_uint32_fails, |
2985 | strx_to_uint32_fails == 1 ? "" : "s"); | 2976 | strx_to_uint32_fails == 1 ? "" : "s"); |
2986 | else if (verbose > 0) | 2977 | else if (verbose > 0) |
2987 | printf ( | 2978 | printf ("PASSED: function MHD_strx_to_uint32_() successfully " |
2988 | "PASSED: function MHD_strx_to_uint32_() successfully passed all checks.\n\n"); | 2979 | "passed all checks.\n\n"); |
2989 | 2980 | ||
2990 | res = check_strx_to_uint32_n_valid (); | 2981 | res = check_strx_to_uint32_n_valid (); |
2991 | if (res != 0) | 2982 | if (res != 0) |
@@ -2995,8 +2986,8 @@ run_str_to_X_tests (void) | |||
2995 | "FAILED: testcase check_strx_to_uint32_n_valid() failed.\n\n"); | 2986 | "FAILED: testcase check_strx_to_uint32_n_valid() failed.\n\n"); |
2996 | } | 2987 | } |
2997 | else if (verbose > 1) | 2988 | else if (verbose > 1) |
2998 | printf ( | 2989 | printf ("PASSED: testcase check_strx_to_uint32_n_valid() " |
2999 | "PASSED: testcase check_strx_to_uint32_n_valid() successfully passed.\n\n"); | 2990 | "successfully passed.\n\n"); |
3000 | 2991 | ||
3001 | res = check_strx_to_uint32_n_all_chars (); | 2992 | res = check_strx_to_uint32_n_all_chars (); |
3002 | if (res != 0) | 2993 | if (res != 0) |
@@ -3006,8 +2997,8 @@ run_str_to_X_tests (void) | |||
3006 | "FAILED: testcase check_strx_to_uint32_n_all_chars() failed.\n\n"); | 2997 | "FAILED: testcase check_strx_to_uint32_n_all_chars() failed.\n\n"); |
3007 | } | 2998 | } |
3008 | else if (verbose > 1) | 2999 | else if (verbose > 1) |
3009 | printf ( | 3000 | printf ("PASSED: testcase check_strx_to_uint32_n_all_chars() " |
3010 | "PASSED: testcase check_strx_to_uint32_n_all_chars() successfully passed.\n\n"); | 3001 | "successfully passed.\n\n"); |
3011 | 3002 | ||
3012 | res = check_strx_to_uint32_n_overflow (); | 3003 | res = check_strx_to_uint32_n_overflow (); |
3013 | if (res != 0) | 3004 | if (res != 0) |
@@ -3017,8 +3008,8 @@ run_str_to_X_tests (void) | |||
3017 | "FAILED: testcase check_strx_to_uint32_n_overflow() failed.\n\n"); | 3008 | "FAILED: testcase check_strx_to_uint32_n_overflow() failed.\n\n"); |
3018 | } | 3009 | } |
3019 | else if (verbose > 1) | 3010 | else if (verbose > 1) |
3020 | printf ( | 3011 | printf ("PASSED: testcase check_strx_to_uint32_n_overflow() " |
3021 | "PASSED: testcase check_strx_to_uint32_n_overflow() successfully passed.\n\n"); | 3012 | "successfully passed.\n\n"); |
3022 | 3013 | ||
3023 | res = check_strx_to_uint32_n_no_val (); | 3014 | res = check_strx_to_uint32_n_no_val (); |
3024 | if (res != 0) | 3015 | if (res != 0) |
@@ -3028,8 +3019,8 @@ run_str_to_X_tests (void) | |||
3028 | "FAILED: testcase check_strx_to_uint32_n_no_val() failed.\n\n"); | 3019 | "FAILED: testcase check_strx_to_uint32_n_no_val() failed.\n\n"); |
3029 | } | 3020 | } |
3030 | else if (verbose > 1) | 3021 | else if (verbose > 1) |
3031 | printf ( | 3022 | printf ("PASSED: testcase check_strx_to_uint32_n_no_val() " |
3032 | "PASSED: testcase check_strx_to_uint32_n_no_val() successfully passed.\n\n"); | 3023 | "successfully passed.\n\n"); |
3033 | 3024 | ||
3034 | if (strx_to_uint32_n_fails) | 3025 | if (strx_to_uint32_n_fails) |
3035 | fprintf (stderr, | 3026 | fprintf (stderr, |
@@ -3037,8 +3028,8 @@ run_str_to_X_tests (void) | |||
3037 | (unsigned long) strx_to_uint32_n_fails, | 3028 | (unsigned long) strx_to_uint32_n_fails, |
3038 | strx_to_uint32_n_fails == 1 ? "" : "s"); | 3029 | strx_to_uint32_n_fails == 1 ? "" : "s"); |
3039 | else if (verbose > 0) | 3030 | else if (verbose > 0) |
3040 | printf ( | 3031 | printf ("PASSED: function MHD_strx_to_uint32_n_() successfully " |
3041 | "PASSED: function MHD_strx_to_uint32_n_() successfully passed all checks.\n\n"); | 3032 | "passed all checks.\n\n"); |
3042 | 3033 | ||
3043 | res = check_strx_to_uint64_valid (); | 3034 | res = check_strx_to_uint64_valid (); |
3044 | if (res != 0) | 3035 | if (res != 0) |
@@ -3048,8 +3039,8 @@ run_str_to_X_tests (void) | |||
3048 | "FAILED: testcase check_strx_to_uint64_valid() failed.\n\n"); | 3039 | "FAILED: testcase check_strx_to_uint64_valid() failed.\n\n"); |
3049 | } | 3040 | } |
3050 | else if (verbose > 1) | 3041 | else if (verbose > 1) |
3051 | printf ( | 3042 | printf ("PASSED: testcase check_strx_to_uint64_valid() " |
3052 | "PASSED: testcase check_strx_to_uint64_valid() successfully passed.\n\n"); | 3043 | "successfully passed.\n\n"); |
3053 | 3044 | ||
3054 | res = check_strx_to_uint64_all_chars (); | 3045 | res = check_strx_to_uint64_all_chars (); |
3055 | if (res != 0) | 3046 | if (res != 0) |
@@ -3059,8 +3050,8 @@ run_str_to_X_tests (void) | |||
3059 | "FAILED: testcase check_strx_to_uint64_all_chars() failed.\n\n"); | 3050 | "FAILED: testcase check_strx_to_uint64_all_chars() failed.\n\n"); |
3060 | } | 3051 | } |
3061 | else if (verbose > 1) | 3052 | else if (verbose > 1) |
3062 | printf ( | 3053 | printf ("PASSED: testcase check_strx_to_uint64_all_chars() " |
3063 | "PASSED: testcase check_strx_to_uint64_all_chars() successfully passed.\n\n"); | 3054 | "successfully passed.\n\n"); |
3064 | 3055 | ||
3065 | res = check_strx_to_uint64_overflow (); | 3056 | res = check_strx_to_uint64_overflow (); |
3066 | if (res != 0) | 3057 | if (res != 0) |
@@ -3070,8 +3061,8 @@ run_str_to_X_tests (void) | |||
3070 | "FAILED: testcase check_strx_to_uint64_overflow() failed.\n\n"); | 3061 | "FAILED: testcase check_strx_to_uint64_overflow() failed.\n\n"); |
3071 | } | 3062 | } |
3072 | else if (verbose > 1) | 3063 | else if (verbose > 1) |
3073 | printf ( | 3064 | printf ("PASSED: testcase check_strx_to_uint64_overflow() " |
3074 | "PASSED: testcase check_strx_to_uint64_overflow() successfully passed.\n\n"); | 3065 | "successfully passed.\n\n"); |
3075 | 3066 | ||
3076 | res = check_strx_to_uint64_no_val (); | 3067 | res = check_strx_to_uint64_no_val (); |
3077 | if (res != 0) | 3068 | if (res != 0) |
@@ -3081,8 +3072,8 @@ run_str_to_X_tests (void) | |||
3081 | "FAILED: testcase check_strx_to_uint64_no_val() failed.\n\n"); | 3072 | "FAILED: testcase check_strx_to_uint64_no_val() failed.\n\n"); |
3082 | } | 3073 | } |
3083 | else if (verbose > 1) | 3074 | else if (verbose > 1) |
3084 | printf ( | 3075 | printf ("PASSED: testcase check_strx_to_uint64_no_val() " |
3085 | "PASSED: testcase check_strx_to_uint64_no_val() successfully passed.\n\n"); | 3076 | "successfully passed.\n\n"); |
3086 | 3077 | ||
3087 | if (strx_to_uint64_fails) | 3078 | if (strx_to_uint64_fails) |
3088 | fprintf (stderr, | 3079 | fprintf (stderr, |
@@ -3090,8 +3081,8 @@ run_str_to_X_tests (void) | |||
3090 | (unsigned long) strx_to_uint64_fails, | 3081 | (unsigned long) strx_to_uint64_fails, |
3091 | strx_to_uint64_fails == 1 ? "" : "s"); | 3082 | strx_to_uint64_fails == 1 ? "" : "s"); |
3092 | else if (verbose > 0) | 3083 | else if (verbose > 0) |
3093 | printf ( | 3084 | printf ("PASSED: function MHD_strx_to_uint64_() successfully " |
3094 | "PASSED: function MHD_strx_to_uint64_() successfully passed all checks.\n\n"); | 3085 | "passed all checks.\n\n"); |
3095 | 3086 | ||
3096 | res = check_strx_to_uint64_n_valid (); | 3087 | res = check_strx_to_uint64_n_valid (); |
3097 | if (res != 0) | 3088 | if (res != 0) |
@@ -3101,8 +3092,8 @@ run_str_to_X_tests (void) | |||
3101 | "FAILED: testcase check_strx_to_uint64_n_valid() failed.\n\n"); | 3092 | "FAILED: testcase check_strx_to_uint64_n_valid() failed.\n\n"); |
3102 | } | 3093 | } |
3103 | else if (verbose > 1) | 3094 | else if (verbose > 1) |
3104 | printf ( | 3095 | printf ("PASSED: testcase check_strx_to_uint64_n_valid() " |
3105 | "PASSED: testcase check_strx_to_uint64_n_valid() successfully passed.\n\n"); | 3096 | "successfully passed.\n\n"); |
3106 | 3097 | ||
3107 | res = check_strx_to_uint64_n_all_chars (); | 3098 | res = check_strx_to_uint64_n_all_chars (); |
3108 | if (res != 0) | 3099 | if (res != 0) |
@@ -3112,8 +3103,8 @@ run_str_to_X_tests (void) | |||
3112 | "FAILED: testcase check_strx_to_uint64_n_all_chars() failed.\n\n"); | 3103 | "FAILED: testcase check_strx_to_uint64_n_all_chars() failed.\n\n"); |
3113 | } | 3104 | } |
3114 | else if (verbose > 1) | 3105 | else if (verbose > 1) |
3115 | printf ( | 3106 | printf ("PASSED: testcase check_strx_to_uint64_n_all_chars() " |
3116 | "PASSED: testcase check_strx_to_uint64_n_all_chars() successfully passed.\n\n"); | 3107 | "successfully passed.\n\n"); |
3117 | 3108 | ||
3118 | res = check_strx_to_uint64_n_overflow (); | 3109 | res = check_strx_to_uint64_n_overflow (); |
3119 | if (res != 0) | 3110 | if (res != 0) |
@@ -3123,8 +3114,8 @@ run_str_to_X_tests (void) | |||
3123 | "FAILED: testcase check_strx_to_uint64_n_overflow() failed.\n\n"); | 3114 | "FAILED: testcase check_strx_to_uint64_n_overflow() failed.\n\n"); |
3124 | } | 3115 | } |
3125 | else if (verbose > 1) | 3116 | else if (verbose > 1) |
3126 | printf ( | 3117 | printf ("PASSED: testcase check_strx_to_uint64_n_overflow() " |
3127 | "PASSED: testcase check_strx_to_uint64_n_overflow() successfully passed.\n\n"); | 3118 | "successfully passed.\n\n"); |
3128 | 3119 | ||
3129 | res = check_strx_to_uint64_n_no_val (); | 3120 | res = check_strx_to_uint64_n_no_val (); |
3130 | if (res != 0) | 3121 | if (res != 0) |
@@ -3134,8 +3125,8 @@ run_str_to_X_tests (void) | |||
3134 | "FAILED: testcase check_strx_to_uint64_n_no_val() failed.\n\n"); | 3125 | "FAILED: testcase check_strx_to_uint64_n_no_val() failed.\n\n"); |
3135 | } | 3126 | } |
3136 | else if (verbose > 1) | 3127 | else if (verbose > 1) |
3137 | printf ( | 3128 | printf ("PASSED: testcase check_strx_to_uint64_n_no_val() " |
3138 | "PASSED: testcase check_strx_to_uint64_n_no_val() successfully passed.\n\n"); | 3129 | "successfully passed.\n\n"); |
3139 | 3130 | ||
3140 | if (strx_to_uint64_n_fails) | 3131 | if (strx_to_uint64_n_fails) |
3141 | fprintf (stderr, | 3132 | fprintf (stderr, |
@@ -3143,8 +3134,8 @@ run_str_to_X_tests (void) | |||
3143 | (unsigned long) strx_to_uint64_n_fails, | 3134 | (unsigned long) strx_to_uint64_n_fails, |
3144 | strx_to_uint64_n_fails == 1 ? "" : "s"); | 3135 | strx_to_uint64_n_fails == 1 ? "" : "s"); |
3145 | else if (verbose > 0) | 3136 | else if (verbose > 0) |
3146 | printf ( | 3137 | printf ("PASSED: function MHD_strx_to_uint64_n_() successfully " |
3147 | "PASSED: function MHD_strx_to_uint64_n_() successfully passed all checks.\n\n"); | 3138 | "passed all checks.\n\n"); |
3148 | 3139 | ||
3149 | if (str_to_uint64_fails || str_to_uint64_n_fails || | 3140 | if (str_to_uint64_fails || str_to_uint64_n_fails || |
3150 | strx_to_uint32_fails || strx_to_uint32_n_fails || | 3141 | strx_to_uint32_fails || strx_to_uint32_n_fails || |
@@ -4454,8 +4445,8 @@ run_str_from_X_tests (void) | |||
4454 | failures += str_from_uint16; | 4445 | failures += str_from_uint16; |
4455 | } | 4446 | } |
4456 | else if (verbose > 1) | 4447 | else if (verbose > 1) |
4457 | printf ( | 4448 | printf ("PASSED: testcase check_str_from_uint16() successfully " |
4458 | "PASSED: testcase check_str_from_uint16() successfully passed.\n\n"); | 4449 | "passed.\n\n"); |
4459 | 4450 | ||
4460 | str_from_uint64 = check_str_from_uint64 (); | 4451 | str_from_uint64 = check_str_from_uint64 (); |
4461 | if (str_from_uint64 != 0) | 4452 | if (str_from_uint64 != 0) |
@@ -4465,8 +4456,8 @@ run_str_from_X_tests (void) | |||
4465 | failures += str_from_uint64; | 4456 | failures += str_from_uint64; |
4466 | } | 4457 | } |
4467 | else if (verbose > 1) | 4458 | else if (verbose > 1) |
4468 | printf ( | 4459 | printf ("PASSED: testcase check_str_from_uint16() successfully " |
4469 | "PASSED: testcase check_str_from_uint16() successfully passed.\n\n"); | 4460 | "passed.\n\n"); |
4470 | strx_from_uint32 = check_strx_from_uint32 (); | 4461 | strx_from_uint32 = check_strx_from_uint32 (); |
4471 | if (strx_from_uint32 != 0) | 4462 | if (strx_from_uint32 != 0) |
4472 | { | 4463 | { |
@@ -4475,8 +4466,8 @@ run_str_from_X_tests (void) | |||
4475 | failures += strx_from_uint32; | 4466 | failures += strx_from_uint32; |
4476 | } | 4467 | } |
4477 | else if (verbose > 1) | 4468 | else if (verbose > 1) |
4478 | printf ( | 4469 | printf ("PASSED: testcase check_strx_from_uint32() successfully " |
4479 | "PASSED: testcase check_strx_from_uint32() successfully passed.\n\n"); | 4470 | "passed.\n\n"); |
4480 | 4471 | ||
4481 | str_from_uint8_pad = check_str_from_uint8_pad (); | 4472 | str_from_uint8_pad = check_str_from_uint8_pad (); |
4482 | if (str_from_uint8_pad != 0) | 4473 | if (str_from_uint8_pad != 0) |
@@ -4486,8 +4477,8 @@ run_str_from_X_tests (void) | |||
4486 | failures += str_from_uint8_pad; | 4477 | failures += str_from_uint8_pad; |
4487 | } | 4478 | } |
4488 | else if (verbose > 1) | 4479 | else if (verbose > 1) |
4489 | printf ( | 4480 | printf ("PASSED: testcase check_str_from_uint8_pad() successfully " |
4490 | "PASSED: testcase check_str_from_uint8_pad() successfully passed.\n\n"); | 4481 | "passed.\n\n"); |
4491 | 4482 | ||
4492 | if (failures) | 4483 | if (failures) |
4493 | { | 4484 | { |
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c index 5836db6b..49a17dbe 100644 --- a/src/microhttpd/test_upgrade.c +++ b/src/microhttpd/test_upgrade.c | |||
@@ -353,8 +353,8 @@ wr_create_tls_sckt (void) | |||
353 | { | 353 | { |
354 | if (GNUTLS_E_SUCCESS == gnutls_set_default_priority (s->tls_s)) | 354 | if (GNUTLS_E_SUCCESS == gnutls_set_default_priority (s->tls_s)) |
355 | { | 355 | { |
356 | if (GNUTLS_E_SUCCESS == gnutls_certificate_allocate_credentials ( | 356 | if (GNUTLS_E_SUCCESS == |
357 | &(s->tls_crd))) | 357 | gnutls_certificate_allocate_credentials (&(s->tls_crd))) |
358 | { | 358 | { |
359 | if (GNUTLS_E_SUCCESS == gnutls_credentials_set (s->tls_s, | 359 | if (GNUTLS_E_SUCCESS == gnutls_credentials_set (s->tls_s, |
360 | GNUTLS_CRD_CERTIFICATE, | 360 | GNUTLS_CRD_CERTIFICATE, |
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c index 6f2331fa..275434c8 100644 --- a/src/microhttpd/test_upgrade_large.c +++ b/src/microhttpd/test_upgrade_large.c | |||
@@ -519,8 +519,8 @@ wr_create_tls_sckt (void) | |||
519 | { | 519 | { |
520 | if (GNUTLS_E_SUCCESS == gnutls_set_default_priority (s->tls_s)) | 520 | if (GNUTLS_E_SUCCESS == gnutls_set_default_priority (s->tls_s)) |
521 | { | 521 | { |
522 | if (GNUTLS_E_SUCCESS == gnutls_certificate_allocate_credentials ( | 522 | if (GNUTLS_E_SUCCESS == |
523 | &(s->tls_crd))) | 523 | gnutls_certificate_allocate_credentials (&(s->tls_crd))) |
524 | { | 524 | { |
525 | if (GNUTLS_E_SUCCESS == gnutls_credentials_set (s->tls_s, | 525 | if (GNUTLS_E_SUCCESS == gnutls_credentials_set (s->tls_s, |
526 | GNUTLS_CRD_CERTIFICATE, | 526 | GNUTLS_CRD_CERTIFICATE, |
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c index f3c561fe..e23f1c4e 100644 --- a/src/testcurl/https/tls_test_common.c +++ b/src/testcurl/https/tls_test_common.c | |||
@@ -711,8 +711,8 @@ testsuite_curl_global_init (void) | |||
711 | res = curl_global_init (CURL_GLOBAL_ALL); | 711 | res = curl_global_init (CURL_GLOBAL_ALL); |
712 | if (CURLE_OK != res) | 712 | if (CURLE_OK != res) |
713 | { | 713 | { |
714 | fprintf (stderr, "libcurl initialisation error: %s\n", curl_easy_strerror ( | 714 | fprintf (stderr, "libcurl initialisation error: %s\n", |
715 | res)); | 715 | curl_easy_strerror (res)); |
716 | return 0; | 716 | return 0; |
717 | } | 717 | } |
718 | return 1; | 718 | return 1; |
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c index e7450d92..feaefed5 100644 --- a/src/testcurl/test_long_header.c +++ b/src/testcurl/test_long_header.c | |||
@@ -119,15 +119,15 @@ testLongUrlGet (size_t buff_size) | |||
119 | cbc.buf = buf; | 119 | cbc.buf = buf; |
120 | cbc.size = 2048; | 120 | cbc.size = 2048; |
121 | cbc.pos = 0; | 121 | cbc.pos = 0; |
122 | d = MHD_start_daemon ( | 122 | d = |
123 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 123 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
124 | port, | 124 | port, |
125 | &apc_all, | 125 | &apc_all, |
126 | NULL, | 126 | NULL, |
127 | &ahc_echo, | 127 | &ahc_echo, |
128 | "GET", | 128 | "GET", |
129 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 129 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
130 | (size_t) buff_size, MHD_OPTION_END); | 130 | (size_t) buff_size, MHD_OPTION_END); |
131 | if (d == NULL) | 131 | if (d == NULL) |
132 | return 1; | 132 | return 1; |
133 | if (0 == port) | 133 | if (0 == port) |
@@ -213,15 +213,15 @@ testLongHeaderGet (size_t buff_size) | |||
213 | cbc.buf = buf; | 213 | cbc.buf = buf; |
214 | cbc.size = 2048; | 214 | cbc.size = 2048; |
215 | cbc.pos = 0; | 215 | cbc.pos = 0; |
216 | d = MHD_start_daemon ( | 216 | d = |
217 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 217 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
218 | port, | 218 | port, |
219 | &apc_all, | 219 | &apc_all, |
220 | NULL, | 220 | NULL, |
221 | &ahc_echo, | 221 | &ahc_echo, |
222 | "GET", | 222 | "GET", |
223 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 223 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
224 | (size_t) buff_size, MHD_OPTION_END); | 224 | (size_t) buff_size, MHD_OPTION_END); |
225 | if (d == NULL) | 225 | if (d == NULL) |
226 | return 16; | 226 | return 16; |
227 | if (0 == port) | 227 | if (0 == port) |
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c index c3f4a0fb..313ab1da 100644 --- a/src/testzzuf/test_get.c +++ b/src/testzzuf/test_get.c | |||
@@ -116,9 +116,9 @@ testInternalGet () | |||
116 | cbc.buf = buf; | 116 | cbc.buf = buf; |
117 | cbc.size = 2048; | 117 | cbc.size = 2048; |
118 | cbc.pos = 0; | 118 | cbc.pos = 0; |
119 | d = MHD_start_daemon ( | 119 | d = |
120 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 120 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
121 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 121 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
122 | if (d == NULL) | 122 | if (d == NULL) |
123 | return 1; | 123 | return 1; |
124 | zzuf_socat_start (); | 124 | zzuf_socat_start (); |
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c index 491dab61..ff49cd5f 100644 --- a/src/testzzuf/test_get_chunked.c +++ b/src/testzzuf/test_get_chunked.c | |||
@@ -158,9 +158,9 @@ testInternalGet () | |||
158 | cbc.buf = buf; | 158 | cbc.buf = buf; |
159 | cbc.size = 2048; | 159 | cbc.size = 2048; |
160 | cbc.pos = 0; | 160 | cbc.pos = 0; |
161 | d = MHD_start_daemon ( | 161 | d = |
162 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 162 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
163 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 163 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
164 | if (d == NULL) | 164 | if (d == NULL) |
165 | return 1; | 165 | return 1; |
166 | zzuf_socat_start (); | 166 | zzuf_socat_start (); |
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c index f6a2d4a2..7213ee41 100644 --- a/src/testzzuf/test_long_header.c +++ b/src/testzzuf/test_long_header.c | |||
@@ -119,15 +119,15 @@ testLongUrlGet () | |||
119 | cbc.buf = buf; | 119 | cbc.buf = buf; |
120 | cbc.size = 2048; | 120 | cbc.size = 2048; |
121 | cbc.pos = 0; | 121 | cbc.pos = 0; |
122 | d = MHD_start_daemon ( | 122 | d = |
123 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 123 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
124 | 11080, | 124 | 11080, |
125 | &apc_all, | 125 | &apc_all, |
126 | NULL, | 126 | NULL, |
127 | &ahc_echo, | 127 | &ahc_echo, |
128 | "GET", | 128 | "GET", |
129 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 129 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
130 | (size_t) (VERY_LONG / 2), MHD_OPTION_END); | 130 | (size_t) (VERY_LONG / 2), MHD_OPTION_END); |
131 | 131 | ||
132 | if (d == NULL) | 132 | if (d == NULL) |
133 | return 1; | 133 | return 1; |
@@ -187,15 +187,15 @@ testLongHeaderGet () | |||
187 | cbc.buf = buf; | 187 | cbc.buf = buf; |
188 | cbc.size = 2048; | 188 | cbc.size = 2048; |
189 | cbc.pos = 0; | 189 | cbc.pos = 0; |
190 | d = MHD_start_daemon ( | 190 | d = |
191 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 191 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
192 | 11080, | 192 | 11080, |
193 | &apc_all, | 193 | &apc_all, |
194 | NULL, | 194 | NULL, |
195 | &ahc_echo, | 195 | &ahc_echo, |
196 | "GET", | 196 | "GET", |
197 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 197 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
198 | (size_t) (VERY_LONG / 2), MHD_OPTION_END); | 198 | (size_t) (VERY_LONG / 2), MHD_OPTION_END); |
199 | if (d == NULL) | 199 | if (d == NULL) |
200 | return 16; | 200 | return 16; |
201 | zzuf_socat_start (); | 201 | zzuf_socat_start (); |
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c index 0b184467..29a14ce8 100644 --- a/src/testzzuf/test_post.c +++ b/src/testzzuf/test_post.c | |||
@@ -172,11 +172,11 @@ testInternalPost () | |||
172 | cbc.buf = buf; | 172 | cbc.buf = buf; |
173 | cbc.size = 2048; | 173 | cbc.size = 2048; |
174 | cbc.pos = 0; | 174 | cbc.pos = 0; |
175 | d = MHD_start_daemon ( | 175 | d = |
176 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 176 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
177 | 11080, NULL, NULL, &ahc_echo, NULL, | 177 | 11080, NULL, NULL, &ahc_echo, NULL, |
178 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 178 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
179 | MHD_OPTION_END); | 179 | MHD_OPTION_END); |
180 | if (d == NULL) | 180 | if (d == NULL) |
181 | return 1; | 181 | return 1; |
182 | zzuf_socat_start (); | 182 | zzuf_socat_start (); |
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c index 9538f3ca..faeefb98 100644 --- a/src/testzzuf/test_post_form.c +++ b/src/testzzuf/test_post_form.c | |||
@@ -192,11 +192,11 @@ testInternalPost () | |||
192 | cbc.buf = buf; | 192 | cbc.buf = buf; |
193 | cbc.size = 2048; | 193 | cbc.size = 2048; |
194 | cbc.pos = 0; | 194 | cbc.pos = 0; |
195 | d = MHD_start_daemon ( | 195 | d = |
196 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 196 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
197 | 11080, NULL, NULL, &ahc_echo, NULL, | 197 | 11080, NULL, NULL, &ahc_echo, NULL, |
198 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 198 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
199 | MHD_OPTION_END); | 199 | MHD_OPTION_END); |
200 | if (d == NULL) | 200 | if (d == NULL) |
201 | return 1; | 201 | return 1; |
202 | zzuf_socat_start (); | 202 | zzuf_socat_start (); |
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c index ee6eee2a..eba9d1fa 100644 --- a/src/testzzuf/test_put.c +++ b/src/testzzuf/test_put.c | |||
@@ -141,10 +141,10 @@ testInternalPut () | |||
141 | cbc.buf = buf; | 141 | cbc.buf = buf; |
142 | cbc.size = 2048; | 142 | cbc.size = 2048; |
143 | cbc.pos = 0; | 143 | cbc.pos = 0; |
144 | d = MHD_start_daemon ( | 144 | d = |
145 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 145 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
146 | 11080, | 146 | 11080, |
147 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 147 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
148 | if (d == NULL) | 148 | if (d == NULL) |
149 | return 1; | 149 | return 1; |
150 | zzuf_socat_start (); | 150 | zzuf_socat_start (); |
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c index de70f12a..6da41473 100644 --- a/src/testzzuf/test_put_large.c +++ b/src/testzzuf/test_put_large.c | |||
@@ -155,10 +155,10 @@ testInternalPut () | |||
155 | cbc.buf = buf; | 155 | cbc.buf = buf; |
156 | cbc.size = 2048; | 156 | cbc.size = 2048; |
157 | cbc.pos = 0; | 157 | cbc.pos = 0; |
158 | d = MHD_start_daemon ( | 158 | d = |
159 | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, | 159 | MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_ERROR_LOG */, |
160 | 11080, | 160 | 11080, |
161 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 161 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
162 | if (d == NULL) | 162 | if (d == NULL) |
163 | return 1; | 163 | return 1; |
164 | zzuf_socat_start (); | 164 | zzuf_socat_start (); |