Moved PerHostRequestQueue[Ptr] outside of AICurlPrivate.

Renamed PerHostRequestQueue and PerHostRequestQueuePtr to
AIPerHostRequestQueue and AIPerHostRequestQueuePtr respectively and
moved them to global namespace. This in preparation for using them in
the texture fetcher (as function of the hostname of the url that is
contructed there).
This commit is contained in:
Aleric Inglewood
2013-04-06 21:54:34 +02:00
parent db7c378160
commit 7866c68ab2
6 changed files with 82 additions and 65 deletions

View File

@@ -961,7 +961,7 @@ CurlEasyRequest::~CurlEasyRequest()
revokeCallbacks();
if (mPerHostPtr)
{
PerHostRequestQueue::release(mPerHostPtr);
AIPerHostRequestQueue::release(mPerHostPtr);
}
// This wasn't freed yet if the request never finished.
curl_slist_free_all(mHeaders);
@@ -1286,14 +1286,14 @@ void CurlEasyRequest::queued_for_removal(AICurlEasyRequest_wat& curl_easy_reques
}
#endif
PerHostRequestQueuePtr CurlEasyRequest::getPerHostPtr(void)
AIPerHostRequestQueuePtr CurlEasyRequest::getPerHostPtr(void)
{
if (!mPerHostPtr)
{
// mPerHostPtr is really just a speed-up cache.
// The reason we can cache it is because mLowercaseHostname is only set
// in finalizeRequest which may only be called once: it never changes.
mPerHostPtr = PerHostRequestQueue::instance(mLowercaseHostname);
mPerHostPtr = AIPerHostRequestQueue::instance(mLowercaseHostname);
}
return mPerHostPtr;
}