aboutsummaryrefslogtreecommitdiff
path: root/src/tool_cb_dbg.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-02-27 20:51:49 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-02-27 21:01:08 +0000
commit4efa1d29e274079ed75f4e93115008816e2dda9f (patch)
tree318e33b9db34811ebd3d21832bd635edf39f726d /src/tool_cb_dbg.c
parentfd97c17bb76aa3031026d6714e2f2409e9a1c3aa (diff)
tool: Moved --trace and --verbose to the global config
Diffstat (limited to 'src/tool_cb_dbg.c')
-rw-r--r--src/tool_cb_dbg.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index 8c79a4b3b..e92116532 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -44,8 +44,9 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
unsigned char *data, size_t size,
void *userdata)
{
- struct OperationConfig *config = userdata;
- FILE *output = config->errors;
+ struct OperationConfig *operation = userdata;
+ struct GlobalConfig *config = operation->global;
+ FILE *output = operation->errors;
const char *text;
struct timeval tv;
struct tm *now;
@@ -76,7 +77,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
config->trace_stream = stdout;
else if(curlx_strequal("%", config->trace_dump))
/* Ok, this is somewhat hackish but we do it undocumented for now */
- config->trace_stream = config->errors; /* aka stderr */
+ config->trace_stream = operation->errors; /* aka stderr */
else {
config->trace_stream = fopen(config->trace_dump, "w");
config->trace_fopened = TRUE;
@@ -87,7 +88,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
output = config->trace_stream;
if(!output) {
- warnf(config, "Failed to create/open output");
+ warnf(operation, "Failed to create/open output");
return 0;
}
@@ -141,7 +142,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
to stderr or stdout, we don't display the alert about the data not
being shown as the data _is_ shown then just not via this
function */
- if(!config->isatty ||
+ if(!operation->isatty ||
((output != stderr) && (output != stdout))) {
if(!newl)
fprintf(output, "%s%s ", timebuf, s_infotype[type]);