#include "multiif.h"
#include "curl_trc.h"
-/* copied from hostip.c to switch using SIGALARM for timeouts.
- * SIGALARM has only seconds resolution, so our tests will not work
- * here. */
-#if defined(CURLRES_SYNCH) && \
- defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP)
-#define USE_ALARM_TIMEOUT
-#endif
-
static CURL *easy;
fail(msg);
}
-#ifndef USE_ALARM_TIMEOUT
duration_ms = Curl_timediff(tr->ended, tr->started);
if(duration_ms < tc->min_duration_ms) {
curl_msprintf(msg, "%d: expected min duration of %dms, but took %dms",
tc->id, (int)tc->max_duration_ms, (int)duration_ms);
fail(msg);
}
-#endif
if(tr->cf6.creations && tr->cf4.creations && tc->pref_family) {
/* did ipv4 and ipv6 both, expect the preferred family to start right arway
* with the other being delayed by the happy_eyeball_timeout */
tc->id, stats1->family, (int)stats1->first_created);
fail(msg);
}
-#ifndef USE_ALARM_TIMEOUT
if(stats2->first_created < tc->he_timeout_ms) {
-#else
- if(stats2->first_created < 1000) {
-#endif
curl_msprintf(msg, "%d: expected ip%s to start delayed after %dms, "
"instead first attempt made after %dms",
tc->id, stats2->family, (int)tc->he_timeout_ms,
curl_easy_setopt(easy, CURLOPT_IPRESOLVE, (long)tc->ip_version);
curl_easy_setopt(easy, CURLOPT_CONNECTTIMEOUT_MS,
(long)tc->connect_timeout_ms);
-#ifdef USE_ALARM_TIMEOUT
- /* we only 1sec timer resolution here */
- curl_easy_setopt(easy, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS,
- (tc->he_timeout_ms > tc->connect_timeout_ms)?
- 3000L : 1000L);
-#else
curl_easy_setopt(easy, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS,
(long)tc->he_timeout_ms);
-#endif
curl_easy_setopt(easy, CURLOPT_URL, tc->url);
memset(&tr, 0, sizeof(tr));