a few changes about test mesh uploads
parent
dd508d4c4f
commit
ee6f261415
|
@ -610,9 +610,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-"));
|
IsAtestUpload = (assetName.Length > 5 && assetName.StartsWith("TEST-"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(IsAtestUpload) // let user know, still showing cost estimation
|
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
|
// check funds
|
||||||
else
|
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)
|
if (client != null && warning != String.Empty)
|
||||||
client.SendAgentAlertMessage(warning, true);
|
client.SendAgentAlertMessage(warning, true);
|
||||||
|
@ -715,7 +720,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
UUID owner_id = m_HostCapsObj.AgentID;
|
UUID owner_id = m_HostCapsObj.AgentID;
|
||||||
UUID creatorID;
|
UUID creatorID;
|
||||||
|
|
||||||
bool istest = IsAtestUpload && m_enableFreeTestUpload && (cost > 0);
|
bool istest = IsAtestUpload && m_enableFreeTestUpload;
|
||||||
|
|
||||||
bool restrictPerms = m_RestrictFreeTestUploadPerms && istest;
|
bool restrictPerms = m_RestrictFreeTestUploadPerms && istest;
|
||||||
|
|
||||||
|
@ -2005,34 +2010,30 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
uploadComplete.new_group_mask = m_groupMask;
|
uploadComplete.new_group_mask = m_groupMask;
|
||||||
uploadComplete.new_everyone_mask = m_everyoneMask;
|
uploadComplete.new_everyone_mask = m_everyoneMask;
|
||||||
|
|
||||||
if (m_IsAtestUpload)
|
if (m_error == String.Empty)
|
||||||
{
|
{
|
||||||
LLSDAssetUploadError resperror = new LLSDAssetUploadError();
|
uploadComplete.new_asset = newAssetID.ToString();
|
||||||
resperror.message = "Upload SUCESSEFULL for testing purposes only. Other uses are prohibited. Item will not work after 48 hours or on other regions";
|
uploadComplete.new_inventory_item = inv;
|
||||||
resperror.identifier = inv;
|
// if (m_texturesFolder != UUID.Zero)
|
||||||
|
// uploadComplete.new_texture_folder_id = m_texturesFolder;
|
||||||
uploadComplete.error = resperror;
|
if (m_IsAtestUpload)
|
||||||
uploadComplete.state = "Upload4Testing";
|
{
|
||||||
|
LLSDAssetUploadError resperror = new LLSDAssetUploadError();
|
||||||
|
resperror.message = "Upload SUCESSEFULL for testing purposes only. Other uses are prohibited. Item will not work after 48 hours or on other regions";
|
||||||
|
resperror.identifier = inv;
|
||||||
|
|
||||||
|
uploadComplete.error = resperror;
|
||||||
|
}
|
||||||
|
uploadComplete.state = "complete";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_error == String.Empty)
|
LLSDAssetUploadError resperror = new LLSDAssetUploadError();
|
||||||
{
|
resperror.message = m_error;
|
||||||
uploadComplete.new_asset = newAssetID.ToString();
|
resperror.identifier = inv;
|
||||||
uploadComplete.new_inventory_item = inv;
|
|
||||||
// if (m_texturesFolder != UUID.Zero)
|
|
||||||
// uploadComplete.new_texture_folder_id = m_texturesFolder;
|
|
||||||
uploadComplete.state = "complete";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LLSDAssetUploadError resperror = new LLSDAssetUploadError();
|
|
||||||
resperror.message = m_error;
|
|
||||||
resperror.identifier = inv;
|
|
||||||
|
|
||||||
uploadComplete.error = resperror;
|
uploadComplete.error = resperror;
|
||||||
uploadComplete.state = "failed";
|
uploadComplete.state = "failed";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
|
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
|
||||||
|
|
Loading…
Reference in New Issue