diff options
| author | prep <none@none> | 2012-01-31 15:13:16 -0500 |
|---|---|---|
| committer | prep <none@none> | 2012-01-31 15:13:16 -0500 |
| commit | 9e1479d610af1edd799a790ff18155fbb6ec5c89 (patch) | |
| tree | f086f457880855cac99059c1868b5dcd40a5185b /indra/newview/llxmlrpctransaction.cpp | |
| parent | 8f6524d999d5153ff4b89abafb35bc96870d6230 (diff) | |
| parent | 2c9a68c036eec1d1a021df305bf032d0c78da139 (diff) | |
merge
Diffstat (limited to 'indra/newview/llxmlrpctransaction.cpp')
| -rw-r--r-- | indra/newview/llxmlrpctransaction.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 920a9a3752..0da70d398b 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -305,6 +305,15 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) { mCurlRequest = new LLCurlEasyRequest(); } + if(!mCurlRequest->isValid()) + { + llwarns << "mCurlRequest is invalid." << llendl ; + + delete mCurlRequest ; + mCurlRequest = NULL ; + return ; + } + mErrorCert = NULL; // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // useful for debugging @@ -357,10 +366,20 @@ LLXMLRPCTransaction::Impl::~Impl() } delete mCurlRequest; + mCurlRequest = NULL ; } bool LLXMLRPCTransaction::Impl::process() { + if(!mCurlRequest || !mCurlRequest->isValid()) + { + llwarns << "transaction failed." << llendl ; + + delete mCurlRequest ; + mCurlRequest = NULL ; + return true ; //failed, quit. + } + switch(mStatus) { case LLXMLRPCTransaction::StatusComplete: |
