aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2009-10-01 14:08:15 +0100
committerMelanie2009-10-01 14:08:15 +0100
commit41ff39414bc70ef645e2180693792c83d61a7539 (patch)
treedc711428d4c8fed07791263ff4dfea142d54e4e7 /OpenSim/Region/ScriptEngine
parentMerge branch 'vehicles' of ssh://opensim@tor.k-grid.com/home/opensim/opensim ... (diff)
parent- adding new LandDataSerializer testcase to "test-xml" target as well (diff)
downloadopensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.zip
opensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.tar.gz
opensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.tar.bz2
opensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs30
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs25
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs50
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs8
10 files changed, 76 insertions, 73 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs
index 569009e..0feb967 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs
@@ -225,7 +225,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
225 // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened 225 // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
226 m_log.ErrorFormat( 226 m_log.ErrorFormat(
227 "[{0}]: Event queue thread terminating with exception. PLEASE REBOOT YOUR SIM - SCRIPT EVENTS WILL NOT WORK UNTIL YOU DO. Exception is {1}", 227 "[{0}]: Event queue thread terminating with exception. PLEASE REBOOT YOUR SIM - SCRIPT EVENTS WILL NOT WORK UNTIL YOU DO. Exception is {1}",
228 ScriptEngineName, e); 228 ScriptEngineName, e);
229 } 229 }
230 } 230 }
231 231
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
index 8ad916c..3c91b29 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -418,7 +418,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
418 { 418 {
419 InstanceData id = m_ScriptManager.GetScript(localID, itemID); 419 InstanceData id = m_ScriptManager.GetScript(localID, itemID);
420 if (id == null) 420 if (id == null)
421 return; 421 return;
422 422
423 if (!id.Disabled) 423 if (!id.Disabled)
424 id.Running = true; 424 id.Running = true;
@@ -428,7 +428,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
428 { 428 {
429 InstanceData id = m_ScriptManager.GetScript(localID, itemID); 429 InstanceData id = m_ScriptManager.GetScript(localID, itemID);
430 if (id == null) 430 if (id == null)
431 return; 431 return;
432 432
433 id.Running = false; 433 id.Running = false;
434 } 434 }
@@ -442,7 +442,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
442 442
443 InstanceData id = m_ScriptManager.GetScript(localID, itemID); 443 InstanceData id = m_ScriptManager.GetScript(localID, itemID);
444 if (id == null) 444 if (id == null)
445 return; 445 return;
446 446
447 IEventQueue eq = World.RequestModuleInterface<IEventQueue>(); 447 IEventQueue eq = World.RequestModuleInterface<IEventQueue>();
448 if (eq == null) 448 if (eq == null)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 9c1cd4d..6ac209e 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -520,13 +520,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
520 ExeStage = 5; // ;^) Ewe Loon, for debuging 520 ExeStage = 5; // ;^) Ewe Loon, for debuging
521 } 521 }
522 catch (Exception e) // ;^) Ewe Loon, From here down tis fix 522 catch (Exception e) // ;^) Ewe Loon, From here down tis fix
523 { 523 {
524 if ((ExeStage == 3)&&(qParams.Length>0)) 524 if ((ExeStage == 3)&&(qParams.Length>0))
525 detparms.Remove(id); 525 detparms.Remove(id);
526 SceneObjectPart ob = m_scriptEngine.World.GetSceneObjectPart(localID); 526 SceneObjectPart ob = m_scriptEngine.World.GetSceneObjectPart(localID);
527 m_log.InfoFormat("[Script Error] ,{0},{1},@{2},{3},{4},{5}", ob.Name , FunctionName, ExeStage, e.Message, qParams.Length, detparms.Count); 527 m_log.InfoFormat("[Script Error] ,{0},{1},@{2},{3},{4},{5}", ob.Name , FunctionName, ExeStage, e.Message, qParams.Length, detparms.Count);
528 if (ExeStage != 2) throw e; 528 if (ExeStage != 2) throw e;
529 } 529 }
530 } 530 }
531 531
532 public uint GetLocalID(UUID itemID) 532 public uint GetLocalID(UUID itemID)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c41f2a5..3051609 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -50,6 +50,9 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
50using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 50using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
51using OpenSim.Region.ScriptEngine.Interfaces; 51using OpenSim.Region.ScriptEngine.Interfaces;
52using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 52using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
53using OpenSim.Services.Interfaces;
54
55using GridRegion = OpenSim.Services.Interfaces.GridRegion;
53 56
54using AssetLandmark = OpenSim.Framework.AssetLandmark; 57using AssetLandmark = OpenSim.Framework.AssetLandmark;
55 58
@@ -2010,10 +2013,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2010 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 2013 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
2011 } 2014 }
2012 else 2015 else
2013 q = part.ParentGroup.GroupRotation; // Likely never get here but just in case 2016 q = part.ParentGroup.Rotation; // Likely never get here but just in case
2014 } 2017 }
2015 else 2018 else
2016 q = part.ParentGroup.GroupRotation; // just the group rotation 2019 q = part.ParentGroup.Rotation; // just the group rotation
2017 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2020 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2018 } 2021 }
2019 q = part.GetWorldRotation(); 2022 q = part.GetWorldRotation();
@@ -5002,6 +5005,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5002 if (end > src.Length) 5005 if (end > src.Length)
5003 end = src.Length; 5006 end = src.Length;
5004 5007
5008 if (stride == 0)
5009 stride = 1;
5010
5005 // There may be one or two ranges to be considered 5011 // There may be one or two ranges to be considered
5006 5012
5007 if (start != end) 5013 if (start != end)
@@ -5028,9 +5034,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5028 // A negative stride reverses the direction of the 5034 // A negative stride reverses the direction of the
5029 // scan producing an inverted list as a result. 5035 // scan producing an inverted list as a result.
5030 5036
5031 if (stride == 0)
5032 stride = 1;
5033
5034 if (stride > 0) 5037 if (stride > 0)
5035 { 5038 {
5036 for (int i = 0; i < src.Length; i += stride) 5039 for (int i = 0; i < src.Length; i += stride)
@@ -5054,7 +5057,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5054 } 5057 }
5055 else 5058 else
5056 { 5059 {
5057 result.Add(src.Data[start]); 5060 if (start%stride == 0)
5061 {
5062 result.Add(src.Data[start]);
5063 }
5058 } 5064 }
5059 5065
5060 return result; 5066 return result;
@@ -5232,12 +5238,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5232 } 5238 }
5233 } 5239 }
5234 5240
5235 List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); 5241 List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
5236 5242
5237 uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; 5243 uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
5238 uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; 5244 uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
5239 5245
5240 foreach (SimpleRegionInfo sri in neighbors) 5246 foreach (GridRegion sri in neighbors)
5241 { 5247 {
5242 if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) 5248 if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY)
5243 return 0; 5249 return 0;
@@ -7178,10 +7184,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7178 else 7184 else
7179 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 7185 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
7180 else 7186 else
7181 q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case 7187 q = m_host.ParentGroup.Rotation; // Likely never get here but just in case
7182 } 7188 }
7183 else 7189 else
7184 q = m_host.ParentGroup.GroupRotation; // just the group rotation 7190 q = m_host.ParentGroup.Rotation; // just the group rotation
7185 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 7191 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
7186 } 7192 }
7187 7193
@@ -8184,7 +8190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8184 8190
8185 string reply = String.Empty; 8191 string reply = String.Empty;
8186 8192
8187 RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); 8193 GridRegion info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
8188 8194
8189 switch (data) 8195 switch (data)
8190 { 8196 {
@@ -8211,7 +8217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8211 ConditionalScriptSleep(1000); 8217 ConditionalScriptSleep(1000);
8212 return UUID.Zero.ToString(); 8218 return UUID.Zero.ToString();
8213 } 8219 }
8214 int access = info.RegionSettings.Maturity; 8220 int access = info.Maturity;
8215 if (access == 0) 8221 if (access == 0)
8216 reply = "PG"; 8222 reply = "PG";
8217 else if (access == 1) 8223 else if (access == 1)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index ccdd4c5..0b95abc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -48,6 +48,8 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
48using OpenSim.Region.ScriptEngine.Interfaces; 48using OpenSim.Region.ScriptEngine.Interfaces;
49using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 49using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
50using TPFlags = OpenSim.Framework.Constants.TeleportFlags; 50using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
51using OpenSim.Services.Interfaces;
52using GridRegion = OpenSim.Services.Interfaces.GridRegion;
51using System.Text.RegularExpressions; 53using System.Text.RegularExpressions;
52 54
53using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 55using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
@@ -599,17 +601,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
599 if (regionName.Contains(".") && regionName.Contains(":")) 601 if (regionName.Contains(".") && regionName.Contains(":"))
600 { 602 {
601 // Try to link the region 603 // Try to link the region
602 RegionInfo regInfo = HGHyperlink.TryLinkRegion(World, 604 IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>();
603 presence.ControllingClient, 605 if (hyperService != null)
604 regionName);
605 // Get the region name
606 if (regInfo != null)
607 { 606 {
608 regionName = regInfo.RegionName; 607 GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient,
609 } 608 regionName);
610 else 609 // Get the region name
611 { 610 if (regInfo != null)
612 // Might need to ping the client here in case of failure?? 611 {
612 regionName = regInfo.RegionName;
613 }
614 else
615 {
616 // Might need to ping the client here in case of failure??
617 }
613 } 618 }
614 } 619 }
615 presence.ControllingClient.SendTeleportLocationStart(); 620 presence.ControllingClient.SendTeleportLocationStart();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index d0df390..8dcb1f5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
95 return m_OSSL_Functions.osWindActiveModelPluginName(); 95 return m_OSSL_Functions.osWindActiveModelPluginName();
96 } 96 }
97 97
98// Not yet plugged in as available OSSL functions, so commented out 98// Not yet plugged in as available OSSL functions, so commented out
99// void osWindParamSet(string plugin, string param, float value) 99// void osWindParamSet(string plugin, string param, float value)
100// { 100// {
101// m_OSSL_Functions.osWindParamSet(plugin, param, value); 101// m_OSSL_Functions.osWindParamSet(plugin, param, value);
@@ -329,7 +329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
329 329
330 public string osGetSimulatorVersion() 330 public string osGetSimulatorVersion()
331 { 331 {
332 return m_OSSL_Functions.osGetSimulatorVersion(); 332 return m_OSSL_Functions.osGetSimulatorVersion();
333 } 333 }
334 334
335 public Hashtable osParseJSON(string JSON) 335 public Hashtable osParseJSON(string JSON)
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 5a94957..fe26429 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -546,11 +546,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
546 bool retried = false; 546 bool retried = false;
547 do 547 do
548 { 548 {
549 lock (CScodeProvider) 549 lock (CScodeProvider)
550 { 550 {
551 results = CScodeProvider.CompileAssemblyFromSource( 551 results = CScodeProvider.CompileAssemblyFromSource(
552 parameters, Script); 552 parameters, Script);
553 } 553 }
554 // Deal with an occasional segv in the compiler. 554 // Deal with an occasional segv in the compiler.
555 // Rarely, if ever, occurs twice in succession. 555 // Rarely, if ever, occurs twice in succession.
556 // Line # == 0 and no file name are indications that 556 // Line # == 0 and no file name are indications that
@@ -573,20 +573,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
573 { 573 {
574 complete = true; 574 complete = true;
575 } 575 }
576 } 576 } while (!complete);
577 while(!complete);
578 break; 577 break;
579 case enumCompileType.js: 578 case enumCompileType.js:
580 results = JScodeProvider.CompileAssemblyFromSource( 579 results = JScodeProvider.CompileAssemblyFromSource(
581 parameters, Script); 580 parameters, Script);
582 break; 581 break;
583 case enumCompileType.yp: 582 case enumCompileType.yp:
584 results = YPcodeProvider.CompileAssemblyFromSource( 583 results = YPcodeProvider.CompileAssemblyFromSource(
585 parameters, Script); 584 parameters, Script);
586 break; 585 break;
587 default: 586 default:
588 throw new Exception("Compiler is not able to recongnize "+ 587 throw new Exception("Compiler is not able to recongnize "+
589 "language type \"" + lang.ToString() + "\""); 588 "language type \"" + lang.ToString() + "\"");
590 } 589 }
591 590
592 // Check result 591 // Check result
@@ -602,12 +601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
602 { 601 {
603 foreach (CompilerError CompErr in results.Errors) 602 foreach (CompilerError CompErr in results.Errors)
604 { 603 {
605 604 string severity = CompErr.IsWarning ? "Warning" : "Error";
606 string severity = "Error";
607 if (CompErr.IsWarning)
608 {
609 severity = "Warning";
610 }
611 605
612 KeyValuePair<int, int> lslPos; 606 KeyValuePair<int, int> lslPos;
613 607
@@ -615,18 +609,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
615 609
616 if (severity == "Error") 610 if (severity == "Error")
617 { 611 {
618 lslPos = FindErrorPosition(CompErr.Line, CompErr.Column); 612 lslPos = FindErrorPosition(CompErr.Line, CompErr.Column);
619 string text = CompErr.ErrorText; 613 string text = CompErr.ErrorText;
620 614
621 // Use LSL type names 615 // Use LSL type names
622 if (lang == enumCompileType.lsl) 616 if (lang == enumCompileType.lsl)
623 text = ReplaceTypes(CompErr.ErrorText); 617 text = ReplaceTypes(CompErr.ErrorText);
624 618
625 // The Second Life viewer's script editor begins 619 // The Second Life viewer's script editor begins
626 // countingn lines and columns at 0, so we subtract 1. 620 // countingn lines and columns at 0, so we subtract 1.
627 errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", 621 errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n",
628 lslPos.Key - 1, lslPos.Value - 1, 622 lslPos.Key - 1, lslPos.Value - 1,
629 CompErr.ErrorNumber, text, severity); 623 CompErr.ErrorNumber, text, severity);
630 hadErrors = true; 624 hadErrors = true;
631 } 625 }
632 } 626 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 4855d64..84ccafe 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -218,16 +218,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
218 } 218 }
219 } 219 }
220 220
221 Position = new LSL_Types.Vector3(part.AbsolutePosition.X, 221 Vector3 absPos = part.AbsolutePosition;
222 part.AbsolutePosition.Y, 222 Position = new LSL_Types.Vector3(absPos.X, absPos.Y, absPos.Z);
223 part.AbsolutePosition.Z);
224 223
225 Quaternion wr = part.ParentGroup.GroupRotation; 224 Quaternion wr = part.ParentGroup.Rotation;
226 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); 225 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
227 226
228 Velocity = new LSL_Types.Vector3(part.Velocity.X, 227 Vector3 vel = part.Velocity;
229 part.Velocity.Y, 228 Velocity = new LSL_Types.Vector3(vel.X, vel.Y, vel.Z);
230 part.Velocity.Z);
231 } 229 }
232 } 230 }
233 231
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 650d9fa..97166cf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
261 "SecondLife.Script"); 261 "SecondLife.Script");
262 262
263 //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); 263 //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass);
264 RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); 264 RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass);
265// lease.Register(this); 265// lease.Register(this);
266 } 266 }
267 catch (Exception) 267 catch (Exception)
@@ -430,7 +430,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
430 430
431 permsGranter = part.TaskInventory[m_ItemID].PermsGranter; 431 permsGranter = part.TaskInventory[m_ItemID].PermsGranter;
432 permsMask = part.TaskInventory[m_ItemID].PermsMask; 432 permsMask = part.TaskInventory[m_ItemID].PermsMask;
433 } 433 }
434 434
435 if ((permsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0) 435 if ((permsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0)
436 { 436 {
@@ -630,7 +630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
630 /// <summary> 630 /// <summary>
631 /// Process the next event queued for this script 631 /// Process the next event queued for this script
632 /// </summary> 632 /// </summary>
633 /// <returns></returns> 633 /// <returns></returns>
634 public object EventProcessor() 634 public object EventProcessor()
635 { 635 {
636 lock (m_Script) 636 lock (m_Script)
@@ -925,7 +925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
925 925
926 public override string ToString() 926 public override string ToString()
927 { 927 {
928 return String.Format("{0} {1} on {2}", m_ScriptName, m_ItemID, m_PrimName); 928 return String.Format("{0} {1} on {2}", m_ScriptName, m_ItemID, m_PrimName);
929 } 929 }
930 930
931 string FormatException(Exception e) 931 string FormatException(Exception e)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 9a972c2..e695133 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -554,7 +554,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
554 554
555 // We must look for the part outside the m_Scripts lock because GetSceneObjectPart later triggers the 555 // We must look for the part outside the m_Scripts lock because GetSceneObjectPart later triggers the
556 // m_parts lock on SOG. At the same time, a scene object that is being deleted will take the m_parts lock 556 // m_parts lock on SOG. At the same time, a scene object that is being deleted will take the m_parts lock
557 // and then later on try to take the m_scripts lock in this class when it calls OnRemoveScript() 557 // and then later on try to take the m_scripts lock in this class when it calls OnRemoveScript()
558 SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); 558 SceneObjectPart part = m_Scene.GetSceneObjectPart(localID);
559 if (part == null) 559 if (part == null)
560 { 560 {
@@ -562,7 +562,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
562 m_ScriptErrorMessage += "SceneObjectPart unavailable. Script NOT started.\n"; 562 m_ScriptErrorMessage += "SceneObjectPart unavailable. Script NOT started.\n";
563 m_ScriptFailCount++; 563 m_ScriptFailCount++;
564 return false; 564 return false;
565 } 565 }
566 566
567 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); 567 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID);
568 if (item == null) 568 if (item == null)
@@ -692,7 +692,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
692 AppDomain.CreateDomain( 692 AppDomain.CreateDomain(
693 m_Scene.RegionInfo.RegionID.ToString(), 693 m_Scene.RegionInfo.RegionID.ToString(),
694 evidence, appSetup); 694 evidence, appSetup);
695/* 695/*
696 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); 696 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
697 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); 697 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
698 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); 698 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
@@ -925,7 +925,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
925 return new XWorkItem(m_ThreadPool.QueueWorkItem( 925 return new XWorkItem(m_ThreadPool.QueueWorkItem(
926 new WorkItemCallback(this.ProcessEventHandler), 926 new WorkItemCallback(this.ProcessEventHandler),
927 parms)); 927 parms));
928 } 928 }
929 929
930 /// <summary> 930 /// <summary>
931 /// Process a previously posted script event. 931 /// Process a previously posted script event.