diff --git a/indra/aistatemachine/aistatemachine.h b/indra/aistatemachine/aistatemachine.h index 047fe0515..66d85f003 100644 --- a/indra/aistatemachine/aistatemachine.h +++ b/indra/aistatemachine/aistatemachine.h @@ -197,7 +197,7 @@ class AIStateMachine : public LLThreadSafeRefCount bool mDebugAdvanceStatePending; // True while advance_state() was called by not handled yet. bool mDebugRefCalled; // True when ref() is called (or will be called within the critial area of mMultiplexMutex). #endif -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) protected: bool mSMDebug; // Print debug output only when true. #endif @@ -210,7 +210,7 @@ class AIStateMachine : public LLThreadSafeRefCount mThreadId(AIThreadID::none), mDebugLastState(bs_killed), mDebugShouldRun(false), mDebugAborted(false), mDebugContPending(false), mDebugSetStatePending(false), mDebugAdvanceStatePending(false), mDebugRefCalled(false), #endif -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) mSMDebug(debug), #endif mRuntime(0) diff --git a/indra/aistatemachine/aistatemachinethread.h b/indra/aistatemachine/aistatemachinethread.h index 2891cbb77..d2ca65c8d 100644 --- a/indra/aistatemachine/aistatemachinethread.h +++ b/indra/aistatemachine/aistatemachinethread.h @@ -182,7 +182,7 @@ class AIStateMachineThreadBase : public AIStateMachine { protected: AIStateMachineThreadBase(CWD_ONLY(bool debug)) -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) : AIStateMachine(debug) #endif { } @@ -222,7 +222,7 @@ class AIStateMachineThread : public AIStateMachineThreadBase { public: // Constructor. AIStateMachineThread(CWD_ONLY(bool debug)) -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) : AIStateMachineThreadBase(debug) #endif { diff --git a/indra/aistatemachine/aitimer.h b/indra/aistatemachine/aitimer.h index 3ee510007..a8aeb8ca6 100644 --- a/indra/aistatemachine/aitimer.h +++ b/indra/aistatemachine/aitimer.h @@ -77,7 +77,7 @@ class AITimer : public AIStateMachine { public: AITimer(CWD_ONLY(bool debug = false)) : -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) AIStateMachine(debug), #endif mInterval(0) { DoutEntering(dc::statemachine(mSMDebug), "AITimer(void) [" << (void*)this << "]"); } diff --git a/indra/cwdebug/debug.h b/indra/cwdebug/debug.h index d3c4e686b..3c59db690 100644 --- a/indra/cwdebug/debug.h +++ b/indra/cwdebug/debug.h @@ -74,6 +74,8 @@ struct fake_channel { char const* mLabel; fake_channel(int on, char const* label) : mOn(on), mLabel(label) { } fake_channel(void) : mOn(0) { } + fake_channel& operator()(bool) { return *this; } + fake_channel const& operator()(bool) const { return *this; } bool is_on() const { return !!mOn; } bool is_off() const { return !mOn; } void on() const { } @@ -144,7 +146,11 @@ extern LL_COMMON_API fake_channel const snapshot; #define CWDEBUG_MARKER 0 #define BACKTRACE do { } while(0) +#ifdef DEBUG_CURLIO +#define CWD_ONLY(...) __VA_ARGS__ +#else #define CWD_ONLY(...) +#endif #endif // !DOXYGEN diff --git a/indra/llmessage/aicurleasyrequeststatemachine.cpp b/indra/llmessage/aicurleasyrequeststatemachine.cpp index 6b7bcf654..2642bb92c 100644 --- a/indra/llmessage/aicurleasyrequeststatemachine.cpp +++ b/indra/llmessage/aicurleasyrequeststatemachine.cpp @@ -250,7 +250,7 @@ void AICurlEasyRequestStateMachine::finish_impl(void) } AICurlEasyRequestStateMachine::AICurlEasyRequestStateMachine(CWD_ONLY(bool debug)) : -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) AIStateMachine(debug), #endif mTotalDelayTimeout(AIHTTPTimeoutPolicy::getDebugSettingsCurlTimeout().getTotalDelay()) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 80e68f608..d7bac5e12 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1414,7 +1414,7 @@ void LLMeshUploadThread::preStart() AIMeshUpload::AIMeshUpload(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures, bool upload_skin, bool upload_joints, std::string const& upload_url, bool do_upload, LLHandle const& fee_observer, LLHandle const& upload_observer) : -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) AIStateMachine(false), #endif mMeshUpload(new AIStateMachineThread(CWD_ONLY(false))), mWholeModelUploadURL(upload_url) diff --git a/indra/newview/statemachine/aifetchinventoryfolder.h b/indra/newview/statemachine/aifetchinventoryfolder.h index 59419fc86..d95fd5ca1 100644 --- a/indra/newview/statemachine/aifetchinventoryfolder.h +++ b/indra/newview/statemachine/aifetchinventoryfolder.h @@ -59,7 +59,7 @@ class AIFetchInventoryFolder : public AIStateMachine { public: AIFetchInventoryFolder(CWD_ONLY(bool debug = false)) : -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) AIStateMachine(debug), #endif mCreate(false), mFetchContents(false), mExists(false), mCreated(false) diff --git a/indra/newview/statemachine/aifilepicker.cpp b/indra/newview/statemachine/aifilepicker.cpp index 6754142e4..a17ebc864 100644 --- a/indra/newview/statemachine/aifilepicker.cpp +++ b/indra/newview/statemachine/aifilepicker.cpp @@ -61,7 +61,7 @@ char const* AIFilePicker::state_str_impl(state_type run_state) const } AIFilePicker::AIFilePicker(CWD_ONLY(bool debug)) : -#ifdef CWDEBUG +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) AIStateMachine(debug), #endif mPluginManager(NULL), mCanceled(false)