Lines Matching refs:global
131 static CURLcode single_transfer(struct GlobalConfig *global,
137 static CURLcode create_transfer(struct GlobalConfig *global,
212 warnf(config->global, in sockopt_callback()
224 warnf(config->global, "VLAN priority %d failed with errno %d: %s;\n", in sockopt_callback()
351 static CURLcode pre_transfer(struct GlobalConfig *global, in pre_transfer() argument
423 (void)global; in pre_transfer()
452 static CURLcode post_per_transfer(struct GlobalConfig *global, in post_per_transfer() argument
478 if(global->silent && !global->showerror) in post_per_transfer()
484 (!global->silent || global->showerror)) { in post_per_transfer()
496 if(!global->silent || global->showerror) in post_per_transfer()
507 warnf(config->global, "Error setting extended attributes on '%s': %s", in post_per_transfer()
529 errorf(global, "Failed writing body"); in post_per_transfer()
652 warnf(config->global, "The Retry-After: time would " in post_per_transfer()
660 warnf(config->global, "Problem %s. " in post_per_transfer()
674 notef(config->global, in post_per_transfer()
683 errorf(config->global, "Failed to truncate file"); in post_per_transfer()
697 errorf(config->global, "Failed seeking to end of file"); in post_per_transfer()
710 if((global->progressmode == CURL_PROGRESS_BAR) && in post_per_transfer()
722 errorf(config->global, "curl: (%d) Failed writing body", result); in post_per_transfer()
729 notef(global, "Removed output file: %s", outs->filename); in post_per_transfer()
731 warnf(global, "Failed removing: %s", outs->filename); in post_per_transfer()
734 warnf(global, "Skipping removal; not a regular file: %s", in post_per_transfer()
744 setfiletime(filetime, outs->filename, global); in post_per_transfer()
770 if(global->parallel) in post_per_transfer()
880 static CURLcode config2setopts(struct GlobalConfig *global, in config2setopts() argument
960 global->noprogress || global->silent ? 1L : 0L); in config2setopts()
970 errorf(global, "proxy support is disabled in this libcurl"); in config2setopts()
1028 if(!global->parallel) { in config2setopts()
1037 errorf(global, "cannot mix --continue-at with --data"); in config2setopts()
1052 errorf(global, "cannot mix --continue-at with --form"); in config2setopts()
1127 errorf(global, "HTTP/0.9 is not supported in this build"); in config2setopts()
1185 warnf(global, "Couldn't find a known_hosts file"); in config2setopts()
1197 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1215 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1230 notef(config->global, in config2setopts()
1235 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1244 notef(config->global, in config2setopts()
1249 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1266 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1273 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1386 warnf(global, in config2setopts()
1423 if((global->progressmode == CURL_PROGRESS_BAR) && in config2setopts()
1424 !global->noprogress && !global->silent) { in config2setopts()
1463 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1470 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1477 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1484 warnf(global, "ignoring %s, not supported by libcurl with %s", in config2setopts()
1498 if(global->tracetype != TRACE_NONE) { in config2setopts()
1753 errorf(config->global, in config2setopts()
1758 errorf(config->global, in config2setopts()
1767 static CURLcode append2query(struct GlobalConfig *global, in append2query() argument
1780 errorf(global, "(%d) Could not parse the URL, " in append2query()
1803 static CURLcode single_transfer(struct GlobalConfig *global, in single_transfer() argument
1812 bool orig_noprogress = global->noprogress; in single_transfer()
1813 bool orig_isatty = global->isatty; in single_transfer()
1861 warnf(config->global, "Got more output options than URLs"); in single_transfer()
1871 errorf(global, "out of memory"); in single_transfer()
1880 (!global->silent || global->showerror) ? in single_transfer()
1892 errorf(global, "out of memory"); in single_transfer()
1909 (!global->silent || global->showerror) ? in single_transfer()
1944 errorf(global, in single_transfer()
1961 errorf(global, in single_transfer()
1984 warnf(global, "Failed creating file for saving etags: \"%s\". " in single_transfer()
2059 result = create_dir_hierarchy(config->headerfile, global); in single_transfer()
2072 errorf(global, "Failed to open %s", config->headerfile); in single_transfer()
2135 result = get_url_file_name(global, &per->outfile, per->url); in single_transfer()
2137 errorf(global, "Failed to extract a filename" in single_transfer()
2149 warnf(global, "bad output glob"); in single_transfer()
2153 warnf(global, "output glob produces empty string"); in single_transfer()
2173 result = create_dir_hierarchy(per->outfile, global); in single_transfer()
2183 notef(global, "skips transfer, \"%s\" exists locally", in single_transfer()
2219 errorf(global, "cannot open '%s'", per->outfile); in single_transfer()
2263 warnf(global, in single_transfer()
2275 warnf(global, in single_transfer()
2287 per->noprogress = global->noprogress = global->isatty = TRUE; in single_transfer()
2291 per->noprogress = global->noprogress = orig_noprogress; in single_transfer()
2292 global->isatty = orig_isatty; in single_transfer()
2296 result = append2query(global, config, per, in single_transfer()
2321 hdrcbdata->global = global; in single_transfer()
2324 result = config2setopts(global, config, per, capath_from_env, in single_transfer()
2378 static CURLcode add_parallel_transfers(struct GlobalConfig *global, in add_parallel_transfers() argument
2391 if(all_pers < (global->parallel_max*2)) { in add_parallel_transfers()
2394 result = create_transfer(global, share, addedp, &skipped); in add_parallel_transfers()
2399 for(per = transfers; per && (all_added < global->parallel_max); in add_parallel_transfers()
2411 result = pre_transfer(global, per); in add_parallel_transfers()
2422 global->parallel_connect ? 0L : 1L); in add_parallel_transfers()
2442 result = create_transfer(global, share, &getadded, &skipped); in add_parallel_transfers()
2463 struct GlobalConfig *global; member
2507 result = add_parallel_transfers(uv->s->global, uv->s->multi, in check_multi_info()
2685 result = add_parallel_transfers(s->global, s->multi, s->share, in parallel_event()
2708 struct GlobalConfig *global = s->global; in check_finished() local
2709 progress_meter(global, &s->start, FALSE); in check_finished()
2727 tres = post_per_transfer(global, ended, tres, &retry, &delay); in check_finished()
2741 if(is_fatal_error(result) || (result && global->fail_early)) in check_finished()
2757 CURLcode tres = add_parallel_transfers(global, s->multi, s->share, in check_finished()
2766 if(is_fatal_error(result) || (result && global->fail_early)) in check_finished()
2772 static CURLcode parallel_transfers(struct GlobalConfig *global, in parallel_transfers() argument
2786 s->global = global; in parallel_transfers()
2791 result = add_parallel_transfers(global, s->multi, s->share, in parallel_transfers()
2799 if(global->test_event_based) in parallel_transfers()
2803 errorf(global, "Testing --parallel event-based requires libuv"); in parallel_transfers()
2833 (void)progress_meter(global, &s->start, TRUE); in parallel_transfers()
2849 static CURLcode serial_transfers(struct GlobalConfig *global, in serial_transfers() argument
2858 result = create_transfer(global, share, &added, &skipped); in serial_transfers()
2862 errorf(global, "no transfer performed"); in serial_transfers()
2873 result = pre_transfer(global, per); in serial_transfers()
2877 if(global->libcurl) { in serial_transfers()
2887 if(global->test_duphandle) { in serial_transfers()
2898 if(global->test_event_based) in serial_transfers()
2905 returncode = post_per_transfer(global, per, result, &retry, &delay_ms); in serial_transfers()
2912 if(is_fatal_error(returncode) || (returncode && global->fail_early)) in serial_transfers()
2917 result = create_transfer(global, share, &added, &skipped); in serial_transfers()
2931 if(per && global->ms_per_transfer) { in serial_transfers()
2935 if(milli < global->ms_per_transfer) { in serial_transfers()
2936 notef(global, "Transfer took %ld ms, waits %ldms as set by --rate", in serial_transfers()
2937 milli, global->ms_per_transfer - milli); in serial_transfers()
2939 tool_go_sleep(global->ms_per_transfer - milli); in serial_transfers()
2948 single_transfer_cleanup(global->current); in serial_transfers()
3040 static CURLcode transfer_per_config(struct GlobalConfig *global, in transfer_per_config() argument
3083 result = single_transfer(global, config, share, capath_from_env, added, in transfer_per_config()
3093 static CURLcode create_transfer(struct GlobalConfig *global, in create_transfer() argument
3100 while(global->current) { in create_transfer()
3101 result = transfer_per_config(global, global->current, share, added, in create_transfer()
3105 global->current = global->current->next; in create_transfer()
3113 static CURLcode run_all_transfers(struct GlobalConfig *global, in run_all_transfers() argument
3118 bool orig_noprogress = global->noprogress; in run_all_transfers()
3119 bool orig_isatty = global->isatty; in run_all_transfers()
3124 if(global->parallel) in run_all_transfers()
3125 result = parallel_transfers(global, share); in run_all_transfers()
3127 result = serial_transfers(global, share); in run_all_transfers()
3134 CURLcode result2 = post_per_transfer(global, per, result, &retry, &delay); in run_all_transfers()
3146 global->noprogress = orig_noprogress; in run_all_transfers()
3147 global->isatty = orig_isatty; in run_all_transfers()
3153 CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) in operate() argument
3168 parseconfig(NULL, global); /* ignore possible failure */ in operate()
3171 if((argc < 2) && (!global->first->url_list)) { in operate()
3181 ParameterError res = parse_args(global, argc, argv); in operate()
3187 tool_help(global->help_category); in operate()
3211 if(global->libcurl) { in operate()
3219 struct OperationConfig *operation = global->first; in operate()
3222 if(global->libcurl) { in operate()
3246 global->current = global->first; in operate()
3249 result = run_all_transfers(global, share, result); in operate()
3252 if(global->libcurl) { in operate()
3257 dumpeasysrc(global); in operate()
3262 errorf(global, "out of memory"); in operate()
3266 varcleanup(global); in operate()