diff --git a/indra/llmessage/aihttptimeout.cpp b/indra/llmessage/aihttptimeout.cpp index b10482890..d642cf2ec 100644 --- a/indra/llmessage/aihttptimeout.cpp +++ b/indra/llmessage/aihttptimeout.cpp @@ -84,6 +84,11 @@ public: #include "aihttptimeout.h" +// If this is set, treat dc::curlio as off in the assertion below. +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) +bool gCurlIo; +#endif + namespace AICurlPrivate { namespace curlthread { @@ -169,7 +174,7 @@ bool HTTPTimeout::data_received(size_t n/*,*/ // using CURLOPT_DEBUGFUNCTION. Note that mDebugIsHeadOrGetMethod is only valid when the debug channel 'curlio' is on, // because it is set in the debug callback function. // This is also normal if we received a HTTP header with an error status, since that can interrupt our upload. - Debug(llassert(upload_error_status || AICurlEasyRequest_wat(*mLockObj)->mDebugIsHeadOrGetMethod || !dc::curlio.is_on())); + Debug(llassert(upload_error_status || AICurlEasyRequest_wat(*mLockObj)->mDebugIsHeadOrGetMethod || !dc::curlio.is_on() || gCurlIo)); // 'Upload finished' detection failed, generate it now. upload_finished(); } diff --git a/indra/llmessage/aihttptimeout.h b/indra/llmessage/aihttptimeout.h index ab7895a3b..5fe876f79 100644 --- a/indra/llmessage/aihttptimeout.h +++ b/indra/llmessage/aihttptimeout.h @@ -133,5 +133,9 @@ class HTTPTimeout : public LLRefCount { } // namespace curlthread } // namespace AICurlPrivate +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) +extern bool gCurlIo; +#endif + #endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1d3361f82..0936422e6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -260,10 +260,6 @@ extern S32 gStartImageHeight; // local globals // -#if defined(CWDEBUG) || defined(DEBUG_CURLIO) -static bool gCurlIo; -#endif - static LLHost gAgentSimHost; static BOOL gSkipOptionalUpdate = FALSE;