SH-3328 llcorehttp tracing control needed defensive logic for missing setting

Guard for the typical case of a missing setting with a bracketing
gSavedSettings.controlExists() call.
meow-7.2.2
Monty Brandenberg 2012-08-17 13:16:22 -04:00
parent 9de14fe45b
commit d06739facf
1 changed files with 8 additions and 4 deletions

View File

@ -85,10 +85,14 @@ void LLAppCoreHttp::init()
// 1 - Basic start, stop simple transitions
// 2 - libcurl CURLOPT_VERBOSE mode with brief lines
// 3 - with partial data content
long trace_level(0L);
trace_level = long(gSavedSettings.getU32("QAModeHttpTrace"));
status = LLCore::HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_TRACE, trace_level);
static const std::string http_trace("QAModeHttpTrace");
if (gSavedSettings.controlExists(http_trace))
{
long trace_level(0L);
trace_level = long(gSavedSettings.getU32(http_trace));
status = LLCore::HttpRequest::setPolicyGlobalOption(LLCore::HttpRequest::GP_TRACE, trace_level);
}
// Setup default policy and constrain if directed to
mPolicyDefault = LLCore::HttpRequest::DEFAULT_POLICY_ID;
static const std::string texture_concur("TextureFetchConcurrency");