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 ...@@ -978,12 +978,18 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
ids.emplace(result["item_id"]); ids.emplace(result["item_id"]);
} }
break; break;
case COPYINVENTORY:
case CREATEINVENTORY: case CREATEINVENTORY:
{ {
AISUpdate::parseUUIDArray(result, "_created_categories", ids); AISUpdate::parseUUIDArray(result, "_created_categories", ids);
AISUpdate::parseUUIDArray(result, "_created_items", ids); AISUpdate::parseUUIDArray(result, "_created_items", ids);
} }
break; break;
case UPDATECATEGORY:
{
AISUpdate::parseUUIDArray(result, "_updated_categories", ids);
}
break;
default: default:
break; break;
} }
...@@ -1367,6 +1373,11 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth) ...@@ -1367,6 +1373,11 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth)
{ {
LL_WARNS() << "Got stale folder, known: " << curr_cat->getVersion() LL_WARNS() << "Got stale folder, known: " << curr_cat->getVersion()
<< ", received: " << version << LL_ENDL; << ", received: " << version << LL_ENDL;
if( version < curr_cat->getVersion() )
{
curr_cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN);
curr_cat->fetch();
}
return; return;
} }
......
...@@ -195,7 +195,7 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests ...@@ -195,7 +195,7 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
// For unknown reasons, requesting many attachments at once causes // For unknown reasons, requesting many attachments at once causes
// frequent server-side failures. Here we're limiting the number // frequent server-side failures. Here we're limiting the number
// of attachments requested per idle loop. // 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); S32 obj_count = llmin((S32)attachment_requests.size(),max_objects_per_request);
if (obj_count == 0) if (obj_count == 0)
{ {
......
...@@ -1561,13 +1561,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) ...@@ -1561,13 +1561,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
LLUUID new_parent_id = item->getParentUUID(); LLUUID new_parent_id = item->getParentUUID();
bool update_parent_on_server = false; bool update_parent_on_server = false;
// if (new_parent_id.isNull() && !LLApp::isExiting()) 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 (old_parent_id.isNull()) if (old_parent_id.isNull())
{ {
...@@ -1898,10 +1892,12 @@ void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item, ...@@ -1898,10 +1892,12 @@ void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item,
<< " from " << make_inventory_info(item->getParentUUID()) << " from " << make_inventory_info(item->getParentUUID())
<< " to " << make_inventory_info(new_parent_id) << LL_ENDL; << " to " << make_inventory_info(new_parent_id) << LL_ENDL;
LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(), -1); LLInventoryModel::update_list_t update;
accountForUpdate(old_folder); LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1);
LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1, false); update.push_back(old_folder);
accountForUpdate(new_folder); LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
update.push_back(new_folder);
accountForUpdate(update);
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setParent(new_parent_id); new_item->setParent(new_parent_id);
...@@ -1934,10 +1930,12 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat, ...@@ -1934,10 +1930,12 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
<< " from " << make_inventory_info(cat->getParentUUID()) << " from " << make_inventory_info(cat->getParentUUID())
<< " to " << make_inventory_info(new_parent_id) << LL_ENDL; << " to " << make_inventory_info(new_parent_id) << LL_ENDL;
LLInventoryModel::update_list_t update;
LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1); LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1);
accountForUpdate(old_folder); update.push_back(old_folder);
LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1, false); LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
accountForUpdate(new_folder); update.push_back(new_folder);
accountForUpdate(update);
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat); LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat);
new_cat->setParent(new_parent_id); new_cat->setParent(new_parent_id);
...@@ -2709,10 +2707,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const ...@@ -2709,10 +2707,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
{ {
descendents_actual += update.mDescendentDelta; descendents_actual += update.mDescendentDelta;
cat->setDescendentCount(descendents_actual); cat->setDescendentCount(descendents_actual);
if (update.mChangeVersion) cat->setVersion(++version);
{
cat->setVersion(++version);
}
LL_DEBUGS(LOG_INV) << "accounted: '" << cat->getName() << "' " LL_DEBUGS(LOG_INV) << "accounted: '" << cat->getName() << "' "
<< version << " with " << descendents_actual << version << " with " << descendents_actual
<< " descendents." << LL_ENDL; << " descendents." << LL_ENDL;
...@@ -2740,7 +2735,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const ...@@ -2740,7 +2735,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
} }
void LLInventoryModel::accountForUpdate( 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 it = update.begin();
update_list_t::const_iterator end = update.end(); update_list_t::const_iterator end = update.end();
...@@ -2751,7 +2746,7 @@ void LLInventoryModel::accountForUpdate( ...@@ -2751,7 +2746,7 @@ void LLInventoryModel::accountForUpdate(
} }
void LLInventoryModel::accountForUpdate( void LLInventoryModel::accountForUpdate(
const LLInventoryModel::update_map_t& update) const const LLInventoryModel::update_map_t& update)
{ {
LLCategoryUpdate up; LLCategoryUpdate up;
update_map_t::const_iterator it = update.begin(); update_map_t::const_iterator it = update.begin();
......
...@@ -531,14 +531,12 @@ class LLInventoryModel ...@@ -531,14 +531,12 @@ class LLInventoryModel
// Represents the number of items added or removed from a category. // Represents the number of items added or removed from a category.
struct LLCategoryUpdate struct LLCategoryUpdate
{ {
LLCategoryUpdate() : mDescendentDelta(0), mChangeVersion(true) {} LLCategoryUpdate() : mDescendentDelta(0) {}
LLCategoryUpdate(const LLUUID& category_id, S32 delta, bool change_version = true) : LLCategoryUpdate(const LLUUID& category_id, S32 delta) :
mCategoryID(category_id), mCategoryID(category_id),
mDescendentDelta(delta), mDescendentDelta(delta) {}
mChangeVersion(change_version) {}
LLUUID mCategoryID; LLUUID mCategoryID;
S32 mDescendentDelta; S32 mDescendentDelta;
bool mChangeVersion;
}; };
typedef std::vector<LLCategoryUpdate> update_list_t; typedef std::vector<LLCategoryUpdate> update_list_t;
...@@ -556,8 +554,8 @@ class LLInventoryModel ...@@ -556,8 +554,8 @@ class LLInventoryModel
// Call when there are category updates. Call them *before* the // Call when there are category updates. Call them *before* the
// actual update so the method can do descendent accounting correctly. // actual update so the method can do descendent accounting correctly.
void accountForUpdate(const LLCategoryUpdate& update) const; void accountForUpdate(const LLCategoryUpdate& update) const;
void accountForUpdate(const update_list_t& updates) const; void accountForUpdate(const update_list_t& updates);
void accountForUpdate(const update_map_t& updates) const; void accountForUpdate(const update_map_t& updates);
// Return (yes/no/maybe) child status of category children. // Return (yes/no/maybe) child status of category children.
EHasChildren categoryHasChildren(const LLUUID& cat_id) const; EHasChildren categoryHasChildren(const LLUUID& cat_id) const;
......