diff options
Diffstat (limited to 'src/microhttpd/test_upgrade.c')
-rw-r--r-- | src/microhttpd/test_upgrade.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c index 01e963f1..06dac795 100644 --- a/src/microhttpd/test_upgrade.c +++ b/src/microhttpd/test_upgrade.c | |||
@@ -955,8 +955,10 @@ run_mhd_loop (struct MHD_Daemon *daemon, | |||
955 | else if (0 != (flags & MHD_USE_EPOLL)) | 955 | else if (0 != (flags & MHD_USE_EPOLL)) |
956 | run_mhd_epoll_loop (daemon); | 956 | run_mhd_epoll_loop (daemon); |
957 | #endif | 957 | #endif |
958 | else | 958 | else if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL))) |
959 | run_mhd_select_loop (daemon); | 959 | run_mhd_select_loop (daemon); |
960 | else | ||
961 | abort (); | ||
960 | } | 962 | } |
961 | 963 | ||
962 | static bool test_tls; | 964 | static bool test_tls; |
@@ -974,6 +976,7 @@ test_upgrade (int flags, | |||
974 | struct MHD_Daemon *d = NULL; | 976 | struct MHD_Daemon *d = NULL; |
975 | wr_socket sock; | 977 | wr_socket sock; |
976 | struct sockaddr_in sa; | 978 | struct sockaddr_in sa; |
979 | const union MHD_DaemonInfo *real_flags; | ||
977 | #if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) | 980 | #if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) |
978 | pid_t pid = -1; | 981 | pid_t pid = -1; |
979 | #endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */ | 982 | #endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */ |
@@ -1006,6 +1009,9 @@ test_upgrade (int flags, | |||
1006 | #endif /* HTTPS_SUPPORT */ | 1009 | #endif /* HTTPS_SUPPORT */ |
1007 | if (NULL == d) | 1010 | if (NULL == d) |
1008 | return 2; | 1011 | return 2; |
1012 | real_flags = MHD_get_daemon_info(d, MHD_DAEMON_INFO_FLAGS); | ||
1013 | if (NULL == real_flags) | ||
1014 | abort (); | ||
1009 | if (!test_tls || TLS_LIB_GNUTLS == use_tls_tool) | 1015 | if (!test_tls || TLS_LIB_GNUTLS == use_tls_tool) |
1010 | { | 1016 | { |
1011 | sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt (); | 1017 | sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt (); |
@@ -1042,7 +1048,7 @@ test_upgrade (int flags, | |||
1042 | &sock)) | 1048 | &sock)) |
1043 | abort (); | 1049 | abort (); |
1044 | if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD) ) | 1050 | if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD) ) |
1045 | run_mhd_loop (d, flags); | 1051 | run_mhd_loop (d, real_flags->flags); |
1046 | pthread_join (pt_client, | 1052 | pthread_join (pt_client, |
1047 | NULL); | 1053 | NULL); |
1048 | pthread_join (pt, | 1054 | pthread_join (pt, |