summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml1
-rwxr-xr-xindra/newview/llinventorymodel.cpp28
-rwxr-xr-xindra/newview/llviewerinventory.cpp67
3 files changed, 60 insertions, 36 deletions
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 92a241857e..6594fdb249 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,6 +43,7 @@
<key>tags</key>
<array>
<!-- sample entry for debugging specific items
+ <string>Inventory</string>
<string>Avatar</string>
<string>Voice</string>
-->
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index fd57845c0e..73ef3e60da 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1170,14 +1170,13 @@ void parse_llsd_uuid_array(const LLSD& content, const std::string& name, uuid_ve
void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLSD& update)
{
- llinfos << "ais update " << context << ":" << ll_pretty_print_sd(update) << llendl;
+ LL_DEBUGS("Inventory") << "ais update " << context << ":" << ll_pretty_print_sd(update) << llendl;
uuid_vec_t cat_ids;
parse_llsd_uuid_array(update,"_categories_removed",cat_ids);
for (uuid_vec_t::const_iterator it = cat_ids.begin();
it != cat_ids.end(); ++it)
{
- llinfos << "remove category: " << *it << llendl;
onObjectDeletedFromServer(*it, false);
}
@@ -1186,7 +1185,6 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
for (uuid_vec_t::const_iterator it = item_ids.begin();
it != item_ids.end(); ++it)
{
- llinfos << "remove item: " << *it << llendl;
onObjectDeletedFromServer(*it, false);
}
@@ -1195,10 +1193,13 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
for (uuid_vec_t::const_iterator it = broken_link_ids.begin();
it != broken_link_ids.end(); ++it)
{
- llinfos << "remove broken link: " << *it << llendl;
onObjectDeletedFromServer(*it, false);
}
+ // TODO - how can we use this version info? Need to be sure all
+ // changes are going through AIS first, or at least through
+ // something with a reliable responder.
+#if 0
const std::string& ucv = "_updated_category_versions";
if (update.has(ucv))
{
@@ -1208,9 +1209,9 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
{
const LLUUID id((*it).first);
S32 version = (*it).second.asInteger();
- llinfos << "update category: " << id << " to version " << version << llendl;
}
}
+#endif
}
@@ -1291,7 +1292,7 @@ void LLInventoryModel::onDescendentsPurgedFromServer(const LLUUID& object_id, bo
llwarns << "Unexpected count of categories deleted, got "
<< total_deleted_count << " expected " << count << llendl;
}
- gInventory.validate();
+ //gInventory.validate();
}
}
@@ -2925,7 +2926,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
LLUUID tid;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, tid);
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << "Bulk inventory: " << tid << llendl;
+ LL_DEBUGS("Inventory") << "Bulk inventory: " << tid << llendl;
#endif
update_map_t update;
@@ -2937,9 +2938,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer<LLViewerInventoryCategory> tfolder = new LLViewerInventoryCategory(gAgent.getID());
tfolder->unpackMessage(msg, _PREHASH_FolderData, i);
- llinfos << "unpacked folder '" << tfolder->getName() << "' ("
- << tfolder->getUUID() << ") in " << tfolder->getParentUUID()
- << llendl;
+ LL_DEBUGS("Inventory") << "unpacked folder '" << tfolder->getName() << "' ("
+ << tfolder->getUUID() << ") in " << tfolder->getParentUUID()
+ << llendl;
if(tfolder->getUUID().notNull())
{
folders.push_back(tfolder);
@@ -2979,8 +2980,8 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
titem->unpackMessage(msg, _PREHASH_ItemData, i);
- llinfos << "unpacked item '" << titem->getName() << "' in "
- << titem->getParentUUID() << llendl;
+ LL_DEBUGS("Inventory") << "unpacked item '" << titem->getName() << "' in "
+ << titem->getParentUUID() << llendl;
U32 callback_id;
msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id);
if(titem->getUUID().notNull() ) // && callback_id.notNull() )
@@ -3118,7 +3119,8 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
// If the item has already been added (e.g. from link prefetch), then it doesn't need to be re-added.
if (gInventory.getItem(titem->getUUID()))
{
- llinfos << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << llendl;
+ LL_DEBUGS("Inventory") << "Skipping prefetched item [ Name: " << titem->getName()
+ << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << llendl;
continue;
}
gInventory.updateItem(titem);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 31ff3bb5d6..50d67463c7 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1147,13 +1147,11 @@ public:
AISCommand(LLPointer<LLInventoryCallback> callback):
mCallback(callback)
{
- llinfos << "constructor" << llendl;
mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10);
}
virtual ~AISCommand()
{
- llinfos << "destructor" << llendl;
}
void run_command()
@@ -1206,13 +1204,13 @@ public:
const LLSD& headers = getResponseHeaders();
if (!content.isMap())
{
- llwarns << "Malformed response contents " << content
- << " status " << status << " reason " << reason << llendl;
+ LL_DEBUGS("Inventory") << "Malformed response contents " << content
+ << " status " << status << " reason " << reason << llendl;
}
else
{
- llwarns << "failed with content: " << ll_pretty_print_sd(content)
- << " status " << status << " reason " << reason << llendl;
+ LL_DEBUGS("Inventory") << "failed with content: " << ll_pretty_print_sd(content)
+ << " status " << status << " reason " << reason << llendl;
}
mRetryPolicy->onFailure(status, headers);
F32 seconds_to_wait;
@@ -1247,20 +1245,44 @@ private:
LLPointer<LLInventoryCallback> mCallback;
};
-class RemoveObjectCommand: public AISCommand
+class RemoveItemCommand: public AISCommand
{
public:
- RemoveObjectCommand(const LLUUID& item_id,
- LLPointer<LLInventoryCallback> callback):
+ RemoveItemCommand(const LLUUID& item_id,
+ LLPointer<LLInventoryCallback> callback):
AISCommand(callback)
{
std::string cap;
if (!getCap(cap))
{
+ llwarns << "No cap found" << llendl;
return;
}
- const std::string url = cap + std::string("/item/") + item_id.asString();
- llinfos << "url: " << url << llendl;
+ std::string url = cap + std::string("/item/") + item_id.asString();
+ LL_DEBUGS("Inventory") << "url: " << url << llendl;
+ LLHTTPClient::ResponderPtr responder = this;
+ LLSD headers;
+ F32 timeout = HTTP_REQUEST_EXPIRY_SECS;
+ command_func_type cmd = boost::bind(&LLHTTPClient::del, url, responder, headers, timeout);
+ setCommandFunc(cmd);
+ }
+};
+
+class RemoveCategoryCommand: public AISCommand
+{
+public:
+ RemoveCategoryCommand(const LLUUID& item_id,
+ LLPointer<LLInventoryCallback> callback):
+ AISCommand(callback)
+ {
+ std::string cap;
+ if (!getCap(cap))
+ {
+ llwarns << "No cap found" << llendl;
+ return;
+ }
+ std::string url = cap + std::string("/category/") + item_id.asString();
+ LL_DEBUGS("Inventory") << "url: " << url << llendl;
LLHTTPClient::ResponderPtr responder = this;
LLSD headers;
F32 timeout = HTTP_REQUEST_EXPIRY_SECS;
@@ -1279,10 +1301,11 @@ public:
std::string cap;
if (!getCap(cap))
{
+ llwarns << "No cap found" << llendl;
return;
}
std::string url = cap + std::string("/category/") + item_id.asString() + "/children";
- llinfos << "url: " << url << llendl;
+ LL_DEBUGS("Inventory") << "url: " << url << llendl;
LLCurl::ResponderPtr responder = this;
LLSD headers;
F32 timeout = HTTP_REQUEST_EXPIRY_SECS;
@@ -1296,13 +1319,13 @@ void remove_inventory_item(
LLPointer<LLInventoryCallback> cb)
{
LLPointer<LLViewerInventoryItem> obj = gInventory.getItem(item_id);
- llinfos << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << llendl;
+ LL_DEBUGS("Inventory") << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << llendl;
if(obj)
{
std::string cap;
if (AISCommand::getCap(cap))
{
- LLPointer<AISCommand> cmd_ptr = new RemoveObjectCommand(item_id, cb);
+ LLPointer<AISCommand> cmd_ptr = new RemoveItemCommand(item_id, cb);
cmd_ptr->run_command();
}
else // no cap
@@ -1361,7 +1384,7 @@ void remove_inventory_category(
const LLUUID& cat_id,
LLPointer<LLInventoryCallback> cb)
{
- llinfos << "cat_id: [" << cat_id << "] " << llendl;
+ LL_DEBUGS("Inventory") << "cat_id: [" << cat_id << "] " << llendl;
LLPointer<LLViewerInventoryCategory> obj = gInventory.getCategory(cat_id);
if(obj)
{
@@ -1373,9 +1396,7 @@ void remove_inventory_category(
std::string cap;
if (AISCommand::getCap(cap))
{
- std::string url = cap + std::string("/category/") + cat_id.asString();
- llinfos << "url: " << url << llendl;
- LLPointer<AISCommand> cmd_ptr = new RemoveObjectCommand(cat_id, cb);
+ LLPointer<AISCommand> cmd_ptr = new RemoveCategoryCommand(cat_id, cb);
cmd_ptr->run_command();
}
else // no cap
@@ -1385,7 +1406,7 @@ void remove_inventory_category(
LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(cat_id);
if(children != LLInventoryModel::CHILDREN_NO)
{
- llinfos << "Will purge descendents first before deleting category " << cat_id << llendl;
+ LL_DEBUGS("Inventory") << "Will purge descendents first before deleting category " << cat_id << llendl;
LLPointer<LLInventoryCallback> wrap_cb = new LLRemoveCategoryOnDestroy(cat_id, cb);
purge_descendents_of(cat_id, wrap_cb);
return;
@@ -1439,7 +1460,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(id);
if(children == LLInventoryModel::CHILDREN_NO)
{
- llinfos << "No descendents to purge for " << id << llendl;
+ LL_DEBUGS("Inventory") << "No descendents to purge for " << id << llendl;
return;
}
LLPointer<LLViewerInventoryCategory> cat = gInventory.getCategory(id);
@@ -1448,8 +1469,8 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
if (LLClipboard::instance().hasContents() && LLClipboard::instance().isCutMode())
{
// Something on the clipboard is in "cut mode" and needs to be preserved
- llinfos << "purge_descendents_of clipboard case " << cat->getName()
- << " iterate and purge non hidden items" << llendl;
+ LL_DEBUGS("Inventory") << "purge_descendents_of clipboard case " << cat->getName()
+ << " iterate and purge non hidden items" << llendl;
LLInventoryModel::cat_array_t* categories;
LLInventoryModel::item_array_t* items;
// Get the list of direct descendants in tha categoy passed as argument
@@ -1485,7 +1506,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
else // no cap
{
// Fast purge
- llinfos << "purge_descendents_of fast case " << cat->getName() << llendl;
+ LL_DEBUGS("Inventory") << "purge_descendents_of fast case " << cat->getName() << llendl;
// send it upstream
LLMessageSystem* msg = gMessageSystem;