aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_put_chunked.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_put_chunked.c')
-rw-r--r--src/testcurl/test_put_chunked.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c
index 090e6ebc..2c24130e 100644
--- a/src/testcurl/test_put_chunked.c
+++ b/src/testcurl/test_put_chunked.c
@@ -489,25 +489,37 @@ testExternalPut ()
489#endif 489#endif
490 } 490 }
491 curl_multi_perform (multi, &running); 491 curl_multi_perform (multi, &running);
492 if (running == 0) 492 if (0 == running)
493 { 493 {
494 msg = curl_multi_info_read (multi, &running); 494 int pending;
495 if (msg == NULL) 495 int curl_fine = 0;
496 break; 496 while (NULL != (msg = curl_multi_info_read (multi, &pending)))
497 if (msg->msg == CURLMSG_DONE)
498 { 497 {
499 if (msg->data.result != CURLE_OK) 498 if (msg->msg == CURLMSG_DONE)
500 printf ("%s failed at %s:%d: `%s'\n", 499 {
501 "curl_multi_perform", 500 if (msg->data.result == CURLE_OK)
502 __FILE__, 501 curl_fine = 1;
503 __LINE__, 502 else
504 curl_easy_strerror (msg->data.result)); 503 {
505 curl_multi_remove_handle (multi, c); 504 fprintf (stderr,
506 curl_multi_cleanup (multi); 505 "%s failed at %s:%d: `%s'\n",
507 curl_easy_cleanup (c); 506 "curl_multi_perform",
508 c = NULL; 507 __FILE__,
509 multi = NULL; 508 __LINE__, curl_easy_strerror (msg->data.result));
509 abort ();
510 }
511 }
510 } 512 }
513 if (! curl_fine)
514 {
515 fprintf (stderr, "libcurl haven't returned OK code\n");
516 abort ();
517 }
518 curl_multi_remove_handle (multi, c);
519 curl_multi_cleanup (multi);
520 curl_easy_cleanup (c);
521 c = NULL;
522 multi = NULL;
511 } 523 }
512 MHD_run (d); 524 MHD_run (d);
513 } 525 }