Compile fix for -DDEBUG_CURLIO
Since that fakes the libcwd macros, this is needed to compile the recent change that allows to only turn on debugging output for certain statemachine objects when DEBUG_CURLIO is defined, but libcwd is not used (CWDEBUG is undefined).
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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 << "]"); }
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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<LLWholeModelFeeObserver> const& fee_observer, LLHandle<LLWholeModelUploadObserver> const& upload_observer) :
|
||||
#ifdef CWDEBUG
|
||||
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||
AIStateMachine(false),
|
||||
#endif
|
||||
mMeshUpload(new AIStateMachineThread<LLMeshUploadThread>(CWD_ONLY(false))), mWholeModelUploadURL(upload_url)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user