Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alchemy/viewer
  • Miezhiko/alchemy-next
  • JennaHuntsman/xdg-integration
  • logue/alchemy-next
  • FelixWolf/alchemy-viewer
  • XenHat/xdg-integration
6 results
Show changes
Commits on Source (2)
......@@ -978,12 +978,18 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
ids.emplace(result["item_id"]);
}
break;
case COPYINVENTORY:
case CREATEINVENTORY:
{
AISUpdate::parseUUIDArray(result, "_created_categories", ids);
AISUpdate::parseUUIDArray(result, "_created_items", ids);
}
break;
case UPDATECATEGORY:
{
AISUpdate::parseUUIDArray(result, "_updated_categories", ids);
}
break;
default:
break;
}
......@@ -1367,6 +1373,11 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth)
{
LL_WARNS() << "Got stale folder, known: " << curr_cat->getVersion()
<< ", received: " << version << LL_ENDL;
if( version < curr_cat->getVersion() )
{
curr_cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN);
curr_cat->fetch();
}
return;
}
......
......@@ -195,7 +195,7 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
// For unknown reasons, requesting many attachments at once causes
// frequent server-side failures. Here we're limiting the number
// of attachments requested per idle loop.
const S32 max_objects_per_request = 5;
const S32 max_objects_per_request = 1;
S32 obj_count = llmin((S32)attachment_requests.size(),max_objects_per_request);
if (obj_count == 0)
{
......
......@@ -1561,13 +1561,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
LLUUID new_parent_id = item->getParentUUID();
bool update_parent_on_server = false;
// if (new_parent_id.isNull() && !LLApp::isExiting())
// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-6.4
// The problem seems to be the 'LogoutReply' message so don't reparent anything to the LNF folder
// as soon as we've sent out the log out request (since the quitting state is only set >after< we
// start processing the logout response)
if ( (new_parent_id.isNull()) && (!LLAppViewer::instance()->logoutRequestSent()) && (!LLApp::isExiting()) )
// [/SL:KB]
if (new_parent_id.isNull() && !LLApp::isExiting())
{
if (old_parent_id.isNull())
{
......@@ -1898,10 +1892,12 @@ void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item,
<< " from " << make_inventory_info(item->getParentUUID())
<< " to " << make_inventory_info(new_parent_id) << LL_ENDL;
LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(), -1);
accountForUpdate(old_folder);
LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1, false);
accountForUpdate(new_folder);
LLInventoryModel::update_list_t update;
LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1);
update.push_back(old_folder);
LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
update.push_back(new_folder);
accountForUpdate(update);
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setParent(new_parent_id);
......@@ -1934,10 +1930,12 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
<< " from " << make_inventory_info(cat->getParentUUID())
<< " to " << make_inventory_info(new_parent_id) << LL_ENDL;
LLInventoryModel::update_list_t update;
LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1);
accountForUpdate(old_folder);
LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1, false);
accountForUpdate(new_folder);
update.push_back(old_folder);
LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
update.push_back(new_folder);
accountForUpdate(update);
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat);
new_cat->setParent(new_parent_id);
......@@ -2709,10 +2707,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
{
descendents_actual += update.mDescendentDelta;
cat->setDescendentCount(descendents_actual);
if (update.mChangeVersion)
{
cat->setVersion(++version);
}
cat->setVersion(++version);
LL_DEBUGS(LOG_INV) << "accounted: '" << cat->getName() << "' "
<< version << " with " << descendents_actual
<< " descendents." << LL_ENDL;
......@@ -2740,7 +2735,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
}
void LLInventoryModel::accountForUpdate(
const LLInventoryModel::update_list_t& update) const
const LLInventoryModel::update_list_t& update)
{
update_list_t::const_iterator it = update.begin();
update_list_t::const_iterator end = update.end();
......@@ -2751,7 +2746,7 @@ void LLInventoryModel::accountForUpdate(
}
void LLInventoryModel::accountForUpdate(
const LLInventoryModel::update_map_t& update) const
const LLInventoryModel::update_map_t& update)
{
LLCategoryUpdate up;
update_map_t::const_iterator it = update.begin();
......
......@@ -531,14 +531,12 @@ class LLInventoryModel
// Represents the number of items added or removed from a category.
struct LLCategoryUpdate
{
LLCategoryUpdate() : mDescendentDelta(0), mChangeVersion(true) {}
LLCategoryUpdate(const LLUUID& category_id, S32 delta, bool change_version = true) :
LLCategoryUpdate() : mDescendentDelta(0) {}
LLCategoryUpdate(const LLUUID& category_id, S32 delta) :
mCategoryID(category_id),
mDescendentDelta(delta),
mChangeVersion(change_version) {}
mDescendentDelta(delta) {}
LLUUID mCategoryID;
S32 mDescendentDelta;
bool mChangeVersion;
};
typedef std::vector<LLCategoryUpdate> update_list_t;
......@@ -556,8 +554,8 @@ class LLInventoryModel
// Call when there are category updates. Call them *before* the
// actual update so the method can do descendent accounting correctly.
void accountForUpdate(const LLCategoryUpdate& update) const;
void accountForUpdate(const update_list_t& updates) const;
void accountForUpdate(const update_map_t& updates) const;
void accountForUpdate(const update_list_t& updates);
void accountForUpdate(const update_map_t& updates);
// Return (yes/no/maybe) child status of category children.
EHasChildren categoryHasChildren(const LLUUID& cat_id) const;
......