a few changes about test mesh uploads

0.9.1.0-post-fixes
UbitUmarov 2018-07-14 17:01:50 +01:00
parent dd508d4c4f
commit ee6f261415
1 changed files with 27 additions and 26 deletions

View File

@ -610,9 +610,8 @@ namespace OpenSim.Region.ClientStack.Linden
IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-"));
}
if(IsAtestUpload) // let user know, still showing cost estimation
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";
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";
// check funds
else
@ -633,6 +632,12 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
}
else if (m_enableFreeTestUpload) // only if prefixed with "TEST-"
{
IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-"));
if(IsAtestUpload)
warning += "Upload for testing purposes only. IItems will be local to region only, Inventory entry will be lost on logout";
}
if (client != null && warning != String.Empty)
client.SendAgentAlertMessage(warning, true);
@ -715,7 +720,7 @@ namespace OpenSim.Region.ClientStack.Linden
UUID owner_id = m_HostCapsObj.AgentID;
UUID creatorID;
bool istest = IsAtestUpload && m_enableFreeTestUpload && (cost > 0);
bool istest = IsAtestUpload && m_enableFreeTestUpload;
bool restrictPerms = m_RestrictFreeTestUploadPerms && istest;
@ -2005,6 +2010,12 @@ namespace OpenSim.Region.ClientStack.Linden
uploadComplete.new_group_mask = m_groupMask;
uploadComplete.new_everyone_mask = m_everyoneMask;
if (m_error == String.Empty)
{
uploadComplete.new_asset = newAssetID.ToString();
uploadComplete.new_inventory_item = inv;
// if (m_texturesFolder != UUID.Zero)
// uploadComplete.new_texture_folder_id = m_texturesFolder;
if (m_IsAtestUpload)
{
LLSDAssetUploadError resperror = new LLSDAssetUploadError();
@ -2012,16 +2023,7 @@ namespace OpenSim.Region.ClientStack.Linden
resperror.identifier = inv;
uploadComplete.error = resperror;
uploadComplete.state = "Upload4Testing";
}
else
{
if (m_error == String.Empty)
{
uploadComplete.new_asset = newAssetID.ToString();
uploadComplete.new_inventory_item = inv;
// if (m_texturesFolder != UUID.Zero)
// uploadComplete.new_texture_folder_id = m_texturesFolder;
uploadComplete.state = "complete";
}
else
@ -2033,7 +2035,6 @@ namespace OpenSim.Region.ClientStack.Linden
uploadComplete.error = resperror;
uploadComplete.state = "failed";
}
}
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
return res;