aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib540.c6
-rw-r--r--tests/libtest/lib560.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c
index cfaa1622d..1ba705a9c 100644
--- a/tests/libtest/lib540.c
+++ b/tests/libtest/lib540.c
@@ -44,6 +44,7 @@ static int loop(CURLM *cm, const char* url, const char* userpwd,
struct curl_slist *headers)
{
CURLMsg *msg;
+ CURLMcode code;
long L;
int M, Q, U = -1;
fd_set R, W, E;
@@ -52,7 +53,10 @@ static int loop(CURLM *cm, const char* url, const char* userpwd,
init(cm, url, userpwd, headers);
while (U) {
- while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(cm, &U));
+
+ do {
+ code = curl_multi_perform(cm, &U);
+ } while (code == CURLM_CALL_MULTI_PERFORM);
if (U) {
FD_ZERO(&R);
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c
index d2de7bfb4..3e34cf788 100644
--- a/tests/libtest/lib560.c
+++ b/tests/libtest/lib560.c
@@ -24,6 +24,7 @@ int test(char *URL)
{
CURL *http_handle;
CURLM *multi_handle;
+ CURLMcode code;
int still_running; /* keep number of running handles */
@@ -48,8 +49,9 @@ int test(char *URL)
curl_multi_add_handle(multi_handle, http_handle);
/* we start some action by calling perform right away */
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(multi_handle, &still_running));
+ do {
+ code = curl_multi_perform(multi_handle, &still_running);
+ } while(code == CURLM_CALL_MULTI_PERFORM);
while(still_running) {
struct timeval timeout;
@@ -84,8 +86,9 @@ int test(char *URL)
case 0:
default:
/* timeout or readable/writable sockets */
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_perform(multi_handle, &still_running));
+ do {
+ code = curl_multi_perform(multi_handle, &still_running);
+ } while(code == CURLM_CALL_MULTI_PERFORM);
break;
}
}