From fb38f6adea57aa67c1304f0d3079f0f494745f34 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 21 Jul 2012 21:51:24 +0200 Subject: [PATCH] Always write curl I/O debug info for the login attempt. --- indra/llmessage/aicurl.cpp | 2 ++ indra/newview/llstartup.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/aicurl.cpp b/indra/llmessage/aicurl.cpp index f11e8bdb3..8d696acba 100644 --- a/indra/llmessage/aicurl.cpp +++ b/indra/llmessage/aicurl.cpp @@ -887,6 +887,8 @@ 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()); + if (!debug::channels::dc::curlio.is_on()) + debug::channels::dc::curlio.on(); LibcwDoutScopeBegin(LIBCWD_DEBUGCHANNELS, libcw_do, dc::curlio|cond_nonewline_cf(infotype == CURLINFO_TEXT)) switch (infotype) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 15ca87ad7..10f10cc90 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -253,7 +253,9 @@ extern S32 gStartImageHeight; // local globals // - +#ifdef CWDEBUG +static bool gCurlIo; +#endif static LLHost gAgentSimHost; static BOOL gSkipOptionalUpdate = FALSE; @@ -1334,6 +1336,9 @@ bool idle_startup() llinfos << "Authenticating with " << grid_uri << llendl; + // Always write curl I/O debug info for the login attempt. + Debug(gCurlIo = dc::curl.is_on() && !dc::curlio.is_on(); if (gCurlIo) dc::curlio.on()); + // TODO if statement here to use web_login_key // OGPX : which routine would this end up in? the LLSD or XMLRPC, or ....? LLUserAuth::getInstance()->authenticate( @@ -1408,6 +1413,7 @@ bool idle_startup() LL_DEBUGS("AppInit") << "downloading..." << LL_ENDL; return FALSE; } + Debug(if (gCurlIo) dc::curlio.off()); // Login succeeded: restore dc::curlio to original state. LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE ); progress += 0.01f; set_startup_status(progress, LLTrans::getString("LoginProcessingResponse"), auth_message);