* Assigns a random UUID to a region if the Sim UUID is null.

0.6.0-stable
Adam Frisby 2008-05-26 22:11:56 +00:00
parent 77281ed85c
commit 392375d34b
3 changed files with 15 additions and 1 deletions

View File

@ -368,6 +368,19 @@ namespace OpenSim.Framework
} }
errorMessage = "a UUID (LLUUID)"; errorMessage = "a UUID (LLUUID)";
break; break;
case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE:
LLUUID uuidResult2;
if (LLUUID.TryParse(console_result, out uuidResult2))
{
convertSuccess = true;
if (uuidResult2 == LLUUID.Zero)
uuidResult2 = LLUUID.Random();
return_result = uuidResult2;
}
errorMessage = "a non-null UUID (LLUUID)";
break;
case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3: case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3:
LLVector3 vectorResult; LLVector3 vectorResult;
if (LLVector3.TryParse(console_result, out vectorResult)) if (LLVector3.TryParse(console_result, out vectorResult))

View File

@ -54,6 +54,7 @@ namespace OpenSim.Framework
TYPE_BOOLEAN, TYPE_BOOLEAN,
TYPE_BYTE, TYPE_BYTE,
TYPE_LLUUID, TYPE_LLUUID,
TYPE_LLUUID_NULL_FREE,
TYPE_LLVECTOR3, TYPE_LLVECTOR3,
TYPE_FLOAT, TYPE_FLOAT,
TYPE_DOUBLE TYPE_DOUBLE

View File

@ -345,7 +345,7 @@ namespace OpenSim.Framework
public void loadConfigurationOptionsFromMe() public void loadConfigurationOptionsFromMe()
{ {
configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE,
"UUID of Region (Default is recommended, random UUID)", "UUID of Region (Default is recommended, random UUID)",
RegionID.ToString(), true); RegionID.ToString(), true);
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,