aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib526.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib526.c')
-rw-r--r--tests/libtest/lib526.c65
1 files changed, 30 insertions, 35 deletions
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index a0085ec3c..e73eab029 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -149,50 +149,47 @@ int test(char *URL)
mp_timedout = FALSE;
mp_start = tutil_tvnow();
- while (res == CURLM_CALL_MULTI_PERFORM) {
- res = (int)curl_multi_perform(m, &running);
- if (tutil_tvdiff(tutil_tvnow(), mp_start) >
- MULTI_PERFORM_HANG_TIMEOUT) {
- mp_timedout = TRUE;
- break;
- }
- if (running <= 0) {
+ res = (int)curl_multi_perform(m, &running);
+ if (tutil_tvdiff(tutil_tvnow(), mp_start) >
+ MULTI_PERFORM_HANG_TIMEOUT) {
+ mp_timedout = TRUE;
+ break;
+ }
+ if (running <= 0) {
#ifdef LIB527
- /* NOTE: this code does not remove the handle from the multi handle
- here, which would be the nice, sane and documented way of working.
- This however tests that the API survives this abuse gracefully. */
- curl_easy_cleanup(curl[current]);
+ /* NOTE: this code does not remove the handle from the multi handle
+ here, which would be the nice, sane and documented way of working.
+ This however tests that the API survives this abuse gracefully. */
+ curl_easy_cleanup(curl[current]);
#endif
- if(++current < NUM_HANDLES) {
- fprintf(stderr, "Advancing to URL %d\n", current);
+ if(++current < NUM_HANDLES) {
+ fprintf(stderr, "Advancing to URL %d\n", current);
#ifdef LIB532
- /* first remove the only handle we use */
- curl_multi_remove_handle(m, curl[0]);
+ /* first remove the only handle we use */
+ curl_multi_remove_handle(m, curl[0]);
- /* make us re-use the same handle all the time, and try resetting
- the handle first too */
- curl_easy_reset(curl[0]);
- test_setopt(curl[0], CURLOPT_URL, URL);
- test_setopt(curl[0], CURLOPT_VERBOSE, 1L);
+ /* make us re-use the same handle all the time, and try resetting
+ the handle first too */
+ curl_easy_reset(curl[0]);
+ test_setopt(curl[0], CURLOPT_URL, URL);
+ test_setopt(curl[0], CURLOPT_VERBOSE, 1L);
- /* re-add it */
- res = (int)curl_multi_add_handle(m, curl[0]);
+ /* re-add it */
+ res = (int)curl_multi_add_handle(m, curl[0]);
#else
- res = (int)curl_multi_add_handle(m, curl[current]);
+ res = (int)curl_multi_add_handle(m, curl[current]);
#endif
- if(res) {
- fprintf(stderr, "add handle failed: %d.\n", res);
- res = 243;
- break;
- }
+ if(res) {
+ fprintf(stderr, "add handle failed: %d.\n", res);
+ res = 243;
+ break;
}
- else
- done = TRUE; /* bail out */
+ }
+ else {
+ done = TRUE; /* bail out */
break;
}
}
- if (mp_timedout || done)
- break;
if (res != CURLM_OK) {
fprintf(stderr, "not okay???\n");
@@ -215,8 +212,6 @@ int test(char *URL)
res = 195;
break;
}
-
- res = CURLM_CALL_MULTI_PERFORM;
}
if (ml_timedout || mp_timedout) {