diff options
Diffstat (limited to 'indra/newview/llassetuploadresponders.cpp')
-rw-r--r-- | indra/newview/llassetuploadresponders.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 27dcb9f1c7..116c4cafc2 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -203,19 +203,13 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content) LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, - LLAssetType::EType asset_type, - boost::function<void(const LLUUID& uuid)> callback) -: LLAssetUploadResponder(post_data, vfile_id, asset_type), - mCallback(callback) + LLAssetType::EType asset_type) +: LLAssetUploadResponder(post_data, vfile_id, asset_type) { } -LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, - const std::string& file_name, - LLAssetType::EType asset_type, - boost::function<void(const LLUUID& uuid)> callback) -: LLAssetUploadResponder(post_data, file_name, asset_type), - mCallback(callback) +LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const std::string& file_name, LLAssetType::EType asset_type) +: LLAssetUploadResponder(post_data, file_name, asset_type) { } @@ -293,12 +287,6 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) creation_date_now); gInventory.updateItem(item); gInventory.notifyObservers(); - - if (mCallback) - { - // call the callback with the new Asset UUID - mCallback(item->getAssetUUID()); - } // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. @@ -346,11 +334,13 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) U32 group_perms = mPostData.has("group_mask") ? mPostData.get("group_mask" ).asInteger() : PERM_NONE; U32 next_owner_perms = mPostData.has("next_owner_mask") ? mPostData.get("next_owner_mask").asInteger() : PERM_NONE; std::string display_name = LLStringUtil::null; + LLAssetStorage::LLStoreAssetCallback callback = NULL; + void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, - LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, next_owner_perms, group_perms, everyone_perms, display_name, - NULL, expected_upload_cost); + callback, expected_upload_cost, userdata); } } |