Lines Matching refs:global

107 static CURLcode single_transfer(struct GlobalConfig *global,
112 static CURLcode create_transfer(struct GlobalConfig *global,
264 static CURLcode pre_transfer(struct GlobalConfig *global,
336 (void)global;
371 static CURLcode post_per_transfer(struct GlobalConfig *global,
394 if(global->silent && !global->showerror)
400 (!global->silent || global->showerror)) {
412 if(!global->silent || global->showerror)
423 warnf(config->global, "Error setting extended attributes on '%s': %s",
445 errorf(global, "Failed writing body");
568 warnf(config->global, "The Retry-After: time would "
576 warnf(config->global, "Problem %s. "
590 notef(config->global,
599 errorf(config->global, "Failed to truncate file");
613 errorf(config->global, "Failed seeking to end of file");
625 if((global->progressmode == CURL_PROGRESS_BAR) &&
637 errorf(config->global, "curl: (%d) Failed writing body", result);
644 notef(global, "Removed output file: %s", outs->filename);
646 warnf(global, "Failed removing: %s", outs->filename);
649 warnf(global, "Skipping removal; not a regular file: %s",
659 setfiletime(filetime, outs->filename, global);
685 if(global->parallel)
736 static CURLcode single_transfer(struct GlobalConfig *global,
744 bool orig_noprogress = global->noprogress;
745 bool orig_isatty = global->isatty;
797 warnf(config->global, "Got more output options than URLs");
807 errorf(global, "out of memory");
818 (!global->silent || global->showerror)?
835 errorf(global, "out of memory");
840 errorf(global, "out of memory");
854 (!global->silent || global->showerror)?
890 errorf(global,
907 errorf(global,
930 warnf(global, "Failed creating file for saving etags: \"%s\". "
1007 errorf(global, "Failed to open %s", config->headerfile);
1072 errorf(global, "Failed to extract a sensible file name"
1077 errorf(global, "Remote file name has no length");
1089 warnf(global, "bad output glob");
1093 warnf(global, "output glob produces empty string");
1112 result = create_dir_hierarchy(per->outfile, global);
1148 errorf(global, "Can't open '%s'", per->outfile);
1192 warnf(global,
1204 warnf(global,
1216 per->noprogress = global->noprogress = global->isatty = TRUE;
1220 per->noprogress = global->noprogress = orig_noprogress;
1221 global->isatty = orig_isatty;
1233 errorf(global, "(%d) Could not parse the URL, "
1335 global->noprogress || global->silent?1L:0L);
1345 errorf(global, "proxy support is disabled in this libcurl");
1408 if(!global->parallel) {
1417 errorf(global, "cannot mix --continue-at with --data");
1432 errorf(global, "cannot mix --continue-at with --form");
1507 errorf(global, "HTTP/0.9 is not supported in this build");
1561 warnf(global, "ignoring %s, not supported by libcurl",
1578 warnf(global,
1818 warnf(global, "Couldn't find a known_hosts file");
1845 warnf(global,
1881 if((global->progressmode == CURL_PROGRESS_BAR) &&
1882 !global->noprogress && !global->silent) {
1941 if(global->tracetype != TRACE_NONE) {
2084 hdrcbdata->global = global;
2246 static CURLcode add_parallel_transfers(struct GlobalConfig *global,
2259 if(all_pers < (global->parallel_max*2)) {
2260 result = create_transfer(global, share, addedp);
2264 for(per = transfers; per && (all_added < global->parallel_max);
2277 result = pre_transfer(global, per);
2288 global->parallel_connect ? 0L : 1L);
2301 result = create_transfer(global, share, &getadded);
2317 static CURLcode parallel_transfers(struct GlobalConfig *global,
2337 result = add_parallel_transfers(global, multi, share,
2364 progress_meter(global, &start, FALSE);
2387 tres = post_per_transfer(global, ended, tres, &retry, &delay);
2401 if(is_fatal_error(result) || (result && global->fail_early))
2422 CURLcode tres = add_parallel_transfers(global, multi, share,
2431 if(is_fatal_error(result) || (result && global->fail_early))
2436 (void)progress_meter(global, &start, TRUE);
2451 static CURLcode serial_transfers(struct GlobalConfig *global,
2459 result = create_transfer(global, share, &added);
2463 errorf(global, "no transfer performed");
2471 result = pre_transfer(global, per);
2475 if(global->libcurl) {
2482 if(global->test_event_based)
2488 returncode = post_per_transfer(global, per, result, &retry, &delay_ms);
2495 if(is_fatal_error(returncode) || (returncode && global->fail_early))
2499 result = create_transfer(global, share, &added);
2511 if(per && global->ms_per_transfer) {
2515 if(milli < global->ms_per_transfer) {
2516 notef(global, "Transfer took %ld ms, waits %ldms as set by --rate",
2517 milli, global->ms_per_transfer - milli);
2519 tool_go_sleep(global->ms_per_transfer - milli);
2528 single_transfer_cleanup(global->current);
2534 static CURLcode transfer_per_config(struct GlobalConfig *global,
2592 errorf(global, "out of memory");
2603 errorf(global, "out of memory");
2617 errorf(global, "out of memory");
2636 result = single_transfer(global, config, share, capath_from_env, added);
2645 static CURLcode create_transfer(struct GlobalConfig *global,
2651 while(global->current) {
2652 result = transfer_per_config(global, global->current, share, added);
2655 global->current = global->current->next;
2663 static CURLcode run_all_transfers(struct GlobalConfig *global,
2668 bool orig_noprogress = global->noprogress;
2669 bool orig_isatty = global->isatty;
2674 if(global->parallel)
2675 result = parallel_transfers(global, share);
2677 result = serial_transfers(global, share);
2684 CURLcode result2 = post_per_transfer(global, per, result, &retry, &delay);
2695 /* Reset the global config variables */
2696 global->noprogress = orig_noprogress;
2697 global->isatty = orig_isatty;
2703 CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
2718 parseconfig(NULL, global); /* ignore possible failure */
2721 if((argc < 2) && (!global->first->url_list)) {
2731 ParameterError res = parse_args(global, argc, argv);
2737 tool_help(global->help_category);
2755 if(global->libcurl) {
2763 struct OperationConfig *operation = global->first;
2766 if(global->libcurl) {
2790 global->current = global->first;
2793 result = run_all_transfers(global, share, result);
2796 if(global->libcurl) {
2801 dumpeasysrc(global);
2806 errorf(global, "out of memory");
2810 varcleanup(global);