Merge branch 'master' into llwebprofile

This commit is contained in:
Aleric Inglewood
2012-11-28 18:50:31 +01:00
10 changed files with 216 additions and 147 deletions

View File

@@ -418,6 +418,7 @@ void cleanupCurl(void)
if (CurlMultiHandle::getTotalMultiHandles() != 0)
llwarns << "Not all CurlMultiHandle objects were destroyed!" << llendl;
AIStateMachine::flush();
clearCommandQueue();
Stats::print();
ssl_cleanup();
@@ -491,8 +492,6 @@ void Stats::print(void)
// Even more strict, BufferedCurlEasyRequest may not be created directly either, only as
// base class of ThreadSafeBufferedCurlEasyRequest.
llassert(BufferedCurlEasyRequest_count == ThreadSafeBufferedCurlEasyRequest_count);
// Each AICurlEasyRequestStateMachine is responsible for exactly one easy handle.
llassert(easy_handles >= AICurlEasyRequest_count);
// Each AICurlEasyRequestStateMachine has one AICurlEasyRequest member.
llassert(AICurlEasyRequest_count >= AICurlEasyRequestStateMachine_count);
// AIFIXME: is this really always the case? And why?
@@ -1148,12 +1147,16 @@ void CurlEasyRequest::set_timeout_opts(void)
setopt(CURLOPT_TIMEOUT, mTimeoutPolicy->getCurlTransaction());
}
void CurlEasyRequest::create_timeout_object(ThreadSafeBufferedCurlEasyRequest* lockobj)
void CurlEasyRequest::create_timeout_object(void)
{
ThreadSafeBufferedCurlEasyRequest* lockobj = NULL;
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
lockobj = static_cast<BufferedCurlEasyRequest*>(this)->get_lockobj();
#endif
mTimeout = new curlthread::HTTPTimeout(mTimeoutPolicy, lockobj);
}
LLPointer<curlthread::HTTPTimeout>& CurlEasyRequest::get_timeout_object(ThreadSafeBufferedCurlEasyRequest* lockobj)
LLPointer<curlthread::HTTPTimeout>& CurlEasyRequest::get_timeout_object(void)
{
if (mTimeoutIsOrphan)
{
@@ -1162,7 +1165,7 @@ LLPointer<curlthread::HTTPTimeout>& CurlEasyRequest::get_timeout_object(ThreadSa
}
else
{
create_timeout_object(lockobj);
create_timeout_object();
}
return mTimeout;
}