summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-02-03 22:01:46 -0700
committerXiaohong Bao <bao@lindenlab.com>2012-02-03 22:01:46 -0700
commit5e74293b0cfe562e8e3184217f27b3e86afe5277 (patch)
tree2abb0bd4b805f61c164a8d7807ad0dc1b9113f68
parentcd468364a77ca184133f8c49c9042cefae5c6ce1 (diff)
fix for SH-2941: crash at LLCurl::Easy::~Easy()
-rw-r--r--indra/llmessage/llcurl.cpp9
-rw-r--r--indra/llmessage/llcurl.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 3bcaffc275..2ef43d9c00 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -583,10 +583,10 @@ LLCurl::Multi::Multi(F32 idle_time_out)
LLCurl::Multi::~Multi()
{
- cleanup() ;
+ cleanup(true) ;
}
-void LLCurl::Multi::cleanup()
+void LLCurl::Multi::cleanup(bool deleted)
{
if(!mCurlMultiHandle)
{
@@ -599,6 +599,11 @@ void LLCurl::Multi::cleanup()
{
Easy* easy = *iter;
check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
+
+ if(deleted)
+ {
+ easy->mResponder = NULL ; //avoid triggering mResponder.
+ }
delete easy;
}
mEasyActiveList.clear();
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index fd664c0fa1..579ba0b1ab 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -318,7 +318,7 @@ public:
private:
void easyFree(LLCurl::Easy*);
- void cleanup() ;
+ void cleanup(bool deleted = false) ;
CURLM* mCurlMultiHandle;