diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-09-19 14:50:08 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-09-19 14:50:08 -0400 |
commit | 5b7b3cbbbbec439880a33af8944d10c7bb527c3a (patch) | |
tree | 3e37afeba3e2bb67f53327719de72b4506d2605e /indra/llmessage | |
parent | c7dd3aac83eb9bde5fe0febaebcd998847bf1889 (diff) | |
parent | 2fba01d160716b886a7dfc0c86abda767a25d23f (diff) |
Merge
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/llmessage/llcurl.h | 2 |
2 files changed, 7 insertions, 1 deletions
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..87de202717 100644..100755 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -232,6 +232,7 @@ public: private: friend class LLCurl; + friend class LLCurl::Multi; CURL* mCurlEasyHandle; struct curl_slist* mHeaders; @@ -251,6 +252,7 @@ private: static std::set<CURL*> sFreeHandles; static std::set<CURL*> sActiveHandles; static LLMutex* sHandleMutex; + static LLMutex* sMultiMutex; }; class LLCurl::Multi : public LLThread |