aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-03-01 13:49:28 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-03-01 18:30:16 +0000
commiteba197161a5917631dd7732de842c68e3159c951 (patch)
tree4d952862373734940ddde5808a71df63a2adbc4e /src/tool_operate.c
parent36802d6e0c402969cb64ef9dd0d0b799165198d8 (diff)
tool: Moved internal variable isatty to the global config
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 8e1b1a58d..02841c12a 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -346,7 +346,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
/* save the values of noprogress and isatty to restore them later on */
orig_noprogress = global->noprogress;
- orig_isatty = config->isatty;
+ orig_isatty = global->isatty;
/*
** Nested loops start here.
@@ -745,12 +745,12 @@ static CURLcode operate_do(struct GlobalConfig *global,
isatty(fileno(outs.stream)))
/* we send the output to a tty, therefore we switch off the progress
meter */
- global->noprogress = config->isatty = TRUE;
+ global->noprogress = global->isatty = TRUE;
else {
/* progress meter is per download, so restore config
values */
global->noprogress = orig_noprogress;
- config->isatty = orig_isatty;
+ global->isatty = orig_isatty;
}
if(urlnum > 1 && !global->mute) {
@@ -1750,6 +1750,10 @@ static CURLcode operate_do(struct GlobalConfig *global,
quit_curl:
+ /* Reset the global config variables */
+ global->noprogress = orig_noprogress;
+ global->isatty = orig_isatty;
+
/* Free function-local referenced allocated memory */
Curl_safefree(httpgetfields);