diff options
Diffstat (limited to 'src/testcurl/test_quiesce_stream.c')
-rw-r--r-- | src/testcurl/test_quiesce_stream.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/testcurl/test_quiesce_stream.c b/src/testcurl/test_quiesce_stream.c index d658b719..7885a048 100644 --- a/src/testcurl/test_quiesce_stream.c +++ b/src/testcurl/test_quiesce_stream.c | |||
@@ -23,15 +23,19 @@ | |||
23 | * @author Markus Doppelbauer | 23 | * @author Markus Doppelbauer |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "mhd_options.h" | ||
26 | #include <stdlib.h> | 27 | #include <stdlib.h> |
27 | #include <stdio.h> | 28 | #include <stdio.h> |
28 | #include <string.h> | 29 | #include <string.h> |
29 | #include <errno.h> | 30 | #include <errno.h> |
30 | #include <arpa/inet.h> | ||
31 | #include <unistd.h> | ||
32 | #include <fcntl.h> | ||
33 | #include <pthread.h> | 31 | #include <pthread.h> |
34 | #include <microhttpd.h> | 32 | #include <microhttpd.h> |
33 | #ifdef HAVE_UNISTD_H | ||
34 | #include <unistd.h> | ||
35 | #elif defined(_WIN32) | ||
36 | #include <windows.h> | ||
37 | #define sleep(s) (Sleep((s)*1000), 0) | ||
38 | #endif /* _WIN32 */ | ||
35 | 39 | ||
36 | 40 | ||
37 | static volatile unsigned int request_counter; | 41 | static volatile unsigned int request_counter; |
@@ -171,7 +175,7 @@ main() | |||
171 | /* Flags */ | 175 | /* Flags */ |
172 | unsigned int daemon_flags | 176 | unsigned int daemon_flags |
173 | = MHD_USE_INTERNAL_POLLING_THREAD | 177 | = MHD_USE_INTERNAL_POLLING_THREAD |
174 | | MHD_USE_EPOLL | 178 | | MHD_USE_AUTO |
175 | | MHD_ALLOW_SUSPEND_RESUME | 179 | | MHD_ALLOW_SUSPEND_RESUME |
176 | | MHD_USE_ITC; | 180 | | MHD_USE_ITC; |
177 | 181 | ||
@@ -184,11 +188,11 @@ main() | |||
184 | NULL, | 188 | NULL, |
185 | MHD_OPTION_END); | 189 | MHD_OPTION_END); |
186 | if (NULL == daemon) | 190 | if (NULL == daemon) |
187 | return EXIT_FAILURE; | 191 | return 1; |
188 | if (0 != system ("wget --server-response -q -O - 127.0.0.1:8000")) | 192 | if (0 != system ("curl -s http://127.0.0.1:8000")) |
189 | { | 193 | { |
190 | MHD_stop_daemon (daemon); | 194 | MHD_stop_daemon (daemon); |
191 | return 77; /* skipped */ | 195 | return 1; |
192 | } | 196 | } |
193 | /* wait for a request */ | 197 | /* wait for a request */ |
194 | while (0 == request_counter) | 198 | while (0 == request_counter) |
@@ -205,5 +209,5 @@ main() | |||
205 | "stopping daemon\n"); | 209 | "stopping daemon\n"); |
206 | MHD_stop_daemon (daemon); | 210 | MHD_stop_daemon (daemon); |
207 | 211 | ||
208 | return EXIT_SUCCESS; | 212 | return 0; |
209 | } | 213 | } |