WIP on inventory background fetch
This commit is contained in:
@@ -204,7 +204,8 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
|
|||||||
std::string url = region->getCapability("FetchInventory2");
|
std::string url = region->getCapability("FetchInventory2");
|
||||||
if (!url.empty())
|
if (!url.empty())
|
||||||
{
|
{
|
||||||
if (!mPerServicePtr)
|
bool mPerServicePtr_initialized = !!mPerServicePtr;
|
||||||
|
if (!mPerServicePtr_initialized)
|
||||||
{
|
{
|
||||||
// One time initialization needed for bulkFetch().
|
// One time initialization needed for bulkFetch().
|
||||||
std::string servicename = AIPerService::extract_canonical_servicename(url);
|
std::string servicename = AIPerService::extract_canonical_servicename(url);
|
||||||
@@ -212,10 +213,14 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
|
|||||||
{
|
{
|
||||||
llinfos << "Initialized service name for bulk inventory fetching with \"" << servicename << "\"." << llendl;
|
llinfos << "Initialized service name for bulk inventory fetching with \"" << servicename << "\"." << llendl;
|
||||||
mPerServicePtr = AIPerService::instance(servicename);
|
mPerServicePtr = AIPerService::instance(servicename);
|
||||||
|
mPerServicePtr_initialized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bulkFetch();
|
if (mPerServicePtr_initialized)
|
||||||
return;
|
{
|
||||||
|
bulkFetch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -698,6 +703,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
|
|||||||
{
|
{
|
||||||
std::string url = region->getCapability("FetchInventoryDescendents2");
|
std::string url = region->getCapability("FetchInventoryDescendents2");
|
||||||
mFetchCount++;
|
mFetchCount++;
|
||||||
|
llassert(!url.empty());
|
||||||
if (folder_request_body["folders"].size())
|
if (folder_request_body["folders"].size())
|
||||||
{
|
{
|
||||||
LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats);
|
LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats);
|
||||||
|
|||||||
Reference in New Issue
Block a user