diff options
Diffstat (limited to 'src/testcurl/test_quiesce.c')
-rw-r--r-- | src/testcurl/test_quiesce.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c index 7425f839..6bd6967f 100644 --- a/src/testcurl/test_quiesce.c +++ b/src/testcurl/test_quiesce.c | |||
@@ -219,7 +219,7 @@ _checkCURLE_OK_func (CURLcode code, const char *curlFunc, | |||
219 | /* Global parameters */ | 219 | /* Global parameters */ |
220 | static int verbose; /**< Be verbose */ | 220 | static int verbose; /**< Be verbose */ |
221 | static int oneone; /**< If false use HTTP/1.0 for requests*/ | 221 | static int oneone; /**< If false use HTTP/1.0 for requests*/ |
222 | static int global_port; /**< MHD daemons listen port number */ | 222 | static uint16_t global_port; /**< MHD daemons listen port number */ |
223 | 223 | ||
224 | struct CBC | 224 | struct CBC |
225 | { | 225 | { |
@@ -394,8 +394,8 @@ setupCURL (void *cbc) | |||
394 | } | 394 | } |
395 | 395 | ||
396 | 396 | ||
397 | static int | 397 | static unsigned int |
398 | testGet (int type, int pool_count, int poll_flag) | 398 | testGet (unsigned int type, int pool_count, uint32_t poll_flag) |
399 | { | 399 | { |
400 | struct MHD_Daemon *d; | 400 | struct MHD_Daemon *d; |
401 | CURL *c; | 401 | CURL *c; |
@@ -406,15 +406,16 @@ testGet (int type, int pool_count, int poll_flag) | |||
406 | char *thrdRet; | 406 | char *thrdRet; |
407 | 407 | ||
408 | if (verbose) | 408 | if (verbose) |
409 | printf ("testGet(%d, %d, %d) test started.\n", | 409 | printf ("testGet(%u, %d, %u) test started.\n", |
410 | type, pool_count, poll_flag); | 410 | type, pool_count, (unsigned int) poll_flag); |
411 | 411 | ||
412 | cbc.buf = buf; | 412 | cbc.buf = buf; |
413 | cbc.size = sizeof(buf); | 413 | cbc.size = sizeof(buf); |
414 | cbc.pos = 0; | 414 | cbc.pos = 0; |
415 | if (pool_count > 0) | 415 | if (pool_count > 0) |
416 | { | 416 | { |
417 | d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC | poll_flag, | 417 | d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC |
418 | | (enum MHD_FLAG) poll_flag, | ||
418 | global_port, NULL, NULL, &ahc_echo, NULL, | 419 | global_port, NULL, NULL, &ahc_echo, NULL, |
419 | MHD_OPTION_THREAD_POOL_SIZE, | 420 | MHD_OPTION_THREAD_POOL_SIZE, |
420 | (unsigned int) pool_count, | 421 | (unsigned int) pool_count, |
@@ -423,7 +424,8 @@ testGet (int type, int pool_count, int poll_flag) | |||
423 | } | 424 | } |
424 | else | 425 | else |
425 | { | 426 | { |
426 | d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC | poll_flag, | 427 | d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC |
428 | | (enum MHD_FLAG) poll_flag, | ||
427 | global_port, NULL, NULL, &ahc_echo, NULL, | 429 | global_port, NULL, NULL, &ahc_echo, NULL, |
428 | MHD_OPTION_END); | 430 | MHD_OPTION_END); |
429 | } | 431 | } |
@@ -435,7 +437,7 @@ testGet (int type, int pool_count, int poll_flag) | |||
435 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 437 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
436 | if ((NULL == dinfo) || (0 == dinfo->port) ) | 438 | if ((NULL == dinfo) || (0 == dinfo->port) ) |
437 | mhdErrorExit (); | 439 | mhdErrorExit (); |
438 | global_port = (int) dinfo->port; | 440 | global_port = dinfo->port; |
439 | } | 441 | } |
440 | 442 | ||
441 | c = setupCURL (&cbc); | 443 | c = setupCURL (&cbc); |
@@ -515,8 +517,8 @@ testGet (int type, int pool_count, int poll_flag) | |||
515 | 517 | ||
516 | if (verbose) | 518 | if (verbose) |
517 | { | 519 | { |
518 | printf ("testGet(%d, %d, %d) test succeed.\n", | 520 | printf ("testGet(%u, %d, %u) test succeed.\n", |
519 | type, pool_count, poll_flag); | 521 | type, pool_count, (unsigned int) poll_flag); |
520 | fflush (stdout); | 522 | fflush (stdout); |
521 | } | 523 | } |
522 | 524 | ||
@@ -524,7 +526,7 @@ testGet (int type, int pool_count, int poll_flag) | |||
524 | } | 526 | } |
525 | 527 | ||
526 | 528 | ||
527 | static int | 529 | static unsigned int |
528 | testExternalGet (void) | 530 | testExternalGet (void) |
529 | { | 531 | { |
530 | struct MHD_Daemon *d; | 532 | struct MHD_Daemon *d; |
@@ -564,7 +566,7 @@ testExternalGet (void) | |||
564 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 566 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
565 | if ((NULL == dinfo) || (0 == dinfo->port) ) | 567 | if ((NULL == dinfo) || (0 == dinfo->port) ) |
566 | mhdErrorExit (); | 568 | mhdErrorExit (); |
567 | global_port = (int) dinfo->port; | 569 | global_port = dinfo->port; |
568 | } | 570 | } |
569 | 571 | ||
570 | for (i = 0; i < 2; i++) | 572 | for (i = 0; i < 2; i++) |