From beacb5c701c7d1d327e7d1a6f52b46132eb57d4d Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 17 Apr 2014 15:47:50 -0400 Subject: [PATCH 01/34] [Floater Flexibility] Fix that the preferences button wasn't working, thanks Nomade for pointing this one out. --- indra/newview/skins/default/xui/en-us/panel_toolbar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/panel_toolbar.xml b/indra/newview/skins/default/xui/en-us/panel_toolbar.xml index a29f6239f..5d0c3e761 100644 --- a/indra/newview/skins/default/xui/en-us/panel_toolbar.xml +++ b/indra/newview/skins/default/xui/en-us/panel_toolbar.xml @@ -401,7 +401,7 @@ From 4c82a5660fb2a67b8659ea66fc0a6f29b6ef0b14 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 17 Apr 2014 18:20:34 -0400 Subject: [PATCH 02/34] [LLMeshRepo sync] Change camelcase LLConvexDecomp to lowercase, so mergetool is happy~ --- indra/libndhacd/CMakeLists.txt | 6 +++--- ...{LLConvexDecomposition.cpp => llconvexdecomposition.cpp} | 4 ++-- .../{LLConvexDecomposition.h => llconvexdecomposition.h} | 2 +- ...sitionStubImpl.cpp => llconvexdecompositionstubimpl.cpp} | 4 ++-- ...ompositionStubImpl.h => llconvexdecompositionstubimpl.h} | 4 ++-- indra/libndhacd/nd_StructTracer.h | 2 +- indra/libndhacd/nd_hacdConvexDecomposition.h | 2 +- indra/libndhacd/nd_hacdStructs.cpp | 1 - indra/libndhacd/nd_hacdStructs.h | 2 +- indra/libndhacd/nd_hacdUtils.h | 1 - indra/newview/llmeshrepository.h | 2 +- 11 files changed, 14 insertions(+), 16 deletions(-) rename indra/libndhacd/{LLConvexDecomposition.cpp => llconvexdecomposition.cpp} (96%) rename indra/libndhacd/{LLConvexDecomposition.h => llconvexdecomposition.h} (99%) rename indra/libndhacd/{LLConvexDecompositionStubImpl.cpp => llconvexdecompositionstubimpl.cpp} (97%) rename indra/libndhacd/{LLConvexDecompositionStubImpl.h => llconvexdecompositionstubimpl.h} (97%) diff --git a/indra/libndhacd/CMakeLists.txt b/indra/libndhacd/CMakeLists.txt index bcc1973c0..28c4d2f9a 100644 --- a/indra/libndhacd/CMakeLists.txt +++ b/indra/libndhacd/CMakeLists.txt @@ -7,7 +7,7 @@ include(00-Common) include_directories(${LIBS_OPEN_DIR}/libhacd) set (libndhacd_SOURCE_FILES - LLConvexDecomposition.cpp + llconvexdecomposition.cpp nd_hacdConvexDecomposition.cpp nd_hacdStructs.cpp nd_hacdUtils.cpp @@ -16,12 +16,12 @@ set (libndhacd_SOURCE_FILES ) set (libndhacd_HEADER_FILES - LLConvexDecomposition.h + llconvexdecomposition.h ndConvexDecomposition.h nd_hacdConvexDecomposition.h nd_hacdStructs.h nd_StructTracer.h - LLConvexDecompositionStubImpl.h + llconvexdecompositionstubimpl.h nd_EnterExitTracer.h nd_hacdDefines.h nd_hacdUtils.h diff --git a/indra/libndhacd/LLConvexDecomposition.cpp b/indra/libndhacd/llconvexdecomposition.cpp similarity index 96% rename from indra/libndhacd/LLConvexDecomposition.cpp rename to indra/libndhacd/llconvexdecomposition.cpp index 80ec5f435..2c1948629 100644 --- a/indra/libndhacd/LLConvexDecomposition.cpp +++ b/indra/libndhacd/llconvexdecomposition.cpp @@ -1,5 +1,5 @@ /** - * @file LLConvexDecomposition.cpp + * @file llconvexdecomposition.cpp * @author falcon@lindenlab.com * @brief A stub implementation of LLConvexDecomposition interface * @@ -35,7 +35,7 @@ #include "nd_hacdConvexDecomposition.h" -#include "LLConvexDecomposition.h" +#include "llconvexdecomposition.h" /*static */bool LLConvexDecomposition::s_isInitialized = false; diff --git a/indra/libndhacd/LLConvexDecomposition.h b/indra/libndhacd/llconvexdecomposition.h similarity index 99% rename from indra/libndhacd/LLConvexDecomposition.h rename to indra/libndhacd/llconvexdecomposition.h index 2d7f5aa3a..9603c434f 100644 --- a/indra/libndhacd/LLConvexDecomposition.h +++ b/indra/libndhacd/llconvexdecomposition.h @@ -1,5 +1,5 @@ /** - * @file LLConvexDecomposition.cpp + * @file llconvexdecomposition.cpp * @brief LLConvexDecomposition interface definition * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ diff --git a/indra/libndhacd/LLConvexDecompositionStubImpl.cpp b/indra/libndhacd/llconvexdecompositionstubimpl.cpp similarity index 97% rename from indra/libndhacd/LLConvexDecompositionStubImpl.cpp rename to indra/libndhacd/llconvexdecompositionstubimpl.cpp index 018143de1..d91f2ea86 100644 --- a/indra/libndhacd/LLConvexDecompositionStubImpl.cpp +++ b/indra/libndhacd/llconvexdecompositionstubimpl.cpp @@ -1,5 +1,5 @@ /** - * @file LLConvexDecompositionStubImpl.cpp + * @file llconvexdecompositionstubimpl.cpp * @author falcon@lindenlab.com * @brief A stub implementation of LLConvexDecomposition * @@ -28,7 +28,7 @@ #include #include -#include "LLConvexDecompositionStubImpl.h" +#include "llconvexdecompositionstubimpl.h" LLConvexDecomposition* LLConvexDecompositionImpl::getInstance() { diff --git a/indra/libndhacd/LLConvexDecompositionStubImpl.h b/indra/libndhacd/llconvexdecompositionstubimpl.h similarity index 97% rename from indra/libndhacd/LLConvexDecompositionStubImpl.h rename to indra/libndhacd/llconvexdecompositionstubimpl.h index 9599175ef..023bd7c23 100644 --- a/indra/libndhacd/LLConvexDecompositionStubImpl.h +++ b/indra/libndhacd/llconvexdecompositionstubimpl.h @@ -1,5 +1,5 @@ /** - * @file LLConvexDecompositionStubImpl.h + * @file llconvexdecompositionstubimpl.h * @author falcon@lindenlab.com * @brief A stub implementation of LLConvexDecomposition * @@ -29,7 +29,7 @@ #ifndef LL_CONVEX_DECOMP_UTIL_H #define LL_CONVEX_DECOMP_UTIL_H -#include "LLConvexDecomposition.h" +#include "llconvexdecomposition.h" class LLConvexDecompositionImpl : public LLConvexDecomposition { diff --git a/indra/libndhacd/nd_StructTracer.h b/indra/libndhacd/nd_StructTracer.h index 6dbe3ce3e..631bfd788 100644 --- a/indra/libndhacd/nd_StructTracer.h +++ b/indra/libndhacd/nd_StructTracer.h @@ -21,7 +21,7 @@ #include "ndConvexDecomposition.h" -#include "LLConvexDecomposition.h" +#include "llconvexdecomposition.h" #include "nd_hacdStructs.h" namespace ndStructTracer diff --git a/indra/libndhacd/nd_hacdConvexDecomposition.h b/indra/libndhacd/nd_hacdConvexDecomposition.h index e31779c65..6b7c7f952 100644 --- a/indra/libndhacd/nd_hacdConvexDecomposition.h +++ b/indra/libndhacd/nd_hacdConvexDecomposition.h @@ -19,7 +19,7 @@ #ifndef ND_HACD_CONVEXDECOMP_H #define ND_HACD_CONVEXDECOMP_H -#include "LLConvexDecomposition.h" +#include "llconvexdecomposition.h" #include #include diff --git a/indra/libndhacd/nd_hacdStructs.cpp b/indra/libndhacd/nd_hacdStructs.cpp index 4a5c9e6fb..8d3a21462 100644 --- a/indra/libndhacd/nd_hacdStructs.cpp +++ b/indra/libndhacd/nd_hacdStructs.cpp @@ -17,7 +17,6 @@ */ #include "nd_hacdStructs.h" -#include "LLConvexDecomposition.h" void DecompHull::clear() { diff --git a/indra/libndhacd/nd_hacdStructs.h b/indra/libndhacd/nd_hacdStructs.h index 5097b7428..c295fedca 100644 --- a/indra/libndhacd/nd_hacdStructs.h +++ b/indra/libndhacd/nd_hacdStructs.h @@ -21,7 +21,7 @@ #include "nd_hacdDefines.h" #include "hacdHACD.h" -#include "LLConvexDecomposition.h" +#include "llconvexdecomposition.h" #include struct LLCDHull; diff --git a/indra/libndhacd/nd_hacdUtils.h b/indra/libndhacd/nd_hacdUtils.h index e2d80e78d..8a59125ab 100644 --- a/indra/libndhacd/nd_hacdUtils.h +++ b/indra/libndhacd/nd_hacdUtils.h @@ -20,7 +20,6 @@ #define ND_HACD_UTILS_H #include "nd_hacdStructs.h" -#include "LLConvexDecomposition.h" tHACD* init( int nConcavity, int nClusters, int nMaxVerticesPerHull, double dMaxConnectDist, HACDDecoder *aData ); DecompData decompose( tHACD *aHACD ); diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 4b535f397..33447db7b 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -36,7 +36,7 @@ #define LLCONVEXDECOMPINTER_STATIC 1 -#include "LLConvexDecomposition.h" +#include "llconvexdecomposition.h" #include "lluploadfloaterobservers.h" #include "aistatemachinethread.h" From 5c06afc977d173435dc063936cdc7c9d2afbcf47 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 17 Apr 2014 20:23:48 -0400 Subject: [PATCH 03/34] [LLMeshRepo sync] AICurl updates toward LLCurl LLHTTPClient::getByteRange no longer throws AICurlNoEasyHandle, instead it returns whether or not it threw, to match the true/false convention of LLCurl. - In addition, the header param has been shifted to earlier in this function to ease diffings. ResponderBase now has static bool isGoodStatus, introduced into the Responder base class of LLCurl --- indra/llmessage/llhttpclient.cpp | 16 ++- indra/llmessage/llhttpclient.h | 14 +- indra/newview/llfloateravatarpicker.cpp | 2 +- indra/newview/llmeshrepository.cpp | 167 +++++++++++------------- indra/newview/llmeshrepository.h | 2 +- indra/newview/llvoavatarself.cpp | 2 +- 6 files changed, 99 insertions(+), 104 deletions(-) diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 1374a1b93..bd40d8e69 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -237,13 +237,21 @@ void LLHTTPClient::request( req->run(parent, new_parent_state, parent != NULL, true, default_engine); } -void LLHTTPClient::getByteRange(std::string const& url, S32 offset, S32 bytes, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) +bool LLHTTPClient::getByteRange(std::string const& url, AIHTTPHeaders& headers, S32 offset, S32 bytes, ResponderPtr responder/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { - if(offset > 0 || bytes > 0) + try { - headers.addHeader("Range", llformat("bytes=%d-%d", offset, offset + bytes - 1)); + if (offset > 0 || bytes > 0) + { + headers.addHeader("Range", llformat("bytes=%d-%d", offset, offset + bytes - 1)); + } + request(url, HTTP_GET, NULL, responder, headers, NULL/*,*/ DEBUG_CURLIO_PARAM(debug)); } - request(url, HTTP_GET, NULL, responder, headers, NULL/*,*/ DEBUG_CURLIO_PARAM(debug)); + catch(AICurlNoEasyHandle const&) + { + return false; + } + return true; } void LLHTTPClient::head(std::string const& url, ResponderHeadersOnly* responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index a366811d6..3bb60b04f 100644 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h @@ -133,6 +133,14 @@ public: public: typedef boost::shared_ptr buffer_ptr_t; + /** + * @brief return true if the status code indicates success. + */ + static bool isGoodStatus(U32 status) + { + return((200 <= status) && (status < 300)); + } + protected: ResponderBase(void); virtual ~ResponderBase(); @@ -452,9 +460,9 @@ public: static void head(std::string const& url, ResponderHeadersOnly* responder/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)) { AIHTTPHeaders headers; head(url, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } - static void getByteRange(std::string const& url, S32 offset, S32 bytes, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)); - static void getByteRange(std::string const& url, S32 offset, S32 bytes, ResponderPtr responder/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)) - { AIHTTPHeaders headers; getByteRange(url, offset, bytes, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } + static bool getByteRange(std::string const& url, AIHTTPHeaders& headers, S32 offset, S32 bytes, ResponderPtr responder/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)); + static bool getByteRange(std::string const& url, S32 offset, S32 bytes, ResponderPtr responder/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)) + { AIHTTPHeaders headers; return getByteRange(url, headers, offset, bytes, responder/*,*/ DEBUG_CURLIO_PARAM(debug)); } static void get(std::string const& url, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)); static void get(std::string const& url, ResponderPtr responder/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index f503fa3ba..718750b5f 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -427,7 +427,7 @@ public: // in case of invalid characters, the avatar picker returns a 400 // just set it to process so it displays 'not found' - if ((200 <= status && status < 300) || status == 400) + if (isGoodStatus(status) || status == 400) { if (LLFloaterAvatarPicker::instanceExists()) { diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 5a55d2562..4b46e1ca0 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -239,7 +239,7 @@ public: } } - /*virtual*/ void completedRaw(U32 status, const std::string& reason, + virtual void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer); @@ -278,7 +278,7 @@ public: } } - /*virtual*/ void completedRaw(U32 status, const std::string& reason, + virtual void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer); @@ -306,7 +306,7 @@ public: llassert(mProcessed || LLApp::isExiting()); } - /*virtual*/ void completedRaw(U32 status, const std::string& reason, + virtual void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer); @@ -334,7 +334,7 @@ public: llassert(mProcessed || LLApp::isExiting()); } - /*virtual*/ void completedRaw(U32 status, const std::string& reason, + virtual void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer); @@ -362,7 +362,7 @@ public: llassert(mProcessed || LLApp::isExiting()); } - /*virtual*/ void completedRaw(U32 status, const std::string& reason, + virtual void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer); @@ -437,7 +437,7 @@ public: { } - /*virtual*/ void completed(U32 status, + virtual void completed(U32 status, const std::string& reason, const LLSD& content) { @@ -451,7 +451,7 @@ public: LLWholeModelFeeObserver* observer = mObserverHandle.get(); - if (((200 <= status) && (status < 300)) && + if (isGoodStatus(status) && cc["state"].asString() == "upload") { mWholeModelUploadURL = cc["uploader"].asString(); @@ -495,7 +495,7 @@ public: { } - /*virtual*/ void completed(U32 status, + virtual void completed(U32 status, const std::string& reason, const LLSD& content) { @@ -511,7 +511,7 @@ public: // requested "mesh" asset type isn't actually the type // of the resultant object, fix it up here. - if (((200 <= status) && (status < 300)) && + if (isGoodStatus(status) && cc["state"].asString() == "complete") { mModelData["asset_type"] = "object"; @@ -583,50 +583,35 @@ void LLMeshRepoThread::run() while (!mLODReqQ.empty() && count < MAX_MESH_REQUESTS_PER_SECOND && sActiveLODRequests < (S32)sMaxConcurrentRequests) { + if (mMutex) { mMutex->lock(); LODRequest req = mLODReqQ.front(); mLODReqQ.pop(); LLMeshRepository::sLODProcessing--; mMutex->unlock(); - try + if (!fetchMeshLOD(req.mMeshParams, req.mLOD, count))//failed, resubmit { - fetchMeshLOD(req.mMeshParams, req.mLOD, count); - } - catch(AICurlNoEasyHandle const& error) - { - llwarns << "fetchMeshLOD() failed: " << error.what() << llendl; mMutex->lock(); - LLMeshRepository::sLODProcessing++; mLODReqQ.push(req); mMutex->unlock(); - break; } } } while (!mHeaderReqQ.empty() && count < MAX_MESH_REQUESTS_PER_SECOND && sActiveHeaderRequests < (S32)sMaxConcurrentRequests) { + if (mMutex) { mMutex->lock(); HeaderRequest req = mHeaderReqQ.front(); mHeaderReqQ.pop(); mMutex->unlock(); - bool success = false; - try - { - success = fetchMeshHeader(req.mMeshParams, count); - } - catch(AICurlNoEasyHandle const& error) - { - llwarns << "fetchMeshHeader() failed: " << error.what() << llendl; - } - if (!success) + if (!fetchMeshHeader(req.mMeshParams, count))//failed, resubmit { mMutex->lock(); mHeaderReqQ.push(req) ; mMutex->unlock(); - break; } } } @@ -636,16 +621,7 @@ void LLMeshRepoThread::run() for (std::set::iterator iter = mSkinRequests.begin(); iter != mSkinRequests.end(); ++iter) { LLUUID mesh_id = *iter; - bool success = false; - try - { - success = fetchMeshSkinInfo(mesh_id); - } - catch(AICurlNoEasyHandle const& error) - { - llwarns << "fetchMeshSkinInfo(" << mesh_id << ") failed: " << error.what() << llendl; - } - if (!success) + if (!fetchMeshSkinInfo(mesh_id)) { incomplete.insert(mesh_id); } @@ -658,16 +634,7 @@ void LLMeshRepoThread::run() for (std::set::iterator iter = mDecompositionRequests.begin(); iter != mDecompositionRequests.end(); ++iter) { LLUUID mesh_id = *iter; - bool success = false; - try - { - success = fetchMeshDecomposition(mesh_id); - } - catch(AICurlNoEasyHandle const& error) - { - llwarns << "fetchMeshDecomposition(" << mesh_id << ") failed: " << error.what() << llendl; - } - if (!success) + if (!fetchMeshDecomposition(mesh_id)) { incomplete.insert(mesh_id); } @@ -680,16 +647,7 @@ void LLMeshRepoThread::run() for (std::set::iterator iter = mPhysicsShapeRequests.begin(); iter != mPhysicsShapeRequests.end(); ++iter) { LLUUID mesh_id = *iter; - bool success = false; - try - { - success = fetchMeshPhysicsShape(mesh_id); - } - catch(AICurlNoEasyHandle const& error) - { - llwarns << "fetchMeshPhysicsShape(" << mesh_id << ") failed: " << error.what() << llendl; - } - if (!success) + if (!fetchMeshPhysicsShape(mesh_id)) { incomplete.insert(mesh_id); } @@ -799,6 +757,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) return false; } + bool ret = true ; U32 header_size = mMeshHeaderSize[mesh_id]; if (header_size > 0) @@ -820,7 +779,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) U8* buffer = new U8[size]; file.read(buffer, size); - //make sure buffer isn't all 0's (reserved block but not written) + //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written) bool zero = true; for (S32 i = 0; i < llmin(size, 1024) && zero; ++i) { @@ -845,9 +804,12 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) std::string http_url = constructUrl(mesh_id); if (!http_url.empty()) { - LLHTTPClient::getByteRange(http_url, offset, size, - new LLMeshSkinInfoResponder(mesh_id, offset, size), headers); - LLMeshRepository::sHTTPRequestCount++; + ret = LLHTTPClient::getByteRange(http_url, headers, offset, size, + new LLMeshSkinInfoResponder(mesh_id, offset, size)); + if (ret) + { + LLMeshRepository::sHTTPRequestCount++; + } } } } @@ -857,7 +819,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) } //early out was not hit, effectively fetched - return true; + return ret; } //return false if failed to get header @@ -873,6 +835,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) } U32 header_size = mMeshHeaderSize[mesh_id]; + bool ret = true ; if (header_size > 0) { @@ -893,7 +856,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) U8* buffer = new U8[size]; file.read(buffer, size); - //make sure buffer isn't all 0's (reserved block but not written) + //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written) bool zero = true; for (S32 i = 0; i < llmin(size, 1024) && zero; ++i) { @@ -918,10 +881,12 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) std::string http_url = constructUrl(mesh_id); if (!http_url.empty()) { - // This might throw AICurlNoEasyHandle. - LLHTTPClient::getByteRange(http_url, offset, size, - new LLMeshDecompositionResponder(mesh_id, offset, size), headers); - LLMeshRepository::sHTTPRequestCount++; + ret = LLHTTPClient::getByteRange(http_url, headers, offset, size, + new LLMeshDecompositionResponder(mesh_id, offset, size)); + if(ret) + { + LLMeshRepository::sHTTPRequestCount++; + } } } } @@ -931,7 +896,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) } //early out was not hit, effectively fetched - return true; + return ret; } //return false if failed to get header @@ -947,6 +912,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) } U32 header_size = mMeshHeaderSize[mesh_id]; + bool ret = true ; if (header_size > 0) { @@ -992,10 +958,13 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) std::string http_url = constructUrl(mesh_id); if (!http_url.empty()) { - // This might throw AICurlNoEasyHandle. - LLHTTPClient::getByteRange(http_url, offset, size, - new LLMeshPhysicsShapeResponder(mesh_id, offset, size), headers); - LLMeshRepository::sHTTPRequestCount++; + ret = LLHTTPClient::getByteRange(http_url, headers, offset, size, + new LLMeshPhysicsShapeResponder(mesh_id, offset, size)); + + if(ret) + { + LLMeshRepository::sHTTPRequestCount++; + } } } else @@ -1009,7 +978,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) } //early out was not hit, effectively fetched - return true; + return ret; } //static @@ -1056,14 +1025,14 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& c LLMeshRepository::sCacheBytesRead += bytes; file.read(buffer, bytes); if (headerReceived(mesh_params, buffer, bytes)) - { - // Already have header, no need to retry. + { //did not do an HTTP request, return false return true; } } } //either cache entry doesn't exist or is corrupt, request header from simulator + bool retval = true; AIHTTPHeaders headers("Accept", "application/octet-stream"); std::string http_url = constructUrl(mesh_params.getSculptID()); @@ -1072,19 +1041,24 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& c //grab first 4KB if we're going to bother with a fetch. Cache will prevent future fetches if a full mesh fits //within the first 4KB //NOTE -- this will break of headers ever exceed 4KB - // This might throw AICurlNoEasyHandle. - LLHTTPClient::getByteRange(http_url, 0, 4096, new LLMeshHeaderResponder(mesh_params), headers); - LLMeshRepository::sHTTPRequestCount++; + retval = LLHTTPClient::getByteRange(http_url, headers, 0, 4096, new LLMeshHeaderResponder(mesh_params)); + if (retval) + { + LLMeshRepository::sHTTPRequestCount++; + } count++; } - return true; + return retval; } -void LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count) +//return false if failed to get mesh lod. +bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count) { //protected by mMutex mHeaderMutex->lock(); + bool retval = true; + LLUUID mesh_id = mesh_params.getSculptID(); U32 header_size = mMeshHeaderSize[mesh_id]; @@ -1120,7 +1094,7 @@ void LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, if (lodReceived(mesh_params, lod, buffer, size)) { delete[] buffer; - return; + return true; } } @@ -1133,10 +1107,13 @@ void LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, std::string http_url = constructUrl(mesh_id); if (!http_url.empty()) { - // This might throw AICurlNoEasyHandle. - LLHTTPClient::getByteRange(constructUrl(mesh_id), offset, size, - new LLMeshLODResponder(mesh_params, lod, offset, size), headers); - LLMeshRepository::sHTTPRequestCount++; + retval = LLHTTPClient::getByteRange(constructUrl(mesh_id), headers, offset, size, + new LLMeshLODResponder(mesh_params, lod, offset, size)); + + if (retval) + { + LLMeshRepository::sHTTPRequestCount++; + } count++; } else @@ -1476,18 +1453,18 @@ bool LLMeshUploadThread::run() void LLMeshUploadThread::postRequest(std::string& whole_model_upload_url, AIMeshUpload* state_machine) { - if (!mDoUpload) - { - LLHTTPClient::post(mWholeModelFeeCapability, mModelData, - new LLWholeModelFeeResponder(mModelData, mFeeObserverHandle, whole_model_upload_url)/*,*/ - DEBUG_CURLIO_PARAM(debug_on), keep_alive, state_machine, AIMeshUpload_responderFinished); - } - else + if (mDoUpload) { LLHTTPClient::post(whole_model_upload_url, mBody, new LLWholeModelUploadResponder(mModelData, mUploadObserverHandle)/*,*/ DEBUG_CURLIO_PARAM(debug_off), keep_alive, state_machine, AIMeshUpload_responderFinished); } + else + { + LLHTTPClient::post(mWholeModelFeeCapability, mModelData, + new LLWholeModelFeeResponder(mModelData, mFeeObserverHandle, whole_model_upload_url)/*,*/ + DEBUG_CURLIO_PARAM(debug_on), keep_alive, state_machine, AIMeshUpload_responderFinished); + } } void dump_llsd_to_file(const LLSD& content, std::string filename) @@ -1877,6 +1854,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, } else { + llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -1928,12 +1906,13 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason { if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } else { + llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 33447db7b..4ef99f1b1 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -324,7 +324,7 @@ public: void lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod); void loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod); bool fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count); - void fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count); + bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count); bool headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size); bool lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size); bool skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 data_size); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c3ead99db..14cbd4993 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2492,7 +2492,7 @@ public: /*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers) { - if (200 <= status && status < 300) + if (isGoodStatus(status)) { LL_DEBUGS("Avatar") << "status OK" << llendl; } From c2748a22469e8529ca4b27ad4ab1f31bffa51fb5 Mon Sep 17 00:00:00 2001 From: Liru Date: Fri, 18 Apr 2014 04:43:46 -0400 Subject: [PATCH 04/34] [LLMeshRepo sync] The rest of the changes from upstream --- indra/newview/llmeshrepository.cpp | 185 ++++++++++++++++++++++------- indra/newview/llmeshrepository.h | 8 +- 2 files changed, 147 insertions(+), 46 deletions(-) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 4b46e1ca0..033619628 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -67,6 +67,7 @@ #include "aicurl.h" #include "boost/lexical_cast.hpp" + #ifndef LL_WINDOWS #include "netdb.h" #endif @@ -303,7 +304,14 @@ public: ~LLMeshSkinInfoResponder() { - llassert(mProcessed || LLApp::isExiting()); + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -331,7 +339,14 @@ public: ~LLMeshDecompositionResponder() { - llassert(mProcessed || LLApp::isExiting()); + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshDecomposition(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -359,7 +374,14 @@ public: ~LLMeshPhysicsShapeResponder() { - llassert(mProcessed || LLApp::isExiting()); + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -542,6 +564,7 @@ public: LLMeshRepoThread::LLMeshRepoThread() : LLThread("mesh repo") { + mWaiting = false; mMutex = new LLMutex(); mHeaderMutex = new LLMutex(); mSignal = new LLCondition(); @@ -565,9 +588,13 @@ void LLMeshRepoThread::run() llwarns << "convex decomposition unable to be loaded" << llendl; } - mSignal->lock(); while (!LLApp::isQuitting()) { + mWaiting = true; + mSignal->wait(); + mWaiting = false; + + if (!LLApp::isQuitting()) { static U32 count = 0; @@ -659,7 +686,11 @@ void LLMeshRepoThread::run() mSignal->wait(); } - mSignal->unlock(); + + if (mSignal->isLocked()) + { //make sure to let go of the mutex associated with the given signal before shutting down + mSignal->unlock(); + } res = LLConvexDecomposition::quitThread(); if (res != LLCD_OK) @@ -692,6 +723,8 @@ void LLMeshRepoThread::lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 } } + + void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) { //could be called from any thread LLMutexLock lock(mMutex); @@ -713,7 +746,7 @@ void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) if (pending != mPendingLOD.end()) { //append this lod request to existing header request pending->second.push_back(lod); - llassert(pending->second.size() <= LLModel::NUM_LODS); + llassert(pending->second.size() <= LLModel::NUM_LODS) } else { //if no header request is pending, fetch header @@ -748,11 +781,16 @@ std::string LLMeshRepoThread::constructUrl(LLUUID mesh_id) bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) { //protected by mMutex + + if (!mHeaderMutex) + { + return false; + } + mHeaderMutex->lock(); if (mMeshHeader.find(mesh_id) == mMeshHeader.end()) - { - // We have no header info for this mesh, try again later. + { //we have no header info for this mesh, do nothing mHeaderMutex->unlock(); return false; } @@ -822,14 +860,17 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) return ret; } -//return false if failed to get header bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) { //protected by mMutex + if (!mHeaderMutex) + { + return false; + } + mHeaderMutex->lock(); if (mMeshHeader.find(mesh_id) == mMeshHeader.end()) - { - // We have no header info for this mesh, try again later. + { //we have no header info for this mesh, do nothing mHeaderMutex->unlock(); return false; } @@ -852,6 +893,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) if (file.getSize() >= offset+size) { LLMeshRepository::sCacheBytesRead += size; + file.seek(offset); U8* buffer = new U8[size]; file.read(buffer, size); @@ -899,14 +941,17 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) return ret; } -//return false if failed to get header bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) { //protected by mMutex + if (!mHeaderMutex) + { + return false; + } + mHeaderMutex->lock(); if (mMeshHeader.find(mesh_id) == mMeshHeader.end()) - { - // We have no header info for this mesh, retry later. + { //we have no header info for this mesh, do nothing mHeaderMutex->unlock(); return false; } @@ -933,7 +978,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) U8* buffer = new U8[size]; file.read(buffer, size); - //make sure buffer isn't all 0's (reserved block but not written) + //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written) bool zero = true; for (S32 i = 0; i < llmin(size, 1024) && zero; ++i) { @@ -1055,6 +1100,11 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& c //return false if failed to get mesh lod. bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count) { //protected by mMutex + if (!mHeaderMutex) + { + return false; + } + mHeaderMutex->lock(); bool retval = true; @@ -1082,7 +1132,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U8* buffer = new U8[size]; file.read(buffer, size); - //make sure buffer isn't all 0's (reserved block but not written) + //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written) bool zero = true; for (S32 i = 0; i < llmin(size, 1024) && zero; ++i) { @@ -1130,6 +1180,8 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, { mHeaderMutex->unlock(); } + + return retval; } bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size) @@ -1176,7 +1228,6 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat mMeshHeader[mesh_id] = header; } - LLMutexLock lock(mMutex); // make sure only one thread access mPendingLOD at the same time. //check for pending requests @@ -1189,10 +1240,8 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat mLODReqQ.push(req); LLMeshRepository::sLODProcessing++; } - - mPendingLOD.erase(iter); // FIRE-7182, only call erase if iter is really valid. + mPendingLOD.erase(iter); } - // mPendingLOD.erase(iter); // avoid crash by moving erase up. } return true; @@ -1352,6 +1401,11 @@ void LLMeshUploadThread::init(LLMeshUploadThread::instance_list& data, LLVector3 mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut") ; } +LLMeshUploadThread::~LLMeshUploadThread() +{ + +} + LLMeshUploadThread::DecompRequest::DecompRequest(LLModel* mdl, LLModel* base_model, LLMeshUploadThread* thread) { mStage = "single_hull"; @@ -1712,8 +1766,14 @@ void LLMeshUploadThread::generateHulls() } } + void LLMeshRepoThread::notifyLoadedMeshes() -{//called via gMeshRepo.notifyLoadedMeshes(). mMutex already locked +{ + if (!mMutex) + { + return; + } + while (!mLoadedQ.empty()) { mMutex->lock(); @@ -1837,6 +1897,12 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, { mProcessed = true; + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status >= 400) @@ -1895,6 +1961,12 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason { mProcessed = true; + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status >= 400) @@ -1953,6 +2025,11 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r { mProcessed = true; + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status >= 400) @@ -1964,12 +2041,13 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r { if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } else { + llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -2010,6 +2088,12 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re { mProcessed = true; + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + S32 data_size = buffer->countAfter(channels.in(), NULL); if (status < 200 || status >= 400) @@ -2021,12 +2105,13 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re { if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } else { + llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -2067,18 +2152,27 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, { mProcessed = true; + // thread could have already be destroyed during logout + if( !gMeshRepo.mThread ) + { + return; + } + if (status < 200 || status >= 400) { //llwarns // << "Header responder failed with status: " // << status << ": " << reason << llendl; - // HTTP_SERVICE_UNAVAILABLE (503) or HTTP_INTERNAL_ERROR_*'s. + // 503 (service unavailable) or HTTP_INTERNAL_ERROR_*'s. // can be due to server load and can be retried // TODO*: Add maximum retry logic, exponential backoff // and (somewhat more optional than the others) retries // again after some set period of time + + llassert(status == HTTP_NOT_FOUND || status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || status == HTTP_INTERNAL_ERROR); + if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //retry llwarns << "Timeout or service unavailable, retrying." << llendl; @@ -2091,7 +2185,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, } else { - llwarns << "Unhandled status." << llendl; + llwarns << "Unhandled status: " << status << llendl; } } @@ -2379,12 +2473,10 @@ void LLMeshRepository::notifyLoadedMeshes() //call completed callbacks on finished decompositions mDecompThread->notifyCompleted(); - if (!mThread->mSignal->tryLock()) - { - // Curl thread is churning, wait for it to go idle. + if (!mThread->mWaiting) + { //curl thread is churning, wait for it to go idle return; } - mThread->mSignal->unlock(); static std::string region_name("never name a region this"); @@ -2393,7 +2485,6 @@ void LLMeshRepository::notifyLoadedMeshes() if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived()) { region_name = gAgent.getRegion()->getName(); - mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh2"); if (mGetMeshCapability.empty()) { @@ -2751,8 +2842,9 @@ void LLMeshRepository::uploadModel(std::vector& data, LLVector3 llinfos << "unable to upload, fee request failed" << llendl; return; } - AIMeshUpload* uploader = new AIMeshUpload(data, scale, upload_textures, upload_skin, upload_joints, upload_url, do_upload, fee_observer, upload_observer); - uploader->run(NULL, 0, false, true, &gMainThreadEngine); + AIMeshUpload* thread = new AIMeshUpload(data, scale, upload_textures, upload_skin, upload_joints, upload_url, + do_upload, fee_observer, upload_observer); + thread->run(NULL, 0, false, true, &gMainThreadEngine); } S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod) @@ -3048,13 +3140,15 @@ bool needTriangles( LLConvexDecomposition *aDC ) void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh, bool vertex_based) { - LLConvexDecomposition *pDeComp = LLConvexDecomposition::getInstance(); - - if( !pDeComp ) - return; - - if( vertex_based ) - vertex_based = !needTriangles( pDeComp ); + // HACD + if (vertex_based) + { + if (LLConvexDecomposition* pDeComp = LLConvexDecomposition::getInstance()) + vertex_based = !needTriangles(pDeComp); + else + return; + } + // mesh.mVertexBase = mCurRequest->mPositions[0].mV; mesh.mVertexStrideBytes = 12; @@ -3072,7 +3166,10 @@ void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh, bool vertex_based) if ((vertex_based || mesh.mNumTriangles > 0) && mesh.mNumVertices > 2) { LLCDResult ret = LLCD_OK; - ret = LLConvexDecomposition::getInstance()->setMeshData(&mesh, vertex_based); + if (LLConvexDecomposition::getInstance() != NULL) + { + ret = LLConvexDecomposition::getInstance()->setMeshData(&mesh, vertex_based); + } if (ret) { @@ -3127,6 +3224,7 @@ void LLPhysicsDecomp::doDecomposition() continue; } + if (param->mType == LLCDParam::LLCD_FLOAT) { ret = LLConvexDecomposition::getInstance()->setParam(param->mName, (F32) value.asReal()); @@ -3440,10 +3538,12 @@ void LLPhysicsDecomp::run() } } - mSignal->unlock(); - decomp->quitThread(); + if (mSignal->isLocked()) + { //let go of mSignal's associated mutex + mSignal->unlock(); + } mDone = true; } @@ -3649,4 +3749,3 @@ bool LLMeshRepository::meshRezEnabled() } return false; } - diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 4ef99f1b1..c408f8a12 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -225,6 +225,8 @@ public: LLMutex* mHeaderMutex; LLCondition* mSignal; + bool mWaiting; + //map of known mesh headers typedef std::map mesh_header_map; mesh_header_map mMeshHeader; @@ -405,10 +407,11 @@ public: #endif void init(instance_list& data, LLVector3& scale, bool upload_textures, bool upload_skin, bool upload_joints, bool do_upload, LLHandle const& fee_observer, LLHandle const& upload_observer); + ~LLMeshUploadThread(); void postRequest(std::string& url, AIMeshUpload* state_machine); - /*virtual*/ bool run(); + virtual bool run(); void preStart(); void generateHulls(); @@ -504,8 +507,7 @@ public: void uploadModel(std::vector& data, LLVector3& scale, bool upload_textures, bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload = true, - LLHandle fee_observer= (LLHandle()), - LLHandle upload_observer = (LLHandle())); + LLHandle fee_observer= (LLHandle()), LLHandle upload_observer = (LLHandle())); S32 getMeshSize(const LLUUID& mesh_id, S32 lod); From 4027ec7a67936ac3918b5b1573b407bfef560459 Mon Sep 17 00:00:00 2001 From: Liru Date: Fri, 18 Apr 2014 04:58:49 -0400 Subject: [PATCH 05/34] [Floater Flexibility] Fix yet another broken button, this time group titles, thanks again to the french singularity group --- indra/newview/skins/default/xui/en-us/panel_toolbar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/panel_toolbar.xml b/indra/newview/skins/default/xui/en-us/panel_toolbar.xml index 5d0c3e761..c35dbfac2 100644 --- a/indra/newview/skins/default/xui/en-us/panel_toolbar.xml +++ b/indra/newview/skins/default/xui/en-us/panel_toolbar.xml @@ -39,7 +39,7 @@ From 86b5737d512aa734295702aa8e301c17de344224 Mon Sep 17 00:00:00 2001 From: Liru Date: Fri, 18 Apr 2014 09:17:41 -0400 Subject: [PATCH 06/34] [Floater Flexibility] French Translation~ Danke Nomade. --- .../default/xui/fr/floater_toolbar_prefs.xml | 93 +++++++++++++++++++ .../skins/default/xui/fr/menu_viewer.xml | 1 + .../skins/default/xui/fr/panel_toolbar.xml | 92 ++++++++++++++++-- 3 files changed, 180 insertions(+), 6 deletions(-) create mode 100644 indra/newview/skins/default/xui/fr/floater_toolbar_prefs.xml diff --git a/indra/newview/skins/default/xui/fr/floater_toolbar_prefs.xml b/indra/newview/skins/default/xui/fr/floater_toolbar_prefs.xml new file mode 100644 index 000000000..7a2d6dc5e --- /dev/null +++ b/indra/newview/skins/default/xui/fr/floater_toolbar_prefs.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 477a728b8..109e28971 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -76,6 +76,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/panel_toolbar.xml b/indra/newview/skins/default/xui/fr/panel_toolbar.xml index 4a6af2b12..6c053e9ce 100644 --- a/indra/newview/skins/default/xui/fr/panel_toolbar.xml +++ b/indra/newview/skins/default/xui/fr/panel_toolbar.xml @@ -1,11 +1,9 @@ - - Rétablir les fenêtres - - + établir les fenêtres + -