summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llappearancemgr.cpp74
-rwxr-xr-xindra/newview/llinventorymodel.cpp4
-rw-r--r--indra/newview/llstartup.cpp9
3 files changed, 78 insertions, 9 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index f56ae7caf1..e12ecea760 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1819,7 +1819,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// Add link to outfit if category is an outfit.
if (!append)
{
- createBaseOutfitLink(category, NULL);
+ createBaseOutfitLink(category, link_waiter);
}
// Remove current COF contents. Have to do this after creating
@@ -3030,7 +3030,7 @@ class RequestAgentUpdateAppearanceResponder: public LLHTTPClient::Responder
public:
RequestAgentUpdateAppearanceResponder()
{
- mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5);
+ mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10);
}
virtual ~RequestAgentUpdateAppearanceResponder()
@@ -3096,11 +3096,71 @@ public:
void debugCOF(const LLSD& content)
{
- //S32 cof_version = content["cof_version"];
- //S32 cof_expected = content["expected"];
- //S32 cof_observed = content["observed"];
+ LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << llendl;
+ std::set<LLUUID> ais_items, local_items;
+ const LLSD& cof_raw = content["cof_raw"];
+ for (LLSD::array_const_iterator it = cof_raw.beginArray();
+ it != cof_raw.endArray(); ++it)
+ {
+ const LLSD& item = *it;
+ if (item["parent_id"].asUUID() == LLAppearanceMgr::instance().getCOF())
+ {
+ ais_items.insert(item["item_id"].asUUID());
+ if (item["type"].asInteger() == 24) // link
+ {
+ LL_DEBUGS("Avatar") << "Link: item_id: " << item["item_id"].asUUID()
+ << " linked_item_id: " << item["asset_id"].asUUID()
+ << " name: " << item["name"].asString()
+ << llendl;
+ }
+ else if (item["type"].asInteger() == 25) // folder link
+ {
+ LL_DEBUGS("Avatar") << "Folder link: item_id: " << item["item_id"].asUUID()
+ << " linked_item_id: " << item["asset_id"].asUUID()
+ << " name: " << item["name"].asString()
+ << llendl;
+
+ }
+ else
+ {
+ LL_DEBUGS("Avatar") << "Other: item_id: " << item["item_id"].asUUID()
+ << " linked_item_id: " << item["asset_id"].asUUID()
+ << " name: " << item["name"].asString()
+ << llendl;
+ }
+ }
+ }
+ LL_DEBUGS("Avatar") << llendl;
+ LL_DEBUGS("Avatar") << "Local COF, version req: " << content["observed"] << llendl;
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(),
+ cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
+ for (S32 i=0; i<item_array.count(); i++)
+ {
+ const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ local_items.insert(inv_item->getUUID());
+ LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID()
+ << " linked_item_id: " << inv_item->getLinkedUUID()
+ << " name: " << inv_item->getName()
+ << llendl;
+ }
+ LL_DEBUGS("Avatar") << llendl;
+ for (std::set<LLUUID>::iterator it = local_items.begin(); it != local_items.end(); ++it)
+ {
+ if (ais_items.find(*it) == ais_items.end())
+ {
+ LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << llendl;
+ }
+ }
+ for (std::set<LLUUID>::iterator it = ais_items.begin(); it != ais_items.end(); ++it)
+ {
+ if (local_items.find(*it) == local_items.end())
+ {
+ LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << llendl;
+ }
+ }
}
-
LLPointer<LLHTTPRetryPolicy> mRetryPolicy;
};
@@ -3134,7 +3194,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
body["cof_version"] = cof_version;
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
{
- body["cof_version"] = cof_version+1;
+ body["cof_version"] = cof_version+999;
}
LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 171a2cd043..f0bfc68866 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1922,9 +1922,9 @@ bool LLInventoryModel::loadSkeleton(
for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it)
{
LLViewerInventoryCategory *llvic = (*it);
-#if 1
+#if 0
llvic->setVersion(NO_VERSION);
-#else
+#else // SH-3860 WIP
if (llvic->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT && llvic->getVersion()==1)
{
llinfos << "preserving empty COF for first-time login" << llendl;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 9d0df5e83e..717f578ddb 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2572,12 +2572,21 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
}
else
{
+ // FIXME SH-3860 - this creates a race condition, where COF
+ // changes (base outfit link added) after appearance update
+ // request has been submitted.
sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit);
bool do_copy = true;
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
+#if 0 // SH-3860 WIP
+ // Need to fetch cof contents before we can wear.
+ callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(),
+ boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append));
+#else
LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append);
+#endif
lldebugs << "initial outfit category id: " << cat_id << llendl;
}