summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.cpp20
-rw-r--r--indra/newview/llinventorymodel.cpp13
-rw-r--r--indra/newview/llstartup.cpp14
3 files changed, 39 insertions, 8 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4133470973..454ac5d88c 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -4565,10 +4565,14 @@ void callAfterCOFFetch(nullary_func_t cb)
{
LLUUID cat_id = LLAppearanceMgr::instance().getCOF();
LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
- if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN && AISAPI::isAvailable())
+ if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
- // Assume that we have no relevant cache. Fetch cof, and items cof's links point to.
- AISAPI::FetchCOF([cb](const LLUUID& id)
+ if (AISAPI::isAvailable())
+ {
+ // Mark cof (update timer) so that background fetch won't request it
+ cat->setFetching(LLViewerInventoryCategory::FETCH_RECURSIVE);
+ // Assume that we have no relevant cache. Fetch cof, and items cof's links point to.
+ AISAPI::FetchCOF([cb](const LLUUID& id)
{
cb();
LLUUID cat_id = LLAppearanceMgr::instance().getCOF();
@@ -4578,8 +4582,14 @@ void callAfterCOFFetch(nullary_func_t cb)
cat->setFetching(LLViewerInventoryCategory::FETCH_NONE);
}
});
- // Mark it so that background fetch won't request it if it didn't already
- cat->setFetching(LLViewerInventoryCategory::FETCH_RECURSIVE);
+ }
+ else
+ {
+ LL_WARNS() << "AIS API v3 not available, can't use AISAPI::FetchCOF" << LL_ENDL;
+ // startup should have marked folder as fetching, remove that
+ cat->setFetching(LLViewerInventoryCategory::FETCH_NONE);
+ callAfterCategoryFetch(cat_id, cb);
+ }
}
else
{
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 48539f4748..c65901a754 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -853,8 +853,17 @@ void LLInventoryModel::ensureCategoryForTypeExists(LLFolderType::EType preferred
LLStringUtil::null,
[preferred_type](const LLUUID &new_cat_id)
{
- LL_DEBUGS("Inventory") << "Created category: " << new_cat_id
- << " for type: " << preferred_type << LL_ENDL;
+ if (new_cat_id.isNull())
+ {
+ LL_WARNS("Inventory")
+ << "Failed to create folder of type " << preferred_type
+ << LL_ENDL;
+ }
+ else
+ {
+ LL_DEBUGS("Inventory") << "Created category: " << new_cat_id
+ << " for type: " << preferred_type << LL_ENDL;
+ }
}
);
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 5d1df21c9b..10ddd59f34 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1900,9 +1900,21 @@ bool idle_startup()
LLNotificationsUtil::add("InventoryUnusable");
}
- LLInventoryModelBackgroundFetch::instance().start();
gInventory.createCommonSystemCategories();
+ LLInventoryModelBackgroundFetch::instance().start();
+ LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
+ LLViewerInventoryCategory* cof = gInventory.getCategory(cof_id);
+ if (cof
+ && cof->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ // Special case, dupplicate request prevention.
+ // Cof folder will be requested via FetchCOF
+ // in appearance manager, prevent recursive fetch
+ cof->setFetching(LLViewerInventoryCategory::FETCH_RECURSIVE);
+ }
+
+
// It's debatable whether this flag is a good idea - sets all
// bits, and in general it isn't true that inventory
// initialization generates all types of changes. Maybe add an