curl-library
[PATCH] Re: Timeout in milliseconds
From: Alexander Lazic <al-curllibrary_at_none.at>
Date: Sat, 26 Aug 2006 20:04:18 +0200
Date: Sat, 26 Aug 2006 20:04:18 +0200
Hi,
On Fre 25.08.2006 09:07, Alexander Lazic wrote:
>
>Well then i will go the *only* milliseconds way.
here now my patch, against the todays 'cvs co'.
make test was going thru the cli have give me some vaild times back.
--- src/curl -Lo /dev/null -skw 'time_total %{time_total} time_connect \ %{time_connect} time_namelookup %{time_namelookup} time_pretransfer \ %{time_pretransfer} time_starttransfer %{time_starttransfer} \ time_redirect %{time_redirect}\n' http://curlm.haxx.se/ time_total 1226 time_connect 392 time_namelookup 9 time_pretransfer 392 \ time_starttransfer 818 time_redirect 0 --- I have also change the hugehelp.c because I don't know how to generate it :-( Thoughts, opinions?! I have also see a curious behaviour in the *original* code, I have add into simple.c the following code: --- long timesl = 0; double times = 0.0; *after perform* res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, ×); if(res != CURLE_OK){ printf("error getinfo()\n"); return 0; } else printf("CURLINFO_CONNECT_TIME %f\n", times); res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, ×l); if(res != CURLE_OK){ printf("error getinfo()\n"); return 0; } else printf("CURLINFO_CONNECT_TIME %ld\n", timesl); --- But i don't get the error message instead a segfault in: --- CURLINFO_CONNECT_TIME 0.044362 CURLINFO_CONNECT_TIME -1235301314 Program received signal SIGSEGV, Segmentation fault. Curl_close (data=0x3fa6b69d) at url.c:198 198 if(data->multi) { (gdb) bt #0 Curl_close (data=0x3fa6b69d) at url.c:198 #1 0xa7fc1ae1 in curl_easy_cleanup (curl=0x3fa6b69d) at easy.c:485 #2 0x080487af in main () at simple.c:47 (gdb) The program is running. Exit anyway? (y or n) y --- could anybody reproduce this behaviour?! Regards AlexReceived on 2006-08-26