1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

avoid dependence on the order of the fields in the timeval struct, pointed out

by Gisle Vanem
This commit is contained in:
Daniel Stenberg 2003-10-25 06:03:50 +00:00
parent 2bdf52d4c5
commit 245ab7c796
2 changed files with 8 additions and 2 deletions

View File

@ -40,7 +40,10 @@ CURLcode test(char *URL)
while(!done) { while(!done) {
fd_set rd, wr, exc; fd_set rd, wr, exc;
int max_fd; int max_fd;
struct timeval interval={1,0}; struct timeval interval;
interval.tv_sec = 1;
interval.tv_usec = 0;
while (res == CURLM_CALL_MULTI_PERFORM) { while (res == CURLM_CALL_MULTI_PERFORM) {
res = curl_multi_perform(m, &running); res = curl_multi_perform(m, &running);

View File

@ -39,7 +39,10 @@ CURLcode test(char *URL)
if(res && (res != CURLM_CALL_MULTI_PERFORM)) if(res && (res != CURLM_CALL_MULTI_PERFORM))
return 1; /* major failure */ return 1; /* major failure */
do { do {
struct timeval interval={1,0}; struct timeval interval;
interval.tv_sec = 1;
interval.tv_usec = 0;
fprintf(stderr, "curl_multi_perform()\n"); fprintf(stderr, "curl_multi_perform()\n");