diff options
Diffstat (limited to 'linden/indra/llinventory/llinventory.cpp')
-rw-r--r-- | linden/indra/llinventory/llinventory.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index c5be7f7..85fc47f 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -1101,7 +1102,7 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu | |||
1101 | if(inv_type_str) | 1102 | if(inv_type_str) |
1102 | output_stream << "\t\tinv_type\t" << inv_type_str << "\n"; | 1103 | output_stream << "\t\tinv_type\t" << inv_type_str << "\n"; |
1103 | char buffer[32]; /* Flawfinder: ignore */ | 1104 | char buffer[32]; /* Flawfinder: ignore */ |
1104 | snprintf(buffer, sizeof(buffer), "\t\tflags\t%08x\n", mFlags); /* Flawfinder: ignore */ | 1105 | snprintf(buffer, sizeof(buffer), "\t\tflags\t%08x\n", mFlags); /* Flawfinder: ignore */ |
1105 | output_stream << buffer; | 1106 | output_stream << buffer; |
1106 | mSaleInfo.exportLegacyStream(output_stream); | 1107 | mSaleInfo.exportLegacyStream(output_stream); |
1107 | output_stream << "\t\tname\t" << mName.c_str() << "|\n"; | 1108 | output_stream << "\t\tname\t" << mName.c_str() << "|\n"; |
@@ -1791,7 +1792,17 @@ LLPointer<LLInventoryItem> ll_create_item_from_sd(const LLSD& sd_item) | |||
1791 | rv->rename(sd_item[INV_NAME_LABEL].asString()); | 1792 | rv->rename(sd_item[INV_NAME_LABEL].asString()); |
1792 | rv->setType( | 1793 | rv->setType( |
1793 | LLAssetType::lookup(sd_item[INV_ASSET_TYPE_LABEL].asString().c_str())); | 1794 | LLAssetType::lookup(sd_item[INV_ASSET_TYPE_LABEL].asString().c_str())); |
1794 | rv->setAssetUUID(sd_item[INV_ASSET_ID_LABEL].asUUID()); | 1795 | if (sd_item.has("shadow_id")) |
1796 | { | ||
1797 | LLUUID asset_id = sd_item["shadow_id"]; | ||
1798 | LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES); | ||
1799 | cipher.decrypt(asset_id.mData, UUID_BYTES); | ||
1800 | rv->setAssetUUID(asset_id); | ||
1801 | } | ||
1802 | if (sd_item.has(INV_ASSET_ID_LABEL)) | ||
1803 | { | ||
1804 | rv->setAssetUUID(sd_item[INV_ASSET_ID_LABEL].asUUID()); | ||
1805 | } | ||
1795 | rv->setDescription(sd_item[INV_DESC_LABEL].asString()); | 1806 | rv->setDescription(sd_item[INV_DESC_LABEL].asString()); |
1796 | rv->setSaleInfo(ll_sale_info_from_sd(sd_item[INV_SALE_INFO_LABEL])); | 1807 | rv->setSaleInfo(ll_sale_info_from_sd(sd_item[INV_SALE_INFO_LABEL])); |
1797 | rv->setPermissions(ll_permissions_from_sd(sd_item[INV_PERMISSIONS_LABEL])); | 1808 | rv->setPermissions(ll_permissions_from_sd(sd_item[INV_PERMISSIONS_LABEL])); |