From d055494706154380a68fb9f5b65d95274682a2ff Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 1 Feb 2013 21:26:08 +0100 Subject: [PATCH 1/2] Libcwd compile fixes include linden_common.h first (is already included through the used headers). --- indra/llappearance/llavatarjoint.cpp | 1 + indra/llappearance/llpolymorph.cpp | 1 + indra/llappearance/llpolyskeletaldistortion.cpp | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp index 6ab341af6..cff862a20 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -27,6 +27,7 @@ //----------------------------------------------------------------------------- // Header Files //----------------------------------------------------------------------------- +#include "linden_common.h" #include "llavatarjoint.h" #include "llgl.h" diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index d5db0a5d3..5850fed08 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -28,6 +28,7 @@ // Header Files //----------------------------------------------------------------------------- +#include "linden_common.h" #include "llpolymorph.h" #include "llavatarappearance.h" #include "llavatarjoint.h" diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 5f6d30e7d..efdf5c577 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -27,8 +27,7 @@ //----------------------------------------------------------------------------- // Header Files //----------------------------------------------------------------------------- -#include "llpreprocessor.h" -#include "llerrorlegacy.h" +#include "linden_common.h" //#include "llcommon.h" //#include "llmemory.h" #include "llavatarappearance.h" From 83fb898852dd6b0ccc9b0e3ce213601dc61394da Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 3 Feb 2013 17:24:26 +0100 Subject: [PATCH 2/2] Bug fix: Wake up curl thread at exit of viewer. --- indra/llmessage/aicurlthread.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/indra/llmessage/aicurlthread.cpp b/indra/llmessage/aicurlthread.cpp index efb5ca46b..c732c9226 100644 --- a/indra/llmessage/aicurlthread.cpp +++ b/indra/llmessage/aicurlthread.cpp @@ -841,10 +841,7 @@ class AICurlThread : public LLThread virtual ~AICurlThread(); // MAIN-THREAD - void wakeup_thread(void); - - // MAIN-THREAD - void stop_thread(void) { mRunning = false; wakeup_thread(); } + void wakeup_thread(bool stop_thread = false); // MAIN-THREAD apr_status_t join_thread(void); @@ -1071,7 +1068,7 @@ void AICurlThread::cleanup_wakeup_fds(void) } // MAIN-THREAD -void AICurlThread::wakeup_thread(void) +void AICurlThread::wakeup_thread(bool stop_thread) { DoutEntering(dc::curl, "AICurlThread::wakeup_thread"); llassert(is_main_thread()); @@ -1080,6 +1077,10 @@ void AICurlThread::wakeup_thread(void) if (!mRunning) return; + // Last time we are run? + if (stop_thread) + mRunning = false; + // Try if curl thread is still awake and if so, pass the new commands directly. if (mWakeUpMutex.tryLock()) { @@ -1857,7 +1858,7 @@ void stopCurlThread(void) using curlthread::AICurlThread; if (AICurlThread::sInstance) { - AICurlThread::sInstance->stop_thread(); + AICurlThread::sInstance->wakeup_thread(true); int count = 401; while(--count && !AICurlThread::sInstance->isStopped()) {