aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_upgrade.c')
-rw-r--r--src/microhttpd/test_upgrade.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index dbfa847d..404c2854 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -139,6 +139,8 @@ gnutlscli_connect (int *sock,
139 } 139 }
140 _exit (1); 140 _exit (1);
141} 141}
142
143
142#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */ 144#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */
143 145
144 146
@@ -296,14 +298,14 @@ wr_connect (struct wr_socket *s,
296 * it require processing on MHD side and 298 * it require processing on MHD side and
297 * when testing with "external" polling, 299 * when testing with "external" polling,
298 * test will call MHD processing only 300 * test will call MHD processing only
299 * after return from wr_connect(). */ 301 * after return from wr_connect(). */s->tls_connected = 0;
300 s->tls_connected = 0;
301 return 0; 302 return 0;
302 } 303 }
303#endif /* HTTPS_SUPPORT */ 304#endif /* HTTPS_SUPPORT */
304 return -1; 305 return -1;
305} 306}
306 307
308
307#ifdef HTTPS_SUPPORT 309#ifdef HTTPS_SUPPORT
308/* Only to be called from wr_send() and wr_recv() ! */ 310/* Only to be called from wr_send() and wr_recv() ! */
309static bool 311static bool
@@ -318,6 +320,8 @@ wr_handshake (struct wr_socket *s)
318 MHD_socket_set_error_ (MHD_SCKT_ECONNABORTED_); /* hard error */ 320 MHD_socket_set_error_ (MHD_SCKT_ECONNABORTED_); /* hard error */
319 return s->tls_connected; 321 return s->tls_connected;
320} 322}
323
324
321#endif /* HTTPS_SUPPORT */ 325#endif /* HTTPS_SUPPORT */
322 326
323 327
@@ -924,6 +928,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
924 } 928 }
925} 929}
926 930
931
927#ifdef HAVE_POLL 932#ifdef HAVE_POLL
928 933
929/** 934/**
@@ -937,6 +942,8 @@ run_mhd_poll_loop (struct MHD_Daemon *daemon)
937 (void) daemon; /* Unused. Silent compiler warning. */ 942 (void) daemon; /* Unused. Silent compiler warning. */
938 abort (); /* currently not implementable with existing MHD API */ 943 abort (); /* currently not implementable with existing MHD API */
939} 944}
945
946
940#endif /* HAVE_POLL */ 947#endif /* HAVE_POLL */
941 948
942 949
@@ -983,6 +990,8 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
983 MHD_run (daemon); 990 MHD_run (daemon);
984 } 991 }
985} 992}
993
994
986#endif /* EPOLL_SUPPORT */ 995#endif /* EPOLL_SUPPORT */
987 996
988/** 997/**
@@ -1076,7 +1085,7 @@ test_upgrade (int flags,
1076 if ( (NULL == dinfo) || 1085 if ( (NULL == dinfo) ||
1077 (0 == dinfo->port) ) 1086 (0 == dinfo->port) )
1078 abort (); 1087 abort ();
1079 if (! test_tls ||(TLS_LIB_GNUTLS == use_tls_tool)) 1088 if (! test_tls || (TLS_LIB_GNUTLS == use_tls_tool))
1080 { 1089 {
1081 sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt (); 1090 sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt ();
1082 if (NULL == sock) 1091 if (NULL == sock)
@@ -1134,7 +1143,7 @@ test_upgrade (int flags,
1134 pthread_join (pt, 1143 pthread_join (pt,
1135 NULL); 1144 NULL);
1136#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) 1145#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID)
1137 if (test_tls &&(TLS_LIB_GNUTLS != use_tls_tool)) 1146 if (test_tls && (TLS_LIB_GNUTLS != use_tls_tool))
1138 waitpid (pid, NULL, 0); 1147 waitpid (pid, NULL, 0);
1139#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */ 1148#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */
1140 MHD_stop_daemon (d); 1149 MHD_stop_daemon (d);