aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_upgrade_large.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_upgrade_large.c')
-rw-r--r--src/microhttpd/test_upgrade_large.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c
index 9ad15578..a17293db 100644
--- a/src/microhttpd/test_upgrade_large.c
+++ b/src/microhttpd/test_upgrade_large.c
@@ -149,6 +149,8 @@ gnutlscli_connect (int *sock,
149 } 149 }
150 _exit (1); 150 _exit (1);
151} 151}
152
153
152#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */ 154#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */
153 155
154 156
@@ -306,14 +308,14 @@ wr_connect (struct wr_socket *s,
306 * it require processing on MHD side and 308 * it require processing on MHD side and
307 * when testing with "external" polling, 309 * when testing with "external" polling,
308 * test will call MHD processing only 310 * test will call MHD processing only
309 * after return from wr_connect(). */ 311 * after return from wr_connect(). */s->tls_connected = 0;
310 s->tls_connected = 0;
311 return 0; 312 return 0;
312 } 313 }
313#endif /* HTTPS_SUPPORT */ 314#endif /* HTTPS_SUPPORT */
314 return -1; 315 return -1;
315} 316}
316 317
318
317#ifdef HTTPS_SUPPORT 319#ifdef HTTPS_SUPPORT
318/* Only to be called from wr_send() and wr_recv() ! */ 320/* Only to be called from wr_send() and wr_recv() ! */
319static bool 321static bool
@@ -328,6 +330,8 @@ wr_handshake (struct wr_socket *s)
328 MHD_socket_set_error_ (MHD_SCKT_ECONNABORTED_); /* hard error */ 330 MHD_socket_set_error_ (MHD_SCKT_ECONNABORTED_); /* hard error */
329 return s->tls_connected; 331 return s->tls_connected;
330} 332}
333
334
331#endif /* HTTPS_SUPPORT */ 335#endif /* HTTPS_SUPPORT */
332 336
333 337
@@ -958,6 +962,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
958 kicker[1] = -1; 962 kicker[1] = -1;
959} 963}
960 964
965
961#ifdef HAVE_POLL 966#ifdef HAVE_POLL
962 967
963/** 968/**
@@ -971,6 +976,8 @@ run_mhd_poll_loop (struct MHD_Daemon *daemon)
971 (void) daemon; /* Unused. Silent compiler warning. */ 976 (void) daemon; /* Unused. Silent compiler warning. */
972 abort (); /* currently not implementable with existing MHD API */ 977 abort (); /* currently not implementable with existing MHD API */
973} 978}
979
980
974#endif /* HAVE_POLL */ 981#endif /* HAVE_POLL */
975 982
976 983
@@ -1026,6 +1033,8 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
1026 kicker[0] = -1; 1033 kicker[0] = -1;
1027 kicker[1] = -1; 1034 kicker[1] = -1;
1028} 1035}
1036
1037
1029#endif /* EPOLL_SUPPORT */ 1038#endif /* EPOLL_SUPPORT */
1030 1039
1031/** 1040/**
@@ -1121,7 +1130,7 @@ test_upgrade (int flags,
1121 if ( (NULL == dinfo) || 1130 if ( (NULL == dinfo) ||
1122 (0 == dinfo->port) ) 1131 (0 == dinfo->port) )
1123 abort (); 1132 abort ();
1124 if (! test_tls ||(TLS_LIB_GNUTLS == use_tls_tool)) 1133 if (! test_tls || (TLS_LIB_GNUTLS == use_tls_tool))
1125 { 1134 {
1126 sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt (); 1135 sock = test_tls ? wr_create_tls_sckt () : wr_create_plain_sckt ();
1127 if (NULL == sock) 1136 if (NULL == sock)
@@ -1179,7 +1188,7 @@ test_upgrade (int flags,
1179 pthread_join (pt, 1188 pthread_join (pt,
1180 NULL); 1189 NULL);
1181#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) 1190#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID)
1182 if (test_tls &&(TLS_LIB_GNUTLS != use_tls_tool)) 1191 if (test_tls && (TLS_LIB_GNUTLS != use_tls_tool))
1183 waitpid (pid, NULL, 0); 1192 waitpid (pid, NULL, 0);
1184#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */ 1193#endif /* HTTPS_SUPPORT && HAVE_FORK && HAVE_WAITPID */
1185 MHD_stop_daemon (d); 1194 MHD_stop_daemon (d);