diff options
author | Oz Linden <oz@lindenlab.com> | 2011-09-14 11:21:53 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-09-14 11:21:53 -0400 |
commit | 11340e3eb3011930f2765d452685632112775cf1 (patch) | |
tree | d712ccdaa7cf818aaa08defb45d5393fe7d1a0e4 /indra | |
parent | a3e092db14cd0ca785ae46b99f6e275eedc0ddc1 (diff) | |
parent | 19371a9abed3198f9f6083c3b2483e65778e944a (diff) |
merge possible fix for storm-1562
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llthread.h | 3 | ||||
-rw-r--r-- | indra/llmessage/llcurl.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llcurl.h | 1 | ||||
-rw-r--r-- | indra/newview/llsecapi.h | 8 |
4 files changed, 12 insertions, 6 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index c732e3bc77..b631b96252 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -195,7 +195,8 @@ public: } ~LLMutex() { - llassert(!isLocked()); // better not be locked! + //this assertion erroneously triggers whenever an LLCondition is destroyed + //llassert(!isLocked()); // better not be locked! apr_thread_mutex_destroy(mAPRMutexp); mAPRMutexp = NULL; } diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 14e169c6b1..280a8942a8 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -222,7 +222,7 @@ namespace boost std::set<CURL*> LLCurl::Easy::sFreeHandles; std::set<CURL*> LLCurl::Easy::sActiveHandles; LLMutex* LLCurl::Easy::sHandleMutex = NULL; - +LLMutex* LLCurl::Easy::sMultiMutex = NULL; //static CURL* LLCurl::Easy::allocEasyHandle() @@ -606,6 +606,7 @@ void LLCurl::Multi::run() mPerformState = PERFORM_STATE_PERFORMING; if (!mQuitting) { + LLMutexLock lock(LLCurl::Easy::sMultiMutex); doPerform(); } } @@ -1179,6 +1180,7 @@ void LLCurl::initClass(bool multi_threaded) check_curl_code(code); Easy::sHandleMutex = new LLMutex(); + Easy::sMultiMutex = new LLMutex(); #if SAFE_SSL S32 mutex_count = CRYPTO_num_locks(); @@ -1200,6 +1202,8 @@ void LLCurl::cleanupClass() delete Easy::sHandleMutex; Easy::sHandleMutex = NULL; + delete Easy::sMultiMutex; + Easy::sMultiMutex = NULL; for (std::set<CURL*>::iterator iter = Easy::sFreeHandles.begin(); iter != Easy::sFreeHandles.end(); ++iter) { diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 213b281e72..a876a1562e 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -251,6 +251,7 @@ private: static std::set<CURL*> sFreeHandles; static std::set<CURL*> sActiveHandles; static LLMutex* sHandleMutex; + static LLMutex* sMultiMutex; }; class LLCurl::Multi : public LLThread diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h index 0935a0005b..db57848320 100644 --- a/indra/newview/llsecapi.h +++ b/indra/newview/llsecapi.h @@ -132,7 +132,7 @@ protected: // LLCertificates are considered unmodifiable // Certificates are pulled out of stores, or created via // factory calls -class LLCertificate : public LLRefCount +class LLCertificate : public LLThreadSafeRefCount { LOG_CLASS(LLCertificate); public: @@ -170,7 +170,7 @@ public: // base iterator implementation class, providing // the functionality needed for the iterator class. - class iterator_impl : public LLRefCount + class iterator_impl : public LLThreadSafeRefCount { public: iterator_impl() {}; @@ -289,7 +289,7 @@ bool operator!=(const LLCertificateVector::iterator& _lhs, const LLCertificateVe // * Persistence of credential information based on grid (for saving username/password) // * Serialization to an OGP identifier/authenticator pair // -class LLCredential : public LLRefCount +class LLCredential : public LLThreadSafeRefCount { public: @@ -424,7 +424,7 @@ protected: // LLSecAPIHandler Class // Interface handler class for the various security storage handlers. -class LLSecAPIHandler : public LLRefCount +class LLSecAPIHandler : public LLThreadSafeRefCount { public: |