diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-02-27 20:51:49 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-02-27 21:01:08 +0000 |
commit | 4efa1d29e274079ed75f4e93115008816e2dda9f (patch) | |
tree | 318e33b9db34811ebd3d21832bd635edf39f726d /src/tool_getparam.c | |
parent | fd97c17bb76aa3031026d6714e2f2409e9a1c3aa (diff) | |
download | curl-4efa1d29e274079ed75f4e93115008816e2dda9f.tar.gz |
tool: Moved --trace and --verbose to the global config
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r-- | src/tool_getparam.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 16a7275bb..d858ff5f3 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -522,20 +522,20 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ GetStr(&config->dns_servers, nextarg); break; case 'g': /* --trace */ - GetStr(&config->trace_dump, nextarg); - if(config->tracetype && (config->tracetype != TRACE_BIN)) + GetStr(&global->trace_dump, nextarg); + if(global->tracetype && (global->tracetype != TRACE_BIN)) warnf(config, "--trace overrides an earlier trace/verbose option\n"); - config->tracetype = TRACE_BIN; + global->tracetype = TRACE_BIN; break; case 'G': /* --npn */ config->nonpn = (!toggle)?TRUE:FALSE; break; case 'h': /* --trace-ascii */ - GetStr(&config->trace_dump, nextarg); - if(config->tracetype && (config->tracetype != TRACE_ASCII)) + GetStr(&global->trace_dump, nextarg); + if(global->tracetype && (global->tracetype != TRACE_ASCII)) warnf(config, "--trace-ascii overrides an earlier trace/verbose option\n"); - config->tracetype = TRACE_ASCII; + global->tracetype = TRACE_ASCII; break; case 'H': /* --alpn */ config->noalpn = (!toggle)?TRUE:FALSE; @@ -809,7 +809,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ config->proxyanyauth = toggle; break; case 'o': /* --trace-time */ - config->tracetime = toggle; + global->tracetime = toggle; break; case 'p': /* --ignore-content-length */ config->ignorecl = toggle; @@ -1684,18 +1684,18 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ case 'v': if(toggle) { /* the '%' thing here will cause the trace get sent to stderr */ - Curl_safefree(config->trace_dump); - config->trace_dump = strdup("%"); - if(!config->trace_dump) + Curl_safefree(global->trace_dump); + global->trace_dump = strdup("%"); + if(!global->trace_dump) return PARAM_NO_MEM; - if(config->tracetype && (config->tracetype != TRACE_PLAIN)) + if(global->tracetype && (global->tracetype != TRACE_PLAIN)) warnf(config, "-v, --verbose overrides an earlier trace/verbose option\n"); - config->tracetype = TRACE_PLAIN; + global->tracetype = TRACE_PLAIN; } else /* verbose is disabled here */ - config->tracetype = TRACE_NONE; + global->tracetype = TRACE_NONE; break; case 'V': if(toggle) /* --no-version yields no output! */ |