Loading tests/libtest/first.c +15 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,21 @@ extern void curl_memlimit(int); /* test is provided in the test code file */ int test(char *url); int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc, struct timeval *tv) { #ifdef WIN32 /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is * case when 'num_fds <= 0. So sleep. */ if (num_fds <= 0) { Sleep(1000*tv->tv_sec + tv->tv_usec/1000); return 0; } #endif return select(num_fds, rd, wr, exc, tv); } char *arg2=NULL; int main(int argc, char **argv) Loading tests/libtest/lib503.c +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ int test(char *URL) return 89; } if (select(max_fd+1, &rd, &wr, &exc, &interval) == -1) { if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) { fprintf(stderr, "bad select??\n"); return 95; } Loading tests/libtest/lib504.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ int test(char *URL) ret = 3; break; } rc = select(max_fd+1, &rd, &wr, &exc, &interval); rc = select_test(max_fd+1, &rd, &wr, &exc, &interval); fprintf(stderr, "select returned %d\n", rc); /* we only allow a certain number of loops to avoid hanging here Loading tests/libtest/lib507.c +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ int test(char *URL) timeout.tv_sec = 1; timeout.tv_usec = 0; curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd); rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); rc = select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: break; Loading tests/libtest/lib509.c +1 −1 Original line number Diff line number Diff line Loading @@ -241,7 +241,7 @@ int test(char *URL) break; } if (select(max_fd+1, &rd, &wr, &exc, &interval) == -1) { if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) { fprintf(stderr, "bad select??\n"); i =95; break; Loading Loading
tests/libtest/first.c +15 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,21 @@ extern void curl_memlimit(int); /* test is provided in the test code file */ int test(char *url); int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc, struct timeval *tv) { #ifdef WIN32 /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is * case when 'num_fds <= 0. So sleep. */ if (num_fds <= 0) { Sleep(1000*tv->tv_sec + tv->tv_usec/1000); return 0; } #endif return select(num_fds, rd, wr, exc, tv); } char *arg2=NULL; int main(int argc, char **argv) Loading
tests/libtest/lib503.c +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ int test(char *URL) return 89; } if (select(max_fd+1, &rd, &wr, &exc, &interval) == -1) { if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) { fprintf(stderr, "bad select??\n"); return 95; } Loading
tests/libtest/lib504.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ int test(char *URL) ret = 3; break; } rc = select(max_fd+1, &rd, &wr, &exc, &interval); rc = select_test(max_fd+1, &rd, &wr, &exc, &interval); fprintf(stderr, "select returned %d\n", rc); /* we only allow a certain number of loops to avoid hanging here Loading
tests/libtest/lib507.c +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ int test(char *URL) timeout.tv_sec = 1; timeout.tv_usec = 0; curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd); rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); rc = select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: break; Loading
tests/libtest/lib509.c +1 −1 Original line number Diff line number Diff line Loading @@ -241,7 +241,7 @@ int test(char *URL) break; } if (select(max_fd+1, &rd, &wr, &exc, &interval) == -1) { if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) { fprintf(stderr, "bad select??\n"); i =95; break; Loading