* Misc. formatting cleanup for the previous patch

* Added the new AppDomainLoading variable to the [XEngine] section in the example config
0.6.8-post-fixes
John Hurliman 2009-10-29 05:56:37 -07:00
parent 33448e4ba8
commit dd13fa361b
4 changed files with 47 additions and 37 deletions

View File

@ -352,7 +352,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
throw new Exception(errtext);
}
if (m_scriptEngine.World.Permissions.CanCompileScript(ownerUUID, (int)language) == false) {
if (m_scriptEngine.World.Permissions.CanCompileScript(ownerUUID, (int)language) == false)
{
// Not allowed to compile to this language!
string errtext = String.Empty;
errtext += ownerUUID + " is not in list of allowed users for this scripting language. Script will not be executed!";

View File

@ -93,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
private StateSource m_stateSource;
private bool m_postOnRez;
private bool m_startedFromSavedState = false;
private int m_CurrentStateHash;
private UUID m_CurrentStateHash;
private UUID m_RegionID = UUID.Zero;
private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
@ -901,7 +901,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
// Compare hash of the state we just just created with the state last written to disk
// If the state is different, update the disk file.
if(xml.GetHashCode() != m_CurrentStateHash)
UUID hash = UUID.Parse(Utils.MD5String(xml));
if(hash != m_CurrentStateHash)
{
try
{
@ -919,7 +921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
//{
// throw new Exception("Completed persistence save, but no file was created");
//}
m_CurrentStateHash = xml.GetHashCode();
m_CurrentStateHash = hash;
}
}

View File

@ -710,15 +710,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
evidence, appSetup);
else
sandbox = AppDomain.CurrentDomain;
/*
PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
sandbox.SetAppDomainPolicy(sandboxPolicy);
*/
//PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
//AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
//PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
//PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
//CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
//sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
//sandbox.SetAppDomainPolicy(sandboxPolicy);
m_AppDomains[appDomain] = sandbox;
m_AppDomains[appDomain].AssemblyResolve +=

View File

@ -941,6 +941,13 @@
; Stack size per thread created
ThreadStackSize = 262144
; Set this to true (the default) to load each script into a separate
; AppDomain. Setting this to false will load all script assemblies into the
; current AppDomain, which will reduce the per-script overhead at the
; expense of reduced security and the inability to garbage collect the
; script assemblies
AppDomainLoading = true
; Rate to poll for asynchronous command replies (ms)
; currently unused
;AsyncLLCommandLoopms = 50