Using transaction_id instead of raw asset_id during aisv3 patch

master
Don Kjer 2013-09-09 13:13:22 -07:00
parent 144eb1912d
commit f878b032e8
3 changed files with 9 additions and 3 deletions

View File

@ -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;

View File

@ -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:

View File

@ -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();
}