diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 1c0fcb7e..473a5fb4 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -448,7 +448,7 @@ MHD_ip_limit_add (struct MHD_Daemon *daemon, | |||
448 | { | 448 | { |
449 | #ifdef HAVE_MESSAGES | 449 | #ifdef HAVE_MESSAGES |
450 | MHD_DLOG (daemon, | 450 | MHD_DLOG (daemon, |
451 | _ ("Failed to add IP connection count node\n")); | 451 | _ ("Failed to add IP connection count node.\n")); |
452 | #endif | 452 | #endif |
453 | MHD_ip_count_unlock (daemon); | 453 | MHD_ip_count_unlock (daemon); |
454 | free (key); | 454 | free (key); |
@@ -506,13 +506,13 @@ MHD_ip_limit_del (struct MHD_Daemon *daemon, | |||
506 | { | 506 | { |
507 | /* Something's wrong if we couldn't find an IP address | 507 | /* Something's wrong if we couldn't find an IP address |
508 | * that was previously added */ | 508 | * that was previously added */ |
509 | MHD_PANIC (_ ("Failed to find previously-added IP address\n")); | 509 | MHD_PANIC (_ ("Failed to find previously-added IP address.\n")); |
510 | } | 510 | } |
511 | found_key = (struct MHD_IPCount *) *nodep; | 511 | found_key = (struct MHD_IPCount *) *nodep; |
512 | /* Validate existing count for IP address */ | 512 | /* Validate existing count for IP address */ |
513 | if (0 == found_key->count) | 513 | if (0 == found_key->count) |
514 | { | 514 | { |
515 | MHD_PANIC (_ ("Previously-added IP address had counter of zero\n")); | 515 | MHD_PANIC (_ ("Previously-added IP address had counter of zero.\n")); |
516 | } | 516 | } |
517 | /* Remove the node entirely if count reduces to 0 */ | 517 | /* Remove the node entirely if count reduces to 0 */ |
518 | if (0 == --found_key->count) | 518 | if (0 == --found_key->count) |
@@ -564,7 +564,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
564 | { | 564 | { |
565 | #ifdef HAVE_MESSAGES | 565 | #ifdef HAVE_MESSAGES |
566 | MHD_DLOG (daemon, | 566 | MHD_DLOG (daemon, |
567 | "Too long trust certificate\n"); | 567 | "Too long trust certificate.\n"); |
568 | #endif | 568 | #endif |
569 | return -1; | 569 | return -1; |
570 | } | 570 | } |
@@ -576,7 +576,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
576 | { | 576 | { |
577 | #ifdef HAVE_MESSAGES | 577 | #ifdef HAVE_MESSAGES |
578 | MHD_DLOG (daemon, | 578 | MHD_DLOG (daemon, |
579 | "Bad trust certificate format\n"); | 579 | "Bad trust certificate format.\n"); |
580 | #endif | 580 | #endif |
581 | return -1; | 581 | return -1; |
582 | } | 582 | } |
@@ -601,7 +601,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
601 | { | 601 | { |
602 | #ifdef HAVE_MESSAGES | 602 | #ifdef HAVE_MESSAGES |
603 | MHD_DLOG (daemon, | 603 | MHD_DLOG (daemon, |
604 | "Too long key or certificate\n"); | 604 | "Too long key or certificate.\n"); |
605 | #endif | 605 | #endif |
606 | return -1; | 606 | return -1; |
607 | } | 607 | } |
@@ -623,7 +623,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
623 | #ifdef HAVE_MESSAGES | 623 | #ifdef HAVE_MESSAGES |
624 | MHD_DLOG (daemon, | 624 | MHD_DLOG (daemon, |
625 | _ ("Failed to setup x509 certificate/key: pre 3.X.X version " \ | 625 | _ ("Failed to setup x509 certificate/key: pre 3.X.X version " \ |
626 | "of GnuTLS does not support setting key password")); | 626 | "of GnuTLS does not support setting key password.\n")); |
627 | #endif | 627 | #endif |
628 | return -1; | 628 | return -1; |
629 | #endif | 629 | #endif |
@@ -651,7 +651,7 @@ MHD_init_daemon_certificate (struct MHD_Daemon *daemon) | |||
651 | #endif | 651 | #endif |
652 | #ifdef HAVE_MESSAGES | 652 | #ifdef HAVE_MESSAGES |
653 | MHD_DLOG (daemon, | 653 | MHD_DLOG (daemon, |
654 | "You need to specify a certificate and key location\n"); | 654 | "You need to specify a certificate and key location.\n"); |
655 | #endif | 655 | #endif |
656 | return -1; | 656 | return -1; |
657 | } | 657 | } |
@@ -1370,7 +1370,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1370 | _ ( | 1370 | _ ( |
1371 | "Failed to forward to application " | 1371 | "Failed to forward to application " |
1372 | MHD_UNSIGNED_LONG_LONG_PRINTF \ | 1372 | MHD_UNSIGNED_LONG_LONG_PRINTF \ |
1373 | " bytes of data received from remote side: application shut down socket\n"), | 1373 | " bytes of data received from remote side: application shut down socket.\n"), |
1374 | (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used); | 1374 | (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used); |
1375 | #endif | 1375 | #endif |
1376 | 1376 | ||
@@ -1661,7 +1661,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh) | |||
1661 | _ ( | 1661 | _ ( |
1662 | "Failed to forward to remote client " | 1662 | "Failed to forward to remote client " |
1663 | MHD_UNSIGNED_LONG_LONG_PRINTF \ | 1663 | MHD_UNSIGNED_LONG_LONG_PRINTF \ |
1664 | " bytes of data received from application: daemon shut down\n"), | 1664 | " bytes of data received from application: daemon shut down.\n"), |
1665 | (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used); | 1665 | (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used); |
1666 | #endif | 1666 | #endif |
1667 | /* Discard any data unsent to remote. */ | 1667 | /* Discard any data unsent to remote. */ |
@@ -1727,7 +1727,7 @@ thread_main_connection_upgrade (struct MHD_Connection *con) | |||
1727 | { | 1727 | { |
1728 | #ifdef HAVE_MESSAGES | 1728 | #ifdef HAVE_MESSAGES |
1729 | MHD_DLOG (con->daemon, | 1729 | MHD_DLOG (con->daemon, |
1730 | _ ("Error preparing select\n")); | 1730 | _ ("Error preparing select.\n")); |
1731 | #endif | 1731 | #endif |
1732 | break; | 1732 | break; |
1733 | } | 1733 | } |
@@ -1899,7 +1899,7 @@ thread_main_handle_connection (void *data) | |||
1899 | { | 1899 | { |
1900 | #ifdef HAVE_MESSAGES | 1900 | #ifdef HAVE_MESSAGES |
1901 | MHD_DLOG (con->daemon, | 1901 | MHD_DLOG (con->daemon, |
1902 | _ ("Failed to add FD to fd_set\n")); | 1902 | _ ("Failed to add FD to fd_set.\n")); |
1903 | #endif | 1903 | #endif |
1904 | goto exit; | 1904 | goto exit; |
1905 | } | 1905 | } |
@@ -2041,7 +2041,7 @@ thread_main_handle_connection (void *data) | |||
2041 | { | 2041 | { |
2042 | #ifdef HAVE_MESSAGES | 2042 | #ifdef HAVE_MESSAGES |
2043 | MHD_DLOG (con->daemon, | 2043 | MHD_DLOG (con->daemon, |
2044 | _ ("Failed to add FD to fd_set\n")); | 2044 | _ ("Failed to add FD to fd_set.\n")); |
2045 | #endif | 2045 | #endif |
2046 | goto exit; | 2046 | goto exit; |
2047 | } | 2047 | } |
@@ -2181,7 +2181,7 @@ thread_main_handle_connection (void *data) | |||
2181 | #if DEBUG_CLOSE | 2181 | #if DEBUG_CLOSE |
2182 | #ifdef HAVE_MESSAGES | 2182 | #ifdef HAVE_MESSAGES |
2183 | MHD_DLOG (con->daemon, | 2183 | MHD_DLOG (con->daemon, |
2184 | _ ("Processing thread terminating. Closing connection\n")); | 2184 | _ ("Processing thread terminating. Closing connection.\n")); |
2185 | #endif | 2185 | #endif |
2186 | #endif | 2186 | #endif |
2187 | if (MHD_CONNECTION_CLOSED != con->state) | 2187 | if (MHD_CONNECTION_CLOSED != con->state) |
@@ -2211,7 +2211,7 @@ exit: | |||
2211 | #ifdef HAVE_MESSAGES | 2211 | #ifdef HAVE_MESSAGES |
2212 | MHD_DLOG (daemon, | 2212 | MHD_DLOG (daemon, |
2213 | _ ( | 2213 | _ ( |
2214 | "Failed to signal thread termination via inter-thread communication channel.")); | 2214 | "Failed to signal thread termination via inter-thread communication channel.\n")); |
2215 | #endif | 2215 | #endif |
2216 | } | 2216 | } |
2217 | return (MHD_THRD_RTRN_TYPE_) 0; | 2217 | return (MHD_THRD_RTRN_TYPE_) 0; |
@@ -2311,7 +2311,7 @@ psk_gnutls_adapter (gnutls_session_t session, | |||
2311 | #ifdef HAVE_MESSAGES | 2311 | #ifdef HAVE_MESSAGES |
2312 | MHD_DLOG (daemon, | 2312 | MHD_DLOG (daemon, |
2313 | _ ( | 2313 | _ ( |
2314 | "PSK authentication failed: gnutls_malloc failed to allocate memory\n")); | 2314 | "PSK authentication failed: gnutls_malloc failed to allocate memory.\n")); |
2315 | #endif | 2315 | #endif |
2316 | free (app_psk); | 2316 | free (app_psk); |
2317 | return -1; | 2317 | return -1; |
@@ -2320,7 +2320,7 @@ psk_gnutls_adapter (gnutls_session_t session, | |||
2320 | { | 2320 | { |
2321 | #ifdef HAVE_MESSAGES | 2321 | #ifdef HAVE_MESSAGES |
2322 | MHD_DLOG (daemon, | 2322 | MHD_DLOG (daemon, |
2323 | _ ("PSK authentication failed: PSK too long\n")); | 2323 | _ ("PSK authentication failed: PSK too long.\n")); |
2324 | #endif | 2324 | #endif |
2325 | free (app_psk); | 2325 | free (app_psk); |
2326 | return -1; | 2326 | return -1; |
@@ -2451,7 +2451,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2451 | #ifdef HAVE_MESSAGES | 2451 | #ifdef HAVE_MESSAGES |
2452 | #if DEBUG_CONNECT | 2452 | #if DEBUG_CONNECT |
2453 | MHD_DLOG (daemon, | 2453 | MHD_DLOG (daemon, |
2454 | _ ("Accepted connection on socket %d\n"), | 2454 | _ ("Accepted connection on socket %d.\n"), |
2455 | client_socket); | 2455 | client_socket); |
2456 | #endif | 2456 | #endif |
2457 | #endif | 2457 | #endif |
@@ -2614,7 +2614,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2614 | #ifdef HAVE_MESSAGES | 2614 | #ifdef HAVE_MESSAGES |
2615 | MHD_DLOG (connection->daemon, | 2615 | MHD_DLOG (connection->daemon, |
2616 | _ ( | 2616 | _ ( |
2617 | "Failed to setup TLS credentials: unknown credential type %d\n"), | 2617 | "Failed to setup TLS credentials: unknown credential type %d.\n"), |
2618 | daemon->cred_type); | 2618 | daemon->cred_type); |
2619 | #endif | 2619 | #endif |
2620 | MHD_socket_close_chk_ (client_socket); | 2620 | MHD_socket_close_chk_ (client_socket); |
@@ -2623,7 +2623,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2623 | addrlen); | 2623 | addrlen); |
2624 | free (connection->addr); | 2624 | free (connection->addr); |
2625 | free (connection); | 2625 | free (connection); |
2626 | MHD_PANIC (_ ("Unknown credential type")); | 2626 | MHD_PANIC (_ ("Unknown credential type.\n")); |
2627 | #if EINVAL | 2627 | #if EINVAL |
2628 | errno = EINVAL; | 2628 | errno = EINVAL; |
2629 | #endif | 2629 | #endif |
@@ -2753,7 +2753,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2753 | #ifdef HAVE_MESSAGES | 2753 | #ifdef HAVE_MESSAGES |
2754 | MHD_DLOG (daemon, | 2754 | MHD_DLOG (daemon, |
2755 | _ ( | 2755 | _ ( |
2756 | "Failed to signal new connection via inter-thread communication channel.")); | 2756 | "Failed to signal new connection via inter-thread communication channel.\n")); |
2757 | #endif | 2757 | #endif |
2758 | } | 2758 | } |
2759 | return MHD_YES; | 2759 | return MHD_YES; |
@@ -2858,7 +2858,7 @@ internal_suspend_connection_ (struct MHD_Connection *connection) | |||
2858 | EPOLL_CTL_DEL, | 2858 | EPOLL_CTL_DEL, |
2859 | connection->socket_fd, | 2859 | connection->socket_fd, |
2860 | NULL)) | 2860 | NULL)) |
2861 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 2861 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
2862 | connection->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; | 2862 | connection->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; |
2863 | } | 2863 | } |
2864 | connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED; | 2864 | connection->epoll_state |= MHD_EPOLL_STATE_SUSPENDED; |
@@ -2915,7 +2915,7 @@ MHD_suspend_connection (struct MHD_Connection *connection) | |||
2915 | #ifdef HAVE_MESSAGES | 2915 | #ifdef HAVE_MESSAGES |
2916 | MHD_DLOG (daemon, | 2916 | MHD_DLOG (daemon, |
2917 | _ ( | 2917 | _ ( |
2918 | "Error: connection scheduled for \"upgrade\" cannot be suspended")); | 2918 | "Error: connection scheduled for \"upgrade\" cannot be suspended.\n")); |
2919 | #endif /* HAVE_MESSAGES */ | 2919 | #endif /* HAVE_MESSAGES */ |
2920 | return; | 2920 | return; |
2921 | } | 2921 | } |
@@ -2954,7 +2954,7 @@ MHD_resume_connection (struct MHD_Connection *connection) | |||
2954 | #ifdef HAVE_MESSAGES | 2954 | #ifdef HAVE_MESSAGES |
2955 | MHD_DLOG (daemon, | 2955 | MHD_DLOG (daemon, |
2956 | _ ( | 2956 | _ ( |
2957 | "Failed to signal resume via inter-thread communication channel.")); | 2957 | "Failed to signal resume via inter-thread communication channel.\n")); |
2958 | #endif | 2958 | #endif |
2959 | } | 2959 | } |
2960 | } | 2960 | } |
@@ -3039,7 +3039,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
3039 | if (0 != (daemon->options & MHD_USE_EPOLL)) | 3039 | if (0 != (daemon->options & MHD_USE_EPOLL)) |
3040 | { | 3040 | { |
3041 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) | 3041 | if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)) |
3042 | MHD_PANIC ("Resumed connection was already in EREADY set\n"); | 3042 | MHD_PANIC ("Resumed connection was already in EREADY set.\n"); |
3043 | /* we always mark resumed connections as ready, as we | 3043 | /* we always mark resumed connections as ready, as we |
3044 | might have missed the edge poll event during suspension */ | 3044 | might have missed the edge poll event during suspension */ |
3045 | EDLL_insert (daemon->eready_head, | 3045 | EDLL_insert (daemon->eready_head, |
@@ -3089,7 +3089,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
3089 | #ifdef HAVE_MESSAGES | 3089 | #ifdef HAVE_MESSAGES |
3090 | MHD_DLOG (daemon, | 3090 | MHD_DLOG (daemon, |
3091 | _ ( | 3091 | _ ( |
3092 | "Failed to signal resume of connection via inter-thread communication channel.")); | 3092 | "Failed to signal resume of connection via inter-thread communication channel.\n")); |
3093 | #endif | 3093 | #endif |
3094 | } | 3094 | } |
3095 | } | 3095 | } |
@@ -3353,7 +3353,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
3353 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 3353 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
3354 | (! pos->thread_joined) && | 3354 | (! pos->thread_joined) && |
3355 | (! MHD_join_thread_ (pos->pid.handle)) ) | 3355 | (! MHD_join_thread_ (pos->pid.handle)) ) |
3356 | MHD_PANIC (_ ("Failed to join a thread\n")); | 3356 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
3357 | #endif | 3357 | #endif |
3358 | #ifdef UPGRADE_SUPPORT | 3358 | #ifdef UPGRADE_SUPPORT |
3359 | cleanup_upgraded_connection (pos); | 3359 | cleanup_upgraded_connection (pos); |
@@ -3395,7 +3395,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
3395 | EPOLL_CTL_DEL, | 3395 | EPOLL_CTL_DEL, |
3396 | pos->socket_fd, | 3396 | pos->socket_fd, |
3397 | NULL)) | 3397 | NULL)) |
3398 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 3398 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
3399 | pos->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; | 3399 | pos->epoll_state &= ~MHD_EPOLL_STATE_IN_EPOLL_SET; |
3400 | } | 3400 | } |
3401 | } | 3401 | } |
@@ -3456,7 +3456,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon, | |||
3456 | { | 3456 | { |
3457 | #ifdef HAVE_MESSAGES | 3457 | #ifdef HAVE_MESSAGES |
3458 | MHD_DLOG (daemon, | 3458 | MHD_DLOG (daemon, |
3459 | _ ("Illegal call to MHD_get_timeout\n")); | 3459 | _ ("Illegal call to MHD_get_timeout.\n")); |
3460 | #endif | 3460 | #endif |
3461 | return MHD_NO; | 3461 | return MHD_NO; |
3462 | } | 3462 | } |
@@ -3733,7 +3733,7 @@ MHD_select (struct MHD_Daemon *daemon, | |||
3733 | { | 3733 | { |
3734 | #ifdef HAVE_MESSAGES | 3734 | #ifdef HAVE_MESSAGES |
3735 | MHD_DLOG (daemon, | 3735 | MHD_DLOG (daemon, |
3736 | _ ("Could not obtain daemon fdsets")); | 3736 | _ ("Could not obtain daemon fdsets.\n")); |
3737 | #endif | 3737 | #endif |
3738 | err_state = MHD_YES; | 3738 | err_state = MHD_YES; |
3739 | } | 3739 | } |
@@ -3750,7 +3750,7 @@ MHD_select (struct MHD_Daemon *daemon, | |||
3750 | { | 3750 | { |
3751 | #ifdef HAVE_MESSAGES | 3751 | #ifdef HAVE_MESSAGES |
3752 | MHD_DLOG (daemon, | 3752 | MHD_DLOG (daemon, |
3753 | _ ("Could not add listen socket to fdset")); | 3753 | _ ("Could not add listen socket to fdset.\n")); |
3754 | #endif | 3754 | #endif |
3755 | return MHD_NO; | 3755 | return MHD_NO; |
3756 | } | 3756 | } |
@@ -3779,7 +3779,7 @@ MHD_select (struct MHD_Daemon *daemon, | |||
3779 | #ifdef HAVE_MESSAGES | 3779 | #ifdef HAVE_MESSAGES |
3780 | MHD_DLOG (daemon, | 3780 | MHD_DLOG (daemon, |
3781 | _ ( | 3781 | _ ( |
3782 | "Could not add control inter-thread communication channel FD to fdset")); | 3782 | "Could not add control inter-thread communication channel FD to fdset.\n")); |
3783 | #endif | 3783 | #endif |
3784 | err_state = MHD_YES; | 3784 | err_state = MHD_YES; |
3785 | #if defined(MHD_WINSOCK_SOCKETS) | 3785 | #if defined(MHD_WINSOCK_SOCKETS) |
@@ -4412,7 +4412,7 @@ MHD_epoll (struct MHD_Daemon *daemon, | |||
4412 | NULL)) && | 4412 | NULL)) && |
4413 | (ENOENT != errno) ) /* ENOENT can happen due to race with | 4413 | (ENOENT != errno) ) /* ENOENT can happen due to race with |
4414 | #MHD_quiesce_daemon() */ | 4414 | #MHD_quiesce_daemon() */ |
4415 | MHD_PANIC ("Failed to remove listen FD from epoll set\n"); | 4415 | MHD_PANIC ("Failed to remove listen FD from epoll set.\n"); |
4416 | daemon->listen_socket_in_epoll = false; | 4416 | daemon->listen_socket_in_epoll = false; |
4417 | } | 4417 | } |
4418 | 4418 | ||
@@ -4448,7 +4448,7 @@ MHD_epoll (struct MHD_Daemon *daemon, | |||
4448 | EPOLL_CTL_DEL, | 4448 | EPOLL_CTL_DEL, |
4449 | ls, | 4449 | ls, |
4450 | NULL)) | 4450 | NULL)) |
4451 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set\n")); | 4451 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set.\n")); |
4452 | daemon->listen_socket_in_epoll = false; | 4452 | daemon->listen_socket_in_epoll = false; |
4453 | } | 4453 | } |
4454 | 4454 | ||
@@ -4890,7 +4890,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4890 | { | 4890 | { |
4891 | #ifdef HAVE_MESSAGES | 4891 | #ifdef HAVE_MESSAGES |
4892 | MHD_DLOG (daemon, | 4892 | MHD_DLOG (daemon, |
4893 | "Using MHD_quiesce_daemon in this mode requires MHD_USE_ITC\n"); | 4893 | "Using MHD_quiesce_daemon in this mode requires MHD_USE_ITC.\n"); |
4894 | #endif | 4894 | #endif |
4895 | return MHD_INVALID_SOCKET; | 4895 | return MHD_INVALID_SOCKET; |
4896 | } | 4896 | } |
@@ -4909,7 +4909,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4909 | EPOLL_CTL_DEL, | 4909 | EPOLL_CTL_DEL, |
4910 | ret, | 4910 | ret, |
4911 | NULL)) | 4911 | NULL)) |
4912 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set\n")); | 4912 | MHD_PANIC (_ ("Failed to remove listen FD from epoll set.\n")); |
4913 | daemon->worker_pool[i].listen_socket_in_epoll = false; | 4913 | daemon->worker_pool[i].listen_socket_in_epoll = false; |
4914 | } | 4914 | } |
4915 | else | 4915 | else |
@@ -4918,7 +4918,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4918 | { | 4918 | { |
4919 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, "q")) | 4919 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, "q")) |
4920 | MHD_PANIC (_ ( | 4920 | MHD_PANIC (_ ( |
4921 | "Failed to signal quiesce via inter-thread communication channel")); | 4921 | "Failed to signal quiesce via inter-thread communication channel.\n")); |
4922 | } | 4922 | } |
4923 | } | 4923 | } |
4924 | #endif | 4924 | #endif |
@@ -4934,14 +4934,14 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4934 | NULL)) && | 4934 | NULL)) && |
4935 | (ENOENT != errno) ) /* ENOENT can happen due to race with | 4935 | (ENOENT != errno) ) /* ENOENT can happen due to race with |
4936 | #MHD_epoll() */ | 4936 | #MHD_epoll() */ |
4937 | MHD_PANIC ("Failed to remove listen FD from epoll set\n"); | 4937 | MHD_PANIC ("Failed to remove listen FD from epoll set.\n"); |
4938 | daemon->listen_socket_in_epoll = false; | 4938 | daemon->listen_socket_in_epoll = false; |
4939 | } | 4939 | } |
4940 | #endif | 4940 | #endif |
4941 | if ( (MHD_ITC_IS_VALID_ (daemon->itc)) && | 4941 | if ( (MHD_ITC_IS_VALID_ (daemon->itc)) && |
4942 | (! MHD_itc_activate_ (daemon->itc, "q")) ) | 4942 | (! MHD_itc_activate_ (daemon->itc, "q")) ) |
4943 | MHD_PANIC (_ ( | 4943 | MHD_PANIC (_ ( |
4944 | "failed to signal quiesce via inter-thread communication channel")); | 4944 | "failed to signal quiesce via inter-thread communication channel.\n")); |
4945 | return ret; | 4945 | return ret; |
4946 | } | 4946 | } |
4947 | 4947 | ||
@@ -5122,7 +5122,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5122 | { | 5122 | { |
5123 | #ifdef HAVE_MESSAGES | 5123 | #ifdef HAVE_MESSAGES |
5124 | MHD_DLOG (daemon, | 5124 | MHD_DLOG (daemon, |
5125 | _ ("Specified thread pool size (%u) too big\n"), | 5125 | _ ("Specified thread pool size (%u) too big.\n"), |
5126 | daemon->worker_pool_size); | 5126 | daemon->worker_pool_size); |
5127 | #endif | 5127 | #endif |
5128 | return MHD_NO; | 5128 | return MHD_NO; |
@@ -5160,7 +5160,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5160 | else | 5160 | else |
5161 | MHD_DLOG (daemon, | 5161 | MHD_DLOG (daemon, |
5162 | _ ( | 5162 | _ ( |
5163 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5163 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5164 | opt); | 5164 | opt); |
5165 | #endif | 5165 | #endif |
5166 | break; | 5166 | break; |
@@ -5173,7 +5173,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5173 | else | 5173 | else |
5174 | MHD_DLOG (daemon, | 5174 | MHD_DLOG (daemon, |
5175 | _ ( | 5175 | _ ( |
5176 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5176 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5177 | opt); | 5177 | opt); |
5178 | #endif | 5178 | #endif |
5179 | break; | 5179 | break; |
@@ -5186,7 +5186,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5186 | else | 5186 | else |
5187 | MHD_DLOG (daemon, | 5187 | MHD_DLOG (daemon, |
5188 | _ ( | 5188 | _ ( |
5189 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5189 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5190 | opt); | 5190 | opt); |
5191 | #endif | 5191 | #endif |
5192 | break; | 5192 | break; |
@@ -5199,7 +5199,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5199 | else | 5199 | else |
5200 | MHD_DLOG (daemon, | 5200 | MHD_DLOG (daemon, |
5201 | _ ( | 5201 | _ ( |
5202 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5202 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5203 | opt); | 5203 | opt); |
5204 | #endif | 5204 | #endif |
5205 | break; | 5205 | break; |
@@ -5219,7 +5219,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5219 | { | 5219 | { |
5220 | #ifdef HAVE_MESSAGES | 5220 | #ifdef HAVE_MESSAGES |
5221 | MHD_DLOG (daemon, | 5221 | MHD_DLOG (daemon, |
5222 | _ ("Error initializing DH parameters\n")); | 5222 | _ ("Error initializing DH parameters.\n")); |
5223 | #endif | 5223 | #endif |
5224 | return MHD_NO; | 5224 | return MHD_NO; |
5225 | } | 5225 | } |
@@ -5229,7 +5229,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5229 | { | 5229 | { |
5230 | #ifdef HAVE_MESSAGES | 5230 | #ifdef HAVE_MESSAGES |
5231 | MHD_DLOG (daemon, | 5231 | MHD_DLOG (daemon, |
5232 | _ ("Diffie-Hellman parameters string too long\n")); | 5232 | _ ("Diffie-Hellman parameters string too long.\n")); |
5233 | #endif | 5233 | #endif |
5234 | return MHD_NO; | 5234 | return MHD_NO; |
5235 | } | 5235 | } |
@@ -5240,7 +5240,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5240 | { | 5240 | { |
5241 | #ifdef HAVE_MESSAGES | 5241 | #ifdef HAVE_MESSAGES |
5242 | MHD_DLOG (daemon, | 5242 | MHD_DLOG (daemon, |
5243 | _ ("Bad Diffie-Hellman parameters format\n")); | 5243 | _ ("Bad Diffie-Hellman parameters format.\n")); |
5244 | #endif | 5244 | #endif |
5245 | gnutls_dh_params_deinit (daemon->https_mem_dhparams); | 5245 | gnutls_dh_params_deinit (daemon->https_mem_dhparams); |
5246 | return MHD_NO; | 5246 | return MHD_NO; |
@@ -5251,7 +5251,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5251 | else | 5251 | else |
5252 | MHD_DLOG (daemon, | 5252 | MHD_DLOG (daemon, |
5253 | _ ( | 5253 | _ ( |
5254 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5254 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5255 | opt); | 5255 | opt); |
5256 | #endif | 5256 | #endif |
5257 | break; | 5257 | break; |
@@ -5280,7 +5280,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5280 | else | 5280 | else |
5281 | MHD_DLOG (daemon, | 5281 | MHD_DLOG (daemon, |
5282 | _ ( | 5282 | _ ( |
5283 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5283 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5284 | opt); | 5284 | opt); |
5285 | #endif | 5285 | #endif |
5286 | break; | 5286 | break; |
@@ -5289,7 +5289,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5289 | #ifdef HAVE_MESSAGES | 5289 | #ifdef HAVE_MESSAGES |
5290 | MHD_DLOG (daemon, | 5290 | MHD_DLOG (daemon, |
5291 | _ ( | 5291 | _ ( |
5292 | "MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0\n")); | 5292 | "MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0.\n")); |
5293 | #endif | 5293 | #endif |
5294 | return MHD_NO; | 5294 | return MHD_NO; |
5295 | #else | 5295 | #else |
@@ -5301,7 +5301,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5301 | #ifdef HAVE_MESSAGES | 5301 | #ifdef HAVE_MESSAGES |
5302 | MHD_DLOG (daemon, | 5302 | MHD_DLOG (daemon, |
5303 | _ ( | 5303 | _ ( |
5304 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5304 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5305 | opt); | 5305 | opt); |
5306 | #endif | 5306 | #endif |
5307 | break; | 5307 | break; |
@@ -5311,7 +5311,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5311 | #ifdef HAVE_MESSAGES | 5311 | #ifdef HAVE_MESSAGES |
5312 | MHD_DLOG (daemon, | 5312 | MHD_DLOG (daemon, |
5313 | _ ( | 5313 | _ ( |
5314 | "MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3\n")); | 5314 | "MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3.\n")); |
5315 | #endif | 5315 | #endif |
5316 | return MHD_NO; | 5316 | return MHD_NO; |
5317 | #else | 5317 | #else |
@@ -5323,7 +5323,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5323 | #ifdef HAVE_MESSAGES | 5323 | #ifdef HAVE_MESSAGES |
5324 | MHD_DLOG (daemon, | 5324 | MHD_DLOG (daemon, |
5325 | _ ( | 5325 | _ ( |
5326 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n"), | 5326 | "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"), |
5327 | opt); | 5327 | opt); |
5328 | #endif | 5328 | #endif |
5329 | break; | 5329 | break; |
@@ -5382,7 +5382,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5382 | #else /* ! TCP_FASTOPEN */ | 5382 | #else /* ! TCP_FASTOPEN */ |
5383 | #ifdef HAVE_MESSAGES | 5383 | #ifdef HAVE_MESSAGES |
5384 | MHD_DLOG (daemon, | 5384 | MHD_DLOG (daemon, |
5385 | _ ("TCP fastopen is not supported on this platform\n")); | 5385 | _ ("TCP fastopen is not supported on this platform.\n")); |
5386 | return MHD_NO; | 5386 | return MHD_NO; |
5387 | #endif /* HAVE_MESSAGES */ | 5387 | #endif /* HAVE_MESSAGES */ |
5388 | #endif /* ! TCP_FASTOPEN */ | 5388 | #endif /* ! TCP_FASTOPEN */ |
@@ -5536,7 +5536,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5536 | #else | 5536 | #else |
5537 | MHD_DLOG (daemon, | 5537 | MHD_DLOG (daemon, |
5538 | _ ( | 5538 | _ ( |
5539 | "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3\n"), | 5539 | "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3.\n"), |
5540 | opt); | 5540 | opt); |
5541 | return MHD_NO; | 5541 | return MHD_NO; |
5542 | #endif | 5542 | #endif |
@@ -5550,14 +5550,14 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5550 | { | 5550 | { |
5551 | MHD_DLOG (daemon, | 5551 | MHD_DLOG (daemon, |
5552 | _ ( | 5552 | _ ( |
5553 | "MHD HTTPS option %d passed to MHD compiled without HTTPS support\n"), | 5553 | "MHD HTTPS option %d passed to MHD compiled without HTTPS support.\n"), |
5554 | opt); | 5554 | opt); |
5555 | } | 5555 | } |
5556 | else | 5556 | else |
5557 | { | 5557 | { |
5558 | MHD_DLOG (daemon, | 5558 | MHD_DLOG (daemon, |
5559 | _ ( | 5559 | _ ( |
5560 | "Invalid option %d! (Did you terminate the list with MHD_OPTION_END?)\n"), | 5560 | "Invalid option %d! (Did you terminate the list with MHD_OPTION_END?).\n"), |
5561 | opt); | 5561 | opt); |
5562 | } | 5562 | } |
5563 | #endif | 5563 | #endif |
@@ -5928,7 +5928,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5928 | #ifdef HAVE_MESSAGES | 5928 | #ifdef HAVE_MESSAGES |
5929 | MHD_DLOG (daemon, | 5929 | MHD_DLOG (daemon, |
5930 | _ ( | 5930 | _ ( |
5931 | "file descriptor for inter-thread communication channel exceeds maximum value\n")); | 5931 | "file descriptor for inter-thread communication channel exceeds maximum value.\n")); |
5932 | #endif | 5932 | #endif |
5933 | MHD_itc_destroy_chk_ (daemon->itc); | 5933 | MHD_itc_destroy_chk_ (daemon->itc); |
5934 | #ifdef HTTPS_SUPPORT | 5934 | #ifdef HTTPS_SUPPORT |
@@ -5948,7 +5948,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5948 | { | 5948 | { |
5949 | #ifdef HAVE_MESSAGES | 5949 | #ifdef HAVE_MESSAGES |
5950 | MHD_DLOG (daemon, | 5950 | MHD_DLOG (daemon, |
5951 | _ ("Specified value for NC_SIZE too large\n")); | 5951 | _ ("Specified value for NC_SIZE too large.\n")); |
5952 | #endif | 5952 | #endif |
5953 | #ifdef HTTPS_SUPPORT | 5953 | #ifdef HTTPS_SUPPORT |
5954 | if (0 != (*pflags & MHD_USE_TLS)) | 5954 | if (0 != (*pflags & MHD_USE_TLS)) |
@@ -5979,7 +5979,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5979 | { | 5979 | { |
5980 | #ifdef HAVE_MESSAGES | 5980 | #ifdef HAVE_MESSAGES |
5981 | MHD_DLOG (daemon, | 5981 | MHD_DLOG (daemon, |
5982 | _ ("MHD failed to initialize nonce-nc mutex\n")); | 5982 | _ ("MHD failed to initialize nonce-nc mutex.\n")); |
5983 | #endif | 5983 | #endif |
5984 | #ifdef HTTPS_SUPPORT | 5984 | #ifdef HTTPS_SUPPORT |
5985 | if (0 != (*pflags & MHD_USE_TLS)) | 5985 | if (0 != (*pflags & MHD_USE_TLS)) |
@@ -6000,7 +6000,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6000 | #ifdef HAVE_MESSAGES | 6000 | #ifdef HAVE_MESSAGES |
6001 | MHD_DLOG (daemon, | 6001 | MHD_DLOG (daemon, |
6002 | _ ( | 6002 | _ ( |
6003 | "MHD thread polling only works with MHD_USE_INTERNAL_POLLING_THREAD\n")); | 6003 | "MHD thread polling only works with MHD_USE_INTERNAL_POLLING_THREAD.\n")); |
6004 | #endif | 6004 | #endif |
6005 | goto free_and_fail; | 6005 | goto free_and_fail; |
6006 | } | 6006 | } |
@@ -6098,7 +6098,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6098 | #ifdef HAVE_MESSAGES | 6098 | #ifdef HAVE_MESSAGES |
6099 | MHD_DLOG (daemon, | 6099 | MHD_DLOG (daemon, |
6100 | _ ( | 6100 | _ ( |
6101 | "Cannot allow listening address reuse: SO_REUSEPORT not defined\n")); | 6101 | "Cannot allow listening address reuse: SO_REUSEPORT not defined.\n")); |
6102 | #endif | 6102 | #endif |
6103 | goto free_and_fail; | 6103 | goto free_and_fail; |
6104 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ | 6104 | #endif /* !MHD_WINSOCK_SOCKETS && !SO_REUSEPORT */ |
@@ -6134,7 +6134,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6134 | #ifdef HAVE_MESSAGES | 6134 | #ifdef HAVE_MESSAGES |
6135 | MHD_DLOG (daemon, | 6135 | MHD_DLOG (daemon, |
6136 | _ ( | 6136 | _ ( |
6137 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined\n")); | 6137 | "Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined.\n")); |
6138 | #endif | 6138 | #endif |
6139 | goto free_and_fail; | 6139 | goto free_and_fail; |
6140 | #endif /* MHD_WINSOCK_SOCKETS */ | 6140 | #endif /* MHD_WINSOCK_SOCKETS */ |
@@ -6287,7 +6287,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6287 | #ifdef HAVE_MESSAGES | 6287 | #ifdef HAVE_MESSAGES |
6288 | MHD_DLOG (daemon, | 6288 | MHD_DLOG (daemon, |
6289 | _ ( | 6289 | _ ( |
6290 | "Failed to get listen port number (`struct sockaddr_storage` too small!?)\n")); | 6290 | "Failed to get listen port number (`struct sockaddr_storage` too small!?).\n")); |
6291 | #endif /* HAVE_MESSAGES */ | 6291 | #endif /* HAVE_MESSAGES */ |
6292 | } | 6292 | } |
6293 | #ifndef __linux__ | 6293 | #ifndef __linux__ |
@@ -6398,7 +6398,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6398 | { | 6398 | { |
6399 | #ifdef HAVE_MESSAGES | 6399 | #ifdef HAVE_MESSAGES |
6400 | MHD_DLOG (daemon, | 6400 | MHD_DLOG (daemon, |
6401 | _ ("MHD failed to initialize IP connection limit mutex\n")); | 6401 | _ ("MHD failed to initialize IP connection limit mutex.\n")); |
6402 | #endif | 6402 | #endif |
6403 | if (MHD_INVALID_SOCKET != listen_fd) | 6403 | if (MHD_INVALID_SOCKET != listen_fd) |
6404 | MHD_socket_close_chk_ (listen_fd); | 6404 | MHD_socket_close_chk_ (listen_fd); |
@@ -6408,7 +6408,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6408 | { | 6408 | { |
6409 | #ifdef HAVE_MESSAGES | 6409 | #ifdef HAVE_MESSAGES |
6410 | MHD_DLOG (daemon, | 6410 | MHD_DLOG (daemon, |
6411 | _ ("MHD failed to initialize IP connection limit mutex\n")); | 6411 | _ ("MHD failed to initialize IP connection limit mutex.\n")); |
6412 | #endif | 6412 | #endif |
6413 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 6413 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
6414 | MHD_mutex_destroy_chk_ (&daemon->cleanup_connection_mutex); | 6414 | MHD_mutex_destroy_chk_ (&daemon->cleanup_connection_mutex); |
@@ -6426,7 +6426,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6426 | { | 6426 | { |
6427 | #ifdef HAVE_MESSAGES | 6427 | #ifdef HAVE_MESSAGES |
6428 | MHD_DLOG (daemon, | 6428 | MHD_DLOG (daemon, |
6429 | _ ("Failed to initialize TLS support\n")); | 6429 | _ ("Failed to initialize TLS support.\n")); |
6430 | #endif | 6430 | #endif |
6431 | if (MHD_INVALID_SOCKET != listen_fd) | 6431 | if (MHD_INVALID_SOCKET != listen_fd) |
6432 | MHD_socket_close_chk_ (listen_fd); | 6432 | MHD_socket_close_chk_ (listen_fd); |
@@ -6514,7 +6514,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6514 | #ifdef HAVE_MESSAGES | 6514 | #ifdef HAVE_MESSAGES |
6515 | MHD_DLOG (daemon, | 6515 | MHD_DLOG (daemon, |
6516 | _ ( | 6516 | _ ( |
6517 | "File descriptor for worker inter-thread communication channel exceeds maximum value\n")); | 6517 | "File descriptor for worker inter-thread communication channel exceeds maximum value.\n")); |
6518 | #endif | 6518 | #endif |
6519 | MHD_itc_destroy_chk_ (d->itc); | 6519 | MHD_itc_destroy_chk_ (d->itc); |
6520 | goto thread_failed; | 6520 | goto thread_failed; |
@@ -6539,7 +6539,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6539 | { | 6539 | { |
6540 | #ifdef HAVE_MESSAGES | 6540 | #ifdef HAVE_MESSAGES |
6541 | MHD_DLOG (daemon, | 6541 | MHD_DLOG (daemon, |
6542 | _ ("MHD failed to initialize cleanup connection mutex\n")); | 6542 | _ ("MHD failed to initialize cleanup connection mutex.\n")); |
6543 | #endif | 6543 | #endif |
6544 | goto thread_failed; | 6544 | goto thread_failed; |
6545 | } | 6545 | } |
@@ -6609,7 +6609,7 @@ free_and_fail: | |||
6609 | EPOLL_CTL_DEL, | 6609 | EPOLL_CTL_DEL, |
6610 | daemon->epoll_upgrade_fd, | 6610 | daemon->epoll_upgrade_fd, |
6611 | NULL)) | 6611 | NULL)) |
6612 | MHD_PANIC (_ ("Failed to remove FD from epoll set\n")); | 6612 | MHD_PANIC (_ ("Failed to remove FD from epoll set.\n")); |
6613 | daemon->upgrade_fd_in_epoll = false; | 6613 | daemon->upgrade_fd_in_epoll = false; |
6614 | } | 6614 | } |
6615 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 6615 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
@@ -6751,7 +6751,7 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
6751 | (MHD_ITC_IS_VALID_ (daemon->itc)) && | 6751 | (MHD_ITC_IS_VALID_ (daemon->itc)) && |
6752 | (! MHD_itc_activate_ (daemon->itc, "e")) ) | 6752 | (! MHD_itc_activate_ (daemon->itc, "e")) ) |
6753 | MHD_PANIC (_ ( | 6753 | MHD_PANIC (_ ( |
6754 | "Failed to signal shutdown via inter-thread communication channel")); | 6754 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
6755 | #endif | 6755 | #endif |
6756 | } | 6756 | } |
6757 | 6757 | ||
@@ -6766,7 +6766,7 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
6766 | { | 6766 | { |
6767 | MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); | 6767 | MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); |
6768 | if (! MHD_join_thread_ (pos->pid.handle)) | 6768 | if (! MHD_join_thread_ (pos->pid.handle)) |
6769 | MHD_PANIC (_ ("Failed to join a thread\n")); | 6769 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
6770 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); | 6770 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); |
6771 | pos->thread_joined = true; | 6771 | pos->thread_joined = true; |
6772 | /* The thread may have concurrently modified the DLL, | 6772 | /* The thread may have concurrently modified the DLL, |
@@ -6798,7 +6798,7 @@ close_all_connections (struct MHD_Daemon *daemon) | |||
6798 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 6798 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
6799 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 6799 | if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
6800 | (! pos->thread_joined) ) | 6800 | (! pos->thread_joined) ) |
6801 | MHD_PANIC (_ ("Failed to join a thread\n")); | 6801 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
6802 | #endif | 6802 | #endif |
6803 | close_connection (pos); | 6803 | close_connection (pos); |
6804 | } | 6804 | } |
@@ -6844,7 +6844,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
6844 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, | 6844 | if (! MHD_itc_activate_ (daemon->worker_pool[i].itc, |
6845 | "e")) | 6845 | "e")) |
6846 | MHD_PANIC (_ ( | 6846 | MHD_PANIC (_ ( |
6847 | "Failed to signal shutdown via inter-thread communication channel.")); | 6847 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
6848 | } | 6848 | } |
6849 | else | 6849 | else |
6850 | mhd_assert (MHD_INVALID_SOCKET != fd); | 6850 | mhd_assert (MHD_INVALID_SOCKET != fd); |
@@ -6882,7 +6882,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
6882 | if (! MHD_itc_activate_ (daemon->itc, | 6882 | if (! MHD_itc_activate_ (daemon->itc, |
6883 | "e")) | 6883 | "e")) |
6884 | MHD_PANIC (_ ( | 6884 | MHD_PANIC (_ ( |
6885 | "Failed to signal shutdown via inter-thread communication channel")); | 6885 | "Failed to signal shutdown via inter-thread communication channel.\n")); |
6886 | } | 6886 | } |
6887 | else | 6887 | else |
6888 | { | 6888 | { |
@@ -6900,7 +6900,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
6900 | 6900 | ||
6901 | if (! MHD_join_thread_ (daemon->pid.handle)) | 6901 | if (! MHD_join_thread_ (daemon->pid.handle)) |
6902 | { | 6902 | { |
6903 | MHD_PANIC (_ ("Failed to join a thread\n")); | 6903 | MHD_PANIC (_ ("Failed to join a thread.\n")); |
6904 | } | 6904 | } |
6905 | /* close_all_connections() was called in daemon thread. */ | 6905 | /* close_all_connections() was called in daemon thread. */ |
6906 | } | 6906 | } |
@@ -7320,10 +7320,10 @@ MHD_init (void) | |||
7320 | 7320 | ||
7321 | #if defined(MHD_WINSOCK_SOCKETS) | 7321 | #if defined(MHD_WINSOCK_SOCKETS) |
7322 | if (0 != WSAStartup (MAKEWORD (2, 2), &wsd)) | 7322 | if (0 != WSAStartup (MAKEWORD (2, 2), &wsd)) |
7323 | MHD_PANIC (_ ("Failed to initialize winsock\n")); | 7323 | MHD_PANIC (_ ("Failed to initialize winsock.\n")); |
7324 | mhd_winsock_inited_ = 1; | 7324 | mhd_winsock_inited_ = 1; |
7325 | if ((2 != LOBYTE (wsd.wVersion)) && (2 != HIBYTE (wsd.wVersion))) | 7325 | if ((2 != LOBYTE (wsd.wVersion)) && (2 != HIBYTE (wsd.wVersion))) |
7326 | MHD_PANIC (_ ("Winsock version 2.2 is not available\n")); | 7326 | MHD_PANIC (_ ("Winsock version 2.2 is not available.\n")); |
7327 | #endif /* MHD_WINSOCK_SOCKETS */ | 7327 | #endif /* MHD_WINSOCK_SOCKETS */ |
7328 | #ifdef HTTPS_SUPPORT | 7328 | #ifdef HTTPS_SUPPORT |
7329 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 7329 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
@@ -7331,17 +7331,17 @@ MHD_init (void) | |||
7331 | #if defined(MHD_USE_POSIX_THREADS) | 7331 | #if defined(MHD_USE_POSIX_THREADS) |
7332 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, | 7332 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, |
7333 | &gcry_threads_pthread)) | 7333 | &gcry_threads_pthread)) |
7334 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt\n")); | 7334 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); |
7335 | #elif defined(MHD_W32_MUTEX_) | 7335 | #elif defined(MHD_W32_MUTEX_) |
7336 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, | 7336 | if (0 != gcry_control (GCRYCTL_SET_THREAD_CBS, |
7337 | &gcry_threads_w32)) | 7337 | &gcry_threads_w32)) |
7338 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt\n")); | 7338 | MHD_PANIC (_ ("Failed to initialise multithreading in libgcrypt.\n")); |
7339 | #endif /* defined(MHD_W32_MUTEX_) */ | 7339 | #endif /* defined(MHD_W32_MUTEX_) */ |
7340 | gcry_check_version (NULL); | 7340 | gcry_check_version (NULL); |
7341 | #else | 7341 | #else |
7342 | if (NULL == gcry_check_version ("1.6.0")) | 7342 | if (NULL == gcry_check_version ("1.6.0")) |
7343 | MHD_PANIC (_ ( | 7343 | MHD_PANIC (_ ( |
7344 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer\n")); | 7344 | "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n")); |
7345 | #endif | 7345 | #endif |
7346 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 7346 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
7347 | gnutls_global_init (); | 7347 | gnutls_global_init (); |