From df20f918bab16ad4e5b211cb041bf99f47986129 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 5 Jul 2012 03:10:16 +0200 Subject: [PATCH] New libcwd channel 'curlio'. Enable printing of libcurl 'IO' debug messages when libcwd channel 'curlio' is turned on (added to .libcwdrc). Avoiding a recompile. --- indra/cwdebug/debug.cc | 1 + indra/cwdebug/debug.h | 1 + indra/llmessage/aicurl.cpp | 6 ++---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/cwdebug/debug.cc b/indra/cwdebug/debug.cc index bd7d712f4..5235ee8d6 100644 --- a/indra/cwdebug/debug.cc +++ b/indra/cwdebug/debug.cc @@ -174,6 +174,7 @@ void stop_recording_backtraces(void) channel_ct statemachine DDCN("STATEMACHINE"); //!< This debug channel is used for output related to class AIStateMachine. channel_ct caps DDCN("CAPS"); //!< This debug channel is used for output related to Capabilities. channel_ct curl DDCN("CURL"); //!< This debug channel is used for output related to Curl. + channel_ct curlio DDCN("CURLIO"); //!< This debug channel is used to print debug output of libcurl. } // namespace dc } // namespace DEBUGCHANNELS diff --git a/indra/cwdebug/debug.h b/indra/cwdebug/debug.h index 10750f6ab..f148e7667 100644 --- a/indra/cwdebug/debug.h +++ b/indra/cwdebug/debug.h @@ -119,6 +119,7 @@ extern CWD_API channel_ct backtrace; extern CWD_API channel_ct statemachine; extern CWD_API channel_ct caps; extern CWD_API channel_ct curl; +extern CWD_API channel_ct curlio; #endif diff --git a/indra/llmessage/aicurl.cpp b/indra/llmessage/aicurl.cpp index 0f9705154..ff3dba5f2 100644 --- a/indra/llmessage/aicurl.cpp +++ b/indra/llmessage/aicurl.cpp @@ -838,7 +838,7 @@ static int curl_debug_callback(CURL*, curl_infotype infotype, char* buf, size_t marker << (void*)request->get_lockobj(); libcw_do.push_marker(); libcw_do.marker().assign(marker.str().data(), marker.str().size()); - LibcwDoutScopeBegin(LIBCWD_DEBUGCHANNELS, libcw_do, dc::curl|cond_nonewline_cf(infotype == CURLINFO_TEXT)) + LibcwDoutScopeBegin(LIBCWD_DEBUGCHANNELS, libcw_do, dc::curlio|cond_nonewline_cf(infotype == CURLINFO_TEXT)) switch (infotype) { case CURLINFO_TEXT: @@ -930,17 +930,15 @@ void CurlEasyRequest::applyDefaultOptions(void) //setopt(CURLOPT_DNS_CACHE_TIMEOUT, 0); // Set the CURL options for either SOCKS or HTTP proxy. applyProxySettings(); -#if 0 // Cause libcurl to print all it's I/O traffic on the debug channel. Debug( - if (dc::curl.is_on()) + if (dc::curlio.is_on()) { setopt(CURLOPT_VERBOSE, 1); setopt(CURLOPT_DEBUGFUNCTION, &curl_debug_callback); setopt(CURLOPT_DEBUGDATA, this); } ); -#endif } void CurlEasyRequest::finalizeRequest(std::string const& url)