28 #define TEST_HANG_TIMEOUT 60 * 1000 30 #define MAX_BLACKLIST 20 44 size_t realsize = size * nmemb;
61 f = fopen(filename,
"rb");
66 if(fscanf(f,
"%d %s\n", &filetime, buf)) {
73 if(fscanf(f,
"blacklist_site %s\n", buf)) {
143 struct timeval last_handle_add;
159 multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, 15000L);
160 multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, 10000L);
180 fprintf(stdout,
"Adding handle %d\n", handlenum);
182 last_handle_add =
now;
226 interval.
tv_sec = timeout / 1000;
227 interval.
tv_usec = (timeout % 1000) * 1000;
#define select_test(A, B, C, D, E)
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *exc_fd_set, int *max_fd)
static int urltime[MAX_URLS]
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *curl_handle)
long tutil_tvdiff(struct timeval newer, struct timeval older)
static int blacklist_num_servers
static int create_handles(void)
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds)
static void free_urls(void)
static char * server_blacklist[MAX_BLACKLIST]
#define curl_easy_setopt(handle, option, value)
static size_t write_callback(void *contents, size_t size, size_t nmemb, void *userp)
#define abort_on_test_timeout()
static char * urlstring[MAX_URLS]
static char * site_blacklist[MAX_BLACKLIST]
static int blacklist_num_sites
#define multi_setopt(A, B, C)
CURL_EXTERN CURL * curl_easy_init(void)
CURL_EXTERN void curl_easy_cleanup(CURL *curl)
static void setup_handle(char *base_url, CURLM *m, int handlenum)
static void remove_handles(void)
#define Curl_safefree(ptr)
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *curl_handle)
CURL_EXTERN CURLcode curl_global_init(long flags)
curl_global_init() globally initializes curl given a bitwise set of the different features of what to...
CURL_EXTERN CURLMsg * curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
static int parse_url_file(const char *filename)
static CURL * handles[MAX_URLS]
CURL_EXTERN void curl_global_cleanup(void)
curl_global_cleanup() globally cleanups curl, uses the value of "init_flags" to determine what needs ...
#define start_test_timing()
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle)
struct timeval tutil_tvnow(void)