diff options
Diffstat (limited to 'indra/llmessage/llcurl.cpp')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index bac3e6c426..5161ee6291 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -271,10 +271,10 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle) if(sFreeHandles.size() < MAX_NUM_FREE_HANDLES) { - sFreeHandles.insert(handle); - } - else - { + sFreeHandles.insert(handle); + } + else + { LLCurl::deleteEasyHandle(handle) ; } } @@ -453,9 +453,9 @@ size_t curlReadCallback(char* data, size_t size, size_t nmemb, void* user_data) LLCurl::Easy* easy = (LLCurl::Easy*)user_data; S32 n = size * nmemb; - S32 startpos = easy->getInput().tellg(); + S32 startpos = (S32)easy->getInput().tellg(); easy->getInput().seekg(0, std::ios::end); - S32 endpos = easy->getInput().tellg(); + S32 endpos = (S32)easy->getInput().tellg(); easy->getInput().seekg(startpos, std::ios::beg); S32 maxn = endpos - startpos; n = llmin(n, maxn); @@ -561,16 +561,16 @@ LLCurl::Multi::Multi(F32 idle_time_out) } //llassert_always(mCurlMultiHandle); - + if(mCurlMultiHandle) { - if(LLCurl::getCurlThread()->getThreaded()) - { - mMutexp = new LLMutex(NULL) ; - mDeletionMutexp = new LLMutex(NULL) ; - mEasyMutexp = new LLMutex(NULL) ; - } - LLCurl::getCurlThread()->addMulti(this) ; + if(LLCurl::getCurlThread()->getThreaded()) + { + mMutexp = new LLMutex(NULL) ; + mDeletionMutexp = new LLMutex(NULL) ; + mEasyMutexp = new LLMutex(NULL) ; + } + LLCurl::getCurlThread()->addMulti(this) ; mIdleTimeOut = idle_time_out ; if(mIdleTimeOut < LLCurl::sCurlRequestTimeOut) @@ -578,8 +578,8 @@ LLCurl::Multi::Multi(F32 idle_time_out) mIdleTimeOut = LLCurl::sCurlRequestTimeOut ; } - ++gCurlMultiCount; - } + ++gCurlMultiCount; +} } LLCurl::Multi::~Multi() @@ -758,7 +758,7 @@ bool LLCurl::Multi::doPerform() } mQueued = q; - setState(STATE_COMPLETED) ; + setState(STATE_COMPLETED) ; mIdleTimer.reset() ; } else if(!mValid && mIdleTimer.getElapsedTimeF32() > mIdleTimeOut) //idle for too long, remove it. @@ -935,8 +935,8 @@ bool LLCurlThread::CurlRequest::processRequest() if(!completed) { - setPriority(LLQueuedThread::PRIORITY_LOW) ; - } + setPriority(LLQueuedThread::PRIORITY_LOW) ; + } } return completed ; @@ -946,7 +946,7 @@ void LLCurlThread::CurlRequest::finishRequest(bool completed) { if(mMulti->isDead()) { - mCurlThread->deleteMulti(mMulti) ; + mCurlThread->deleteMulti(mMulti) ; } else { @@ -1054,7 +1054,7 @@ void LLCurlRequest::addMulti() mActiveRequestCount = 0 ; return; } - + mMultiSet.insert(multi); mActiveMulti = multi; mActiveRequestCount = 0; @@ -1250,15 +1250,15 @@ LLCurlEasyRequest::LLCurlEasyRequest() if(mMulti->isValid()) { - mEasy = mMulti->allocEasy(); - if (mEasy) - { - mEasy->setErrorBuffer(); - mEasy->setCA(); - // Set proxy settings if configured to do so. - LLProxy::getInstance()->applyProxySettings(mEasy); - } + mEasy = mMulti->allocEasy(); + if (mEasy) + { + mEasy->setErrorBuffer(); + mEasy->setCA(); + // Set proxy settings if configured to do so. + LLProxy::getInstance()->applyProxySettings(mEasy); } +} else { LLCurl::getCurlThread()->killMulti(mMulti) ; |