Lines Matching refs:i
96 size_t i; in debug_cb() local
97 for(i = 0; i < size - 1; i++) { in debug_cb()
98 if(data[i] == '\n') { /* LF */ in debug_cb()
102 (void)fwrite(data + st, i - st + 1, 1, output); in debug_cb()
103 st = i + 1; in debug_cb()
109 (void)fwrite(data + st, i - st + 1, 1, output); in debug_cb()
206 int i, still_running = 1, msgs_left, numfds; in main() local
276 for(i = 0; i < HANDLECOUNT; i++) { in main()
277 handles[i].idx = i; in main()
278 handles[i].paused = 0; in main()
279 handles[i].resumed = 0; in main()
280 handles[i].errored = 0; in main()
281 handles[i].fail_write = 1; in main()
282 handles[i].h = curl_easy_init(); in main()
283 if(!handles[i].h || in main()
284 curl_easy_setopt(handles[i].h, CURLOPT_WRITEFUNCTION, cb) != CURLE_OK || in main()
285 curl_easy_setopt(handles[i].h, CURLOPT_WRITEDATA, &handles[i]) in main()
287 curl_easy_setopt(handles[i].h, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK || in main()
288 curl_easy_setopt(handles[i].h, CURLOPT_VERBOSE, 1L) != CURLE_OK || in main()
289 curl_easy_setopt(handles[i].h, CURLOPT_DEBUGFUNCTION, debug_cb) in main()
291 curl_easy_setopt(handles[i].h, CURLOPT_SSL_VERIFYPEER, 0L) != CURLE_OK || in main()
292 curl_easy_setopt(handles[i].h, CURLOPT_RESOLVE, resolve) != CURLE_OK || in main()
293 curl_easy_setopt(handles[i].h, CURLOPT_PIPEWAIT, 1L) || in main()
294 curl_easy_setopt(handles[i].h, CURLOPT_URL, url) != CURLE_OK) { in main()
297 curl_easy_setopt(handles[i].h, CURLOPT_HTTP_VERSION, (long)http_version); in main()
304 for(i = 0; i < HANDLECOUNT; i++) { in main()
305 if(curl_multi_add_handle(multi_handle, handles[i].h) != CURLM_OK) in main()
317 for(i = 0; i < HANDLECOUNT; i++) { in main()
318 if(!handles[i].paused) { in main()
319 fprintf(stderr, "ERROR: [%d] NOT PAUSED\n", i); in main()
322 else if(handles[i].paused != 1) { in main()
324 i, handles[i].paused); in main()
327 else if(!handles[i].resumed) { in main()
328 fprintf(stderr, "ERROR: [%d] NOT resumed!\n", i); in main()
331 else if(handles[i].errored != 1) { in main()
333 i, handles[i].errored); in main()
351 for(i = 0; i < HANDLECOUNT; i++) { in main()
352 if(msg->easy_handle == handles[i].h) { in main()
353 if(handles[i].paused != 1 || !handles[i].resumed) { in main()
355 "result %d - wtf?\n", i, handles[i].paused, in main()
356 handles[i].resumed, msg->data.result); in main()
367 for(i = 0; i < HANDLECOUNT; i++) { in main()
368 if(!handles[i].paused) { in main()
372 all_paused = (i == HANDLECOUNT); in main()
381 for(i = 0; i < HANDLECOUNT; i++) { in main()
382 fprintf(stderr, "INFO: [%d] resumed\n", i); in main()
383 handles[i].resumed = 1; in main()
384 curl_easy_pause(handles[i].h, CURLPAUSE_CONT); in main()
390 for(i = 0; i < HANDLECOUNT; i++) { in main()
391 curl_multi_remove_handle(multi_handle, handles[i].h); in main()
392 curl_easy_cleanup(handles[i].h); in main()