diff options
author | Don Kjer <don@lindenlab.com> | 2013-09-09 13:13:22 -0700 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2013-09-09 13:13:22 -0700 |
commit | f878b032e8c96c4e4ae752864d7641bba2ea4102 (patch) | |
tree | bdf18980c9e25900a2588d2e3d1130c8c99f4b26 /indra | |
parent | 144eb1912def502dfd5d9f7d224949309300e14b (diff) |
Using transaction_id instead of raw asset_id during aisv3 patch
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llaisapi.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llaisapi.h | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerinventory.cpp | 6 |
3 files changed, 9 insertions, 3 deletions
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<LLInventoryCallback> 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<LLInventoryCallback> 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<AISCommand> cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); } |