int msgs_left; /* how many messages are left */
int res = CURLE_OK;
+ start_test_timing();
+
global_init(CURL_GLOBAL_ALL);
/* Allocate one CURL handle per transfer */
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
+ abort_on_test_timeout();
+
do {
struct timeval timeout;
int rc; /* select() return code */
curl_multi_perform(multi_handle, &still_running);
break;
}
+
+ abort_on_test_timeout();
} while(still_running);
/* See how the transfers went */
printf("HTTP transfer completed with status %d\n", msg->data.result);
break;
}
+
+ abort_on_test_timeout();
} while(msg);
+test_cleanup:
curl_multi_cleanup(multi_handle);
/* Free the CURL handles */
curl_easy_cleanup(easy);
curl_global_cleanup();
- return 0;
+ return res;
}