From f878b032e8c96c4e4ae752864d7641bba2ea4102 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 9 Sep 2013 13:13:22 -0700 Subject: Using transaction_id instead of raw asset_id during aisv3 patch --- indra/newview/llaisapi.cpp | 4 ++-- indra/newview/llaisapi.h | 2 +- indra/newview/llviewerinventory.cpp | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 85b304d90e..6f6e6ebb35 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -243,7 +243,7 @@ UpdateItemCommand::UpdateItemCommand(const LLUUID& item_id, setCommandFunc(cmd); } -UpdateCategoryCommand::UpdateCategoryCommand(const LLUUID& item_id, +UpdateCategoryCommand::UpdateCategoryCommand(const LLUUID& cat_id, const LLSD& updates, LLPointer callback): mUpdates(updates), @@ -255,7 +255,7 @@ UpdateCategoryCommand::UpdateCategoryCommand(const LLUUID& item_id, llwarns << "No cap found" << llendl; return; } - std::string url = cap + std::string("/category/") + item_id.asString(); + std::string url = cap + std::string("/category/") + cat_id.asString(); LL_DEBUGS("Inventory") << "url: " << url << LL_ENDL; LLCurl::ResponderPtr responder = this; LLSD headers; diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 5d31129a16..f3a662c280 100755 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -105,7 +105,7 @@ private: class UpdateCategoryCommand: public AISCommand { public: - UpdateCategoryCommand(const LLUUID& item_id, + UpdateCategoryCommand(const LLUUID& cat_id, const LLSD& updates, LLPointer callback); private: diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b623b23e1a..ede6eb8490 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1253,6 +1253,12 @@ void update_inventory_item( if (AISCommand::isAPIAvailable()) { LLSD updates = update_item->asLLSD(); + // Replace asset_id with transaction_id (hash_id) + if (updates.has("asset_id")) + { + updates.erase("asset_id"); + updates["hash_id"] = update_item->getTransactionID(); + } LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); } -- cgit v1.2.3