diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2012-01-17 22:56:28 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2012-01-17 22:56:28 -0700 |
commit | 25c21c3761d871fa7927e2a5656ed18100084454 (patch) | |
tree | 918bfa17008642a8510b666c07dccf45295eee07 /indra/llmessage | |
parent | a6c638d882919b58186a6859644d61cdb5e45a7b (diff) |
add more exception handlings for llcurl fix.
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 7 | ||||
-rw-r--r-- | indra/llmessage/llurlrequest.cpp | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 277c274f52..5edf0dc8c0 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -1036,7 +1036,12 @@ LLCurl::Easy* LLCurlRequest::allocEasy() { addMulti(); } - llassert_always(mActiveMulti); + if(!mActiveMulti) + { + return NULL ; + } + + //llassert_always(mActiveMulti); ++mActiveRequestCount; LLCurl::Easy* easy = mActiveMulti->allocEasy(); return easy; diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index f02c636838..a16f5c7bf0 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -459,6 +459,12 @@ void LLURLRequest::initialize() LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mState = STATE_INITIALIZED; mDetail = new LLURLRequestDetail; + + if(!isValid()) + { + return ; + } + mDetail->mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mDetail->mCurlRequest->setWriteCallback(&downCallback, (void*)this); mDetail->mCurlRequest->setReadCallback(&upCallback, (void*)this); |