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:
Aleric Inglewood
2013-11-21 01:02:01 +01:00
parent bdef8dc185
commit 53e26d4909
8 changed files with 15 additions and 9 deletions

View File

@@ -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)

View File

@@ -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
{

View File

@@ -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 << "]"); }

View File

@@ -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

View File

@@ -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())

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)