From cbf28daed9127b820491a29b1fd5ed3c57692354 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Nov 2002 11:11:10 +0000 Subject: [PATCH] Lehel Bernadt's fix to prevent debug message to get sent on errors when debug wasn't enabled --- lib/sendf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sendf.c b/lib/sendf.c index c4addb527..77c4cf333 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -154,8 +154,9 @@ void Curl_failf(struct SessionHandle *data, const char *fmt, ...) vsnprintf(data->set.errorbuffer, CURL_ERROR_SIZE, fmt, ap); data->state.errorbuf = TRUE; /* wrote error string */ - Curl_debug(data, CURLINFO_TEXT, data->set.errorbuffer, - strlen(data->set.errorbuffer)); + if(data->set.verbose) + Curl_debug(data, CURLINFO_TEXT, data->set.errorbuffer, + strlen(data->set.errorbuffer)); } va_end(ap); }