diff options
Diffstat (limited to 'src/testcurl/test_process_headers.c')
-rw-r--r-- | src/testcurl/test_process_headers.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index a2d7485b..34200082 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -65,6 +65,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
65 | return size * nmemb; | 65 | return size * nmemb; |
66 | } | 66 | } |
67 | 67 | ||
68 | |||
68 | static int | 69 | static int |
69 | kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) | 70 | kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) |
70 | { | 71 | { |
@@ -78,6 +79,7 @@ kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) | |||
78 | return MHD_YES; | 79 | return MHD_YES; |
79 | } | 80 | } |
80 | 81 | ||
82 | |||
81 | static int | 83 | static int |
82 | ahc_echo (void *cls, | 84 | ahc_echo (void *cls, |
83 | struct MHD_Connection *connection, | 85 | struct MHD_Connection *connection, |
@@ -179,7 +181,7 @@ testInternalGet () | |||
179 | { | 181 | { |
180 | const union MHD_DaemonInfo *dinfo; | 182 | const union MHD_DaemonInfo *dinfo; |
181 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 183 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
182 | if ((NULL == dinfo) ||(0 == dinfo->port) ) | 184 | if ((NULL == dinfo) || (0 == dinfo->port) ) |
183 | { | 185 | { |
184 | MHD_stop_daemon (d); return 32; | 186 | MHD_stop_daemon (d); return 32; |
185 | } | 187 | } |
@@ -219,6 +221,7 @@ testInternalGet () | |||
219 | return 0; | 221 | return 0; |
220 | } | 222 | } |
221 | 223 | ||
224 | |||
222 | static int | 225 | static int |
223 | testMultithreadedGet () | 226 | testMultithreadedGet () |
224 | { | 227 | { |
@@ -250,7 +253,7 @@ testMultithreadedGet () | |||
250 | { | 253 | { |
251 | const union MHD_DaemonInfo *dinfo; | 254 | const union MHD_DaemonInfo *dinfo; |
252 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 255 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
253 | if ((NULL == dinfo) ||(0 == dinfo->port) ) | 256 | if ((NULL == dinfo) || (0 == dinfo->port) ) |
254 | { | 257 | { |
255 | MHD_stop_daemon (d); return 32; | 258 | MHD_stop_daemon (d); return 32; |
256 | } | 259 | } |
@@ -290,6 +293,7 @@ testMultithreadedGet () | |||
290 | return 0; | 293 | return 0; |
291 | } | 294 | } |
292 | 295 | ||
296 | |||
293 | static int | 297 | static int |
294 | testMultithreadedPoolGet () | 298 | testMultithreadedPoolGet () |
295 | { | 299 | { |
@@ -321,7 +325,7 @@ testMultithreadedPoolGet () | |||
321 | { | 325 | { |
322 | const union MHD_DaemonInfo *dinfo; | 326 | const union MHD_DaemonInfo *dinfo; |
323 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 327 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
324 | if ((NULL == dinfo) ||(0 == dinfo->port) ) | 328 | if ((NULL == dinfo) || (0 == dinfo->port) ) |
325 | { | 329 | { |
326 | MHD_stop_daemon (d); return 32; | 330 | MHD_stop_daemon (d); return 32; |
327 | } | 331 | } |
@@ -361,6 +365,7 @@ testMultithreadedPoolGet () | |||
361 | return 0; | 365 | return 0; |
362 | } | 366 | } |
363 | 367 | ||
368 | |||
364 | static int | 369 | static int |
365 | testExternalGet () | 370 | testExternalGet () |
366 | { | 371 | { |
@@ -406,7 +411,7 @@ testExternalGet () | |||
406 | { | 411 | { |
407 | const union MHD_DaemonInfo *dinfo; | 412 | const union MHD_DaemonInfo *dinfo; |
408 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 413 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
409 | if ((NULL == dinfo) ||(0 == dinfo->port) ) | 414 | if ((NULL == dinfo) || (0 == dinfo->port) ) |
410 | { | 415 | { |
411 | MHD_stop_daemon (d); return 32; | 416 | MHD_stop_daemon (d); return 32; |
412 | } | 417 | } |
@@ -479,9 +484,10 @@ testExternalGet () | |||
479 | if (EINTR != errno) | 484 | if (EINTR != errno) |
480 | abort (); | 485 | abort (); |
481 | #else | 486 | #else |
482 | if ((WSAEINVAL != WSAGetLastError ()) ||(0 != rs.fd_count) ||(0 != | 487 | if ((WSAEINVAL != WSAGetLastError ()) || (0 != rs.fd_count) || (0 != |
483 | ws.fd_count) | 488 | ws. |
484 | ||(0 != es.fd_count) ) | 489 | fd_count) |
490 | || (0 != es.fd_count) ) | ||
485 | abort (); | 491 | abort (); |
486 | Sleep (1000); | 492 | Sleep (1000); |
487 | #endif | 493 | #endif |
@@ -523,14 +529,13 @@ testExternalGet () | |||
523 | } | 529 | } |
524 | 530 | ||
525 | 531 | ||
526 | |||
527 | int | 532 | int |
528 | main (int argc, char *const *argv) | 533 | main (int argc, char *const *argv) |
529 | { | 534 | { |
530 | unsigned int errorCount = 0; | 535 | unsigned int errorCount = 0; |
531 | (void) argc; /* Unused. Silent compiler warning. */ | 536 | (void) argc; /* Unused. Silent compiler warning. */ |
532 | 537 | ||
533 | if ((NULL == argv)||(0 == argv[0])) | 538 | if ((NULL == argv) || (0 == argv[0])) |
534 | return 99; | 539 | return 99; |
535 | oneone = has_in_name (argv[0], "11"); | 540 | oneone = has_in_name (argv[0], "11"); |
536 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) | 541 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) |