aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps
diff options
context:
space:
mode:
authorUbitUmarov2018-07-14 17:01:50 +0100
committerUbitUmarov2018-07-14 17:01:50 +0100
commitee6f26141599d90e2c83fe1c684b30907a6bb53a (patch)
tree5d158cf10a095b5689496781904d1e1fabe51b92 /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps
parentuse Vector.Distance not util.. (diff)
downloadopensim-SC-ee6f26141599d90e2c83fe1c684b30907a6bb53a.zip
opensim-SC-ee6f26141599d90e2c83fe1c684b30907a6bb53a.tar.gz
opensim-SC-ee6f26141599d90e2c83fe1c684b30907a6bb53a.tar.bz2
opensim-SC-ee6f26141599d90e2c83fe1c684b30907a6bb53a.tar.xz
a few changes about test mesh uploads
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs53
1 files changed, 27 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index b8d423f..6705c7b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -610,9 +610,8 @@ namespace OpenSim.Region.ClientStack.Linden
610 IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-")); 610 IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-"));
611 } 611 }
612 612
613
614 if(IsAtestUpload) // let user know, still showing cost estimation 613 if(IsAtestUpload) // let user know, still showing cost estimation
615 warning += "Upload will have no cost, for testing purposes only. Other uses are prohibited. Items will not work after 48 hours or on other regions"; 614 warning += "Upload will have no cost, for testing purposes only. Other uses are prohibited. Items will be local to region only, Inventory entry will be lost on logout";
616 615
617 // check funds 616 // check funds
618 else 617 else
@@ -633,6 +632,12 @@ namespace OpenSim.Region.ClientStack.Linden
633 } 632 }
634 } 633 }
635 } 634 }
635 else if (m_enableFreeTestUpload) // only if prefixed with "TEST-"
636 {
637 IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-"));
638 if(IsAtestUpload)
639 warning += "Upload for testing purposes only. IItems will be local to region only, Inventory entry will be lost on logout";
640 }
636 641
637 if (client != null && warning != String.Empty) 642 if (client != null && warning != String.Empty)
638 client.SendAgentAlertMessage(warning, true); 643 client.SendAgentAlertMessage(warning, true);
@@ -715,7 +720,7 @@ namespace OpenSim.Region.ClientStack.Linden
715 UUID owner_id = m_HostCapsObj.AgentID; 720 UUID owner_id = m_HostCapsObj.AgentID;
716 UUID creatorID; 721 UUID creatorID;
717 722
718 bool istest = IsAtestUpload && m_enableFreeTestUpload && (cost > 0); 723 bool istest = IsAtestUpload && m_enableFreeTestUpload;
719 724
720 bool restrictPerms = m_RestrictFreeTestUploadPerms && istest; 725 bool restrictPerms = m_RestrictFreeTestUploadPerms && istest;
721 726
@@ -2005,34 +2010,30 @@ namespace OpenSim.Region.ClientStack.Linden
2005 uploadComplete.new_group_mask = m_groupMask; 2010 uploadComplete.new_group_mask = m_groupMask;
2006 uploadComplete.new_everyone_mask = m_everyoneMask; 2011 uploadComplete.new_everyone_mask = m_everyoneMask;
2007 2012
2008 if (m_IsAtestUpload) 2013 if (m_error == String.Empty)
2009 { 2014 {
2010 LLSDAssetUploadError resperror = new LLSDAssetUploadError(); 2015 uploadComplete.new_asset = newAssetID.ToString();
2011 resperror.message = "Upload SUCESSEFULL for testing purposes only. Other uses are prohibited. Item will not work after 48 hours or on other regions"; 2016 uploadComplete.new_inventory_item = inv;
2012 resperror.identifier = inv; 2017 // if (m_texturesFolder != UUID.Zero)
2013 2018 // uploadComplete.new_texture_folder_id = m_texturesFolder;
2014 uploadComplete.error = resperror; 2019 if (m_IsAtestUpload)
2015 uploadComplete.state = "Upload4Testing"; 2020 {
2021 LLSDAssetUploadError resperror = new LLSDAssetUploadError();
2022 resperror.message = "Upload SUCESSEFULL for testing purposes only. Other uses are prohibited. Item will not work after 48 hours or on other regions";
2023 resperror.identifier = inv;
2024
2025 uploadComplete.error = resperror;
2026 }
2027 uploadComplete.state = "complete";
2016 } 2028 }
2017 else 2029 else
2018 { 2030 {
2019 if (m_error == String.Empty) 2031 LLSDAssetUploadError resperror = new LLSDAssetUploadError();
2020 { 2032 resperror.message = m_error;
2021 uploadComplete.new_asset = newAssetID.ToString(); 2033 resperror.identifier = inv;
2022 uploadComplete.new_inventory_item = inv;
2023 // if (m_texturesFolder != UUID.Zero)
2024 // uploadComplete.new_texture_folder_id = m_texturesFolder;
2025 uploadComplete.state = "complete";
2026 }
2027 else
2028 {
2029 LLSDAssetUploadError resperror = new LLSDAssetUploadError();
2030 resperror.message = m_error;
2031 resperror.identifier = inv;
2032 2034
2033 uploadComplete.error = resperror; 2035 uploadComplete.error = resperror;
2034 uploadComplete.state = "failed"; 2036 uploadComplete.state = "failed";
2035 }
2036 } 2037 }
2037 2038
2038 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); 2039 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);