summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryobserver.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-01 14:37:38 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-01 14:37:38 -0400
commit49956093db3ada36c04d01b905883067301a449a (patch)
tree3e65037b802d0ff63d9d394582211748cf21c753 /indra/newview/llinventoryobserver.cpp
parente26268add0d10cb7609afd9070f00d0331b78c4e (diff)
SH-4595 WIP - removed UDP hooks from LLInventoryAddItemByAssetObserver
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rwxr-xr-xindra/newview/llinventoryobserver.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 6181474e5b..b025c0786e 100755
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -478,20 +478,12 @@ void LLInventoryAddItemByAssetObserver::changed(U32 mask)
return;
}
- LLMessageSystem* msg = gMessageSystem;
- if (!(msg->getMessageName() && (0 == strcmp(msg->getMessageName(), "UpdateCreateInventoryItem"))))
+ const uuid_set_t& added = gInventory.getAddedIDs();
+ for (uuid_set_t::iterator it = added.begin(); it != added.end(); ++it)
{
- // this is not our message
- return; // to prevent a crash. EXT-7921;
- }
-
- LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem;
- S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
- for(S32 i = 0; i < num_blocks; ++i)
- {
- item->unpackMessage(msg, _PREHASH_InventoryData, i);
+ LLInventoryItem *item = gInventory.getItem(*it);
const LLUUID& asset_uuid = item->getAssetUUID();
- if (item->getUUID().notNull() && asset_uuid.notNull())
+ if (item && item->getUUID().notNull() && asset_uuid.notNull())
{
if (isAssetWatched(asset_uuid))
{
@@ -500,11 +492,11 @@ void LLInventoryAddItemByAssetObserver::changed(U32 mask)
}
}
}
-
+
if (mAddedItems.size() == mWatchedAssets.size())
{
- done();
LL_DEBUGS("Inventory_Move") << "All watched items are added & processed." << LL_ENDL;
+ done();
mAddedItems.clear();
// Unable to clean watched items here due to somebody can require to check them in current frame.