aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs8
-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.cs87
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs60
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs115
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs8
13 files changed, 202 insertions, 112 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
index dc49549..4e13fb3 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
@@ -305,9 +305,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
305 if (engine != myScriptEngine.ScriptEngineName) 305 if (engine != myScriptEngine.ScriptEngineName)
306 return; 306 return;
307 307
308 m_log.Debug("OnRezScript localID: " + localID + 308 // m_log.Debug("OnRezScript localID: " + localID +
309 " LLUID: " + itemID.ToString() + " Size: " + 309 // " LLUID: " + itemID.ToString() + " Size: " +
310 script.Length); 310 // script.Length);
311 311
312 myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, 312 myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script,
313 startParam, postOnRez); 313 startParam, postOnRez);
@@ -315,7 +315,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
315 315
316 public void OnRemoveScript(uint localID, UUID itemID) 316 public void OnRemoveScript(uint localID, UUID itemID)
317 { 317 {
318 m_log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); 318 // m_log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
319 myScriptEngine.m_ScriptManager.StopScript( 319 myScriptEngine.m_ScriptManager.StopScript(
320 localID, 320 localID,
321 itemID 321 itemID
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 ba42678..cb91677 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -24,7 +24,7 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
@@ -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
@@ -3896,7 +3899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3896 { 3899 {
3897 // agent must be over the owners land 3900 // agent must be over the owners land
3898 if (m_host.OwnerID == World.LandChannel.GetLandObject( 3901 if (m_host.OwnerID == World.LandChannel.GetLandObject(
3899 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 3902 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
3900 { 3903 {
3901 presence.ControllingClient.SendTeleportLocationStart(); 3904 presence.ControllingClient.SendTeleportLocationStart();
3902 World.TeleportClientHome(agentId, presence.ControllingClient); 3905 World.TeleportClientHome(agentId, presence.ControllingClient);
@@ -4088,7 +4091,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4088 return; 4091 return;
4089 4092
4090 // Need provisions for Group Owned here 4093 // Need provisions for Group Owned here
4091 if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) 4094 if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
4095 targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID)
4092 { 4096 {
4093 pushAllowed = true; 4097 pushAllowed = true;
4094 } 4098 }
@@ -4104,10 +4108,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4104 else 4108 else
4105 { 4109 {
4106 // Parcel push restriction 4110 // Parcel push restriction
4107 if ((targetlandObj.landData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject) 4111 if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject)
4108 { 4112 {
4109 // Need provisions for Group Owned here 4113 // Need provisions for Group Owned here
4110 if (m_host.OwnerID == targetlandObj.landData.OwnerID || targetlandObj.landData.IsGroupOwned || m_host.OwnerID == targetID) 4114 if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
4115 targetlandObj.LandData.IsGroupOwned ||
4116 m_host.OwnerID == targetID)
4111 { 4117 {
4112 pushAllowed = true; 4118 pushAllowed = true;
4113 } 4119 }
@@ -4996,6 +5002,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4996 if (end > src.Length) 5002 if (end > src.Length)
4997 end = src.Length; 5003 end = src.Length;
4998 5004
5005 if (stride == 0)
5006 stride = 1;
5007
4999 // There may be one or two ranges to be considered 5008 // There may be one or two ranges to be considered
5000 5009
5001 if (start != end) 5010 if (start != end)
@@ -5022,9 +5031,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5022 // A negative stride reverses the direction of the 5031 // A negative stride reverses the direction of the
5023 // scan producing an inverted list as a result. 5032 // scan producing an inverted list as a result.
5024 5033
5025 if (stride == 0)
5026 stride = 1;
5027
5028 if (stride > 0) 5034 if (stride > 0)
5029 { 5035 {
5030 for (int i = 0; i < src.Length; i += stride) 5036 for (int i = 0; i < src.Length; i += stride)
@@ -5048,7 +5054,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5048 } 5054 }
5049 else 5055 else
5050 { 5056 {
5051 result.Add(src.Data[start]); 5057 if (start%stride == 0)
5058 {
5059 result.Add(src.Data[start]);
5060 }
5052 } 5061 }
5053 5062
5054 return result; 5063 return result;
@@ -5226,12 +5235,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5226 } 5235 }
5227 } 5236 }
5228 5237
5229 List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); 5238 List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
5230 5239
5231 uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; 5240 uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
5232 uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; 5241 uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
5233 5242
5234 foreach (SimpleRegionInfo sri in neighbors) 5243 foreach (GridRegion sri in neighbors)
5235 { 5244 {
5236 if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) 5245 if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY)
5237 return 0; 5246 return 0;
@@ -5436,7 +5445,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5436 { 5445 {
5437 // agent must be over the owners land 5446 // agent must be over the owners land
5438 if (m_host.OwnerID == World.LandChannel.GetLandObject( 5447 if (m_host.OwnerID == World.LandChannel.GetLandObject(
5439 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 5448 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
5440 World.TeleportClientHome(agentId, presence.ControllingClient); 5449 World.TeleportClientHome(agentId, presence.ControllingClient);
5441 } 5450 }
5442 } 5451 }
@@ -5526,7 +5535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5526 { 5535 {
5527 if (m_host.OwnerID 5536 if (m_host.OwnerID
5528 == World.LandChannel.GetLandObject( 5537 == World.LandChannel.GetLandObject(
5529 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 5538 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
5530 return 1; 5539 return 1;
5531 } 5540 }
5532 else // object is not an avatar 5541 else // object is not an avatar
@@ -5535,7 +5544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5535 if (obj != null) 5544 if (obj != null)
5536 if (m_host.OwnerID 5545 if (m_host.OwnerID
5537 == World.LandChannel.GetLandObject( 5546 == World.LandChannel.GetLandObject(
5538 obj.AbsolutePosition.X, obj.AbsolutePosition.Y).landData.OwnerID) 5547 obj.AbsolutePosition.X, obj.AbsolutePosition.Y).LandData.OwnerID)
5539 return 1; 5548 return 1;
5540 } 5549 }
5541 } 5550 }
@@ -5546,7 +5555,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5546 public LSL_String llGetLandOwnerAt(LSL_Vector pos) 5555 public LSL_String llGetLandOwnerAt(LSL_Vector pos)
5547 { 5556 {
5548 m_host.AddScriptLPS(1); 5557 m_host.AddScriptLPS(1);
5549 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.OwnerID.ToString(); 5558 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString();
5550 } 5559 }
5551 5560
5552 /// <summary> 5561 /// <summary>
@@ -5615,9 +5624,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5615 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); 5624 ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y);
5616 if (parcel != null) 5625 if (parcel != null)
5617 { 5626 {
5618 if (m_host.ObjectOwner == parcel.landData.OwnerID || 5627 if (m_host.ObjectOwner == parcel.LandData.OwnerID ||
5619 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID 5628 (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.LandData.GroupID
5620 && parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) 5629 && parcel.LandData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID))
5621 { 5630 {
5622 av.StandUp(); 5631 av.StandUp();
5623 } 5632 }
@@ -6120,7 +6129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6120 { 6129 {
6121 m_host.AddScriptLPS(1); 6130 m_host.AddScriptLPS(1);
6122 UUID key; 6131 UUID key;
6123 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 6132 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
6124 if (land.OwnerID == m_host.OwnerID) 6133 if (land.OwnerID == m_host.OwnerID)
6125 { 6134 {
6126 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 6135 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@@ -6321,9 +6330,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6321 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero); 6330 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
6322 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); 6331 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
6323 if (xmlRpcRouter != null) 6332 if (xmlRpcRouter != null)
6333 {
6334 string ExternalHostName = m_ScriptEngine.World.RegionInfo.ExternalHostName;
6335
6324 xmlRpcRouter.RegisterNewReceiver(m_ScriptEngine.ScriptModule, channelID, m_host.UUID, 6336 xmlRpcRouter.RegisterNewReceiver(m_ScriptEngine.ScriptModule, channelID, m_host.UUID,
6325 m_itemID, String.Format("http://{0}:{1}/", System.Environment.MachineName, 6337 m_itemID, String.Format("http://{0}:{1}/", ExternalHostName,
6326 xmlrpcMod.Port.ToString())); 6338 xmlrpcMod.Port.ToString()));
6339 }
6327 object[] resobj = new object[] 6340 object[] resobj = new object[]
6328 { 6341 {
6329 new LSL_Integer(1), 6342 new LSL_Integer(1),
@@ -7134,7 +7147,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7134 7147
7135 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 7148 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
7136 7149
7137 if (land.landData.OwnerID != m_host.ObjectOwner) 7150 if (land.LandData.OwnerID != m_host.ObjectOwner)
7138 return; 7151 return;
7139 7152
7140 land.SetMusicUrl(url); 7153 land.SetMusicUrl(url);
@@ -7834,8 +7847,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7834 public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) 7847 public LSL_String llGetHTTPHeader(LSL_Key request_id, string header)
7835 { 7848 {
7836 m_host.AddScriptLPS(1); 7849 m_host.AddScriptLPS(1);
7837 NotImplemented("llGetHTTPHeader"); 7850
7838 return String.Empty; 7851 if (m_UrlModule != null)
7852 return m_UrlModule.GetHttpHeader(new UUID(request_id), header);
7853 return String.Empty;
7839 } 7854 }
7840 7855
7841 7856
@@ -8175,7 +8190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8175 8190
8176 string reply = String.Empty; 8191 string reply = String.Empty;
8177 8192
8178 RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); 8193 GridRegion info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
8179 8194
8180 switch (data) 8195 switch (data)
8181 { 8196 {
@@ -8202,7 +8217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8202 ConditionalScriptSleep(1000); 8217 ConditionalScriptSleep(1000);
8203 return UUID.Zero.ToString(); 8218 return UUID.Zero.ToString();
8204 } 8219 }
8205 int access = info.RegionSettings.Maturity; 8220 int access = info.Maturity;
8206 if (access == 0) 8221 if (access == 0)
8207 reply = "PG"; 8222 reply = "PG";
8208 else if (access == 1) 8223 else if (access == 1)
@@ -8391,7 +8406,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8391 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? 8406 bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)?
8392 byte loop = 0; 8407 byte loop = 0;
8393 8408
8394 LandData landData = landObject.landData; 8409 LandData landData = landObject.LandData;
8395 string url = landData.MediaURL; 8410 string url = landData.MediaURL;
8396 string texture = landData.MediaID.ToString(); 8411 string texture = landData.MediaID.ToString();
8397 bool autoAlign = landData.MediaAutoScale != 0; 8412 bool autoAlign = landData.MediaAutoScale != 0;
@@ -8820,7 +8835,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8820 { 8835 {
8821 m_host.AddScriptLPS(1); 8836 m_host.AddScriptLPS(1);
8822 UUID key; 8837 UUID key;
8823 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8838 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8824 if (land.OwnerID == m_host.OwnerID) 8839 if (land.OwnerID == m_host.OwnerID)
8825 { 8840 {
8826 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 8841 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
@@ -8839,7 +8854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8839 { 8854 {
8840 m_host.AddScriptLPS(1); 8855 m_host.AddScriptLPS(1);
8841 UUID key; 8856 UUID key;
8842 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8857 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8843 if (land.OwnerID == m_host.OwnerID) 8858 if (land.OwnerID == m_host.OwnerID)
8844 { 8859 {
8845 if (UUID.TryParse(avatar, out key)) 8860 if (UUID.TryParse(avatar, out key))
@@ -8861,7 +8876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8861 { 8876 {
8862 m_host.AddScriptLPS(1); 8877 m_host.AddScriptLPS(1);
8863 UUID key; 8878 UUID key;
8864 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 8879 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
8865 if (land.OwnerID == m_host.OwnerID) 8880 if (land.OwnerID == m_host.OwnerID)
8866 { 8881 {
8867 if (UUID.TryParse(avatar, out key)) 8882 if (UUID.TryParse(avatar, out key))
@@ -9006,7 +9021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9006 public LSL_Integer llGetParcelFlags(LSL_Vector pos) 9021 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
9007 { 9022 {
9008 m_host.AddScriptLPS(1); 9023 m_host.AddScriptLPS(1);
9009 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; 9024 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags;
9010 } 9025 }
9011 9026
9012 public LSL_Integer llGetRegionFlags() 9027 public LSL_Integer llGetRegionFlags()
@@ -9113,19 +9128,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9113 } 9128 }
9114 9129
9115 9130
9116 public void llHTTPResponse(string url, int status, string body) 9131 public void llHTTPResponse(LSL_Key id, int status, string body)
9117 { 9132 {
9118 // Partial implementation: support for parameter flags needed 9133 // Partial implementation: support for parameter flags needed
9119 // see http://wiki.secondlife.com/wiki/llHTTPResponse 9134 // see http://wiki.secondlife.com/wiki/llHTTPResponse
9120 9135
9121 m_host.AddScriptLPS(1); 9136 m_host.AddScriptLPS(1);
9122 NotImplemented("llHTTPResponse"); 9137
9138 if (m_UrlModule != null)
9139 m_UrlModule.HttpResponse(new UUID(id), status,body);
9123 } 9140 }
9124 9141
9125 public void llResetLandBanList() 9142 public void llResetLandBanList()
9126 { 9143 {
9127 m_host.AddScriptLPS(1); 9144 m_host.AddScriptLPS(1);
9128 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 9145 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
9129 if (land.OwnerID == m_host.OwnerID) 9146 if (land.OwnerID == m_host.OwnerID)
9130 { 9147 {
9131 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 9148 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@@ -9142,7 +9159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9142 public void llResetLandPassList() 9159 public void llResetLandPassList()
9143 { 9160 {
9144 m_host.AddScriptLPS(1); 9161 m_host.AddScriptLPS(1);
9145 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 9162 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData;
9146 if (land.OwnerID == m_host.OwnerID) 9163 if (land.OwnerID == m_host.OwnerID)
9147 { 9164 {
9148 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 9165 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
@@ -9226,7 +9243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9226 LSL_List ret = new LSL_List(); 9243 LSL_List ret = new LSL_List();
9227 if (land != null) 9244 if (land != null)
9228 { 9245 {
9229 foreach (KeyValuePair<UUID, int> detectedParams in land.getLandObjectOwners()) 9246 foreach (KeyValuePair<UUID, int> detectedParams in land.GetLandObjectOwners())
9230 { 9247 {
9231 ret.Add(detectedParams.Key.ToString()); 9248 ret.Add(detectedParams.Key.ToString());
9232 ret.Add(detectedParams.Value); 9249 ret.Add(detectedParams.Value);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 726b37a..59525b6 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;
@@ -591,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
591 // agent must be over owners land to avoid abuse 593 // agent must be over owners land to avoid abuse
592 if (m_host.OwnerID 594 if (m_host.OwnerID
593 == World.LandChannel.GetLandObject( 595 == World.LandChannel.GetLandObject(
594 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 596 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
595 { 597 {
596 598
597 // Check for hostname , attempt to make a hglink 599 // Check for hostname , attempt to make a hglink
@@ -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();
@@ -642,7 +647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
642 // agent must be over owners land to avoid abuse 647 // agent must be over owners land to avoid abuse
643 if (m_host.OwnerID 648 if (m_host.OwnerID
644 == World.LandChannel.GetLandObject( 649 == World.LandChannel.GetLandObject(
645 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 650 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
646 { 651 {
647 presence.ControllingClient.SendTeleportLocationStart(); 652 presence.ControllingClient.SendTeleportLocationStart();
648 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, 653 World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
@@ -1159,11 +1164,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1159 ILandObject land 1164 ILandObject land
1160 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1161 1166
1162 if (land.landData.OwnerID != m_host.ObjectOwner) 1167 if (land.LandData.OwnerID != m_host.ObjectOwner)
1163 return; 1168 return;
1164 1169
1165 land.SetMediaUrl(url); 1170 land.SetMediaUrl(url);
1166 } 1171 }
1172
1173 public void osSetParcelSIPAddress(string SIPAddress)
1174 {
1175 // What actually is the difference to the LL function?
1176 //
1177 CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL");
1178
1179 m_host.AddScriptLPS(1);
1180
1181
1182 ILandObject land
1183 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1184
1185 if (land.LandData.OwnerID != m_host.ObjectOwner)
1186 {
1187 OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function");
1188 return;
1189 }
1190
1191 // get the voice module
1192 IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>();
1193
1194 if (voiceModule != null)
1195 voiceModule.setLandSIPAddress(SIPAddress,land.LandData.GlobalID);
1196 else
1197 OSSLError("osSetParcelSIPAddress: No voice module enabled for this land");
1198
1199
1200 }
1167 1201
1168 public string osGetScriptEngineName() 1202 public string osGetScriptEngineName()
1169 { 1203 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 41358e5..a74e8da 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -201,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
201 void llGroundRepel(double height, int water, double tau); 201 void llGroundRepel(double height, int water, double tau);
202 LSL_Vector llGroundSlope(LSL_Vector offset); 202 LSL_Vector llGroundSlope(LSL_Vector offset);
203 LSL_String llHTTPRequest(string url, LSL_List parameters, string body); 203 LSL_String llHTTPRequest(string url, LSL_List parameters, string body);
204 void llHTTPResponse(string url, int status, string body); 204 void llHTTPResponse(LSL_Key id, int status, string body);
205 LSL_String llInsertString(string dst, int position, string src); 205 LSL_String llInsertString(string dst, int position, string src);
206 void llInstantMessage(string user, string message); 206 void llInstantMessage(string user, string message);
207 LSL_String llIntegerToBase64(int number); 207 LSL_String llIntegerToBase64(int number);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 49aa45a..d8d3c31 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
75 bool osConsoleCommand(string Command); 75 bool osConsoleCommand(string Command);
76 void osSetParcelMediaURL(string url); 76 void osSetParcelMediaURL(string url);
77 void osSetPrimFloatOnWater(int floatYN); 77 void osSetPrimFloatOnWater(int floatYN);
78 void osSetParcelSIPAddress(string SIPAddress);
78 79
79 // Avatar Info Commands 80 // Avatar Info Commands
80 string osGetAgentIP(string agent); 81 string osGetAgentIP(string agent);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 02ae281..a28e97b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -864,9 +864,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
864 return m_LSL_Functions.llHTTPRequest(url, parameters, body); 864 return m_LSL_Functions.llHTTPRequest(url, parameters, body);
865 } 865 }
866 866
867 public void llHTTPResponse(string url, int status, string body) 867 public void llHTTPResponse(LSL_Key id, int status, string body)
868 { 868 {
869 m_LSL_Functions.llHTTPResponse(url, status, body); 869 m_LSL_Functions.llHTTPResponse(id, status, body);
870 } 870 }
871 871
872 public LSL_String llInsertString(string dst, int position, string src) 872 public LSL_String llInsertString(string dst, int position, string src)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 8f52d99..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);
@@ -183,6 +183,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
183 { 183 {
184 m_OSSL_Functions.osSetParcelMediaURL(url); 184 m_OSSL_Functions.osSetParcelMediaURL(url);
185 } 185 }
186
187 public void osSetParcelSIPAddress(string SIPAddress)
188 {
189 m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
190 }
186 191
187 public void osSetPrimFloatOnWater(int floatYN) 192 public void osSetPrimFloatOnWater(int floatYN)
188 { 193 {
@@ -324,7 +329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
324 329
325 public string osGetSimulatorVersion() 330 public string osGetSimulatorVersion()
326 { 331 {
327 return m_OSSL_Functions.osGetSimulatorVersion(); 332 return m_OSSL_Functions.osGetSimulatorVersion();
328 } 333 }
329 334
330 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 cb5664b..fe26429 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -542,23 +542,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
542 break; 542 break;
543 case enumCompileType.cs: 543 case enumCompileType.cs:
544 case enumCompileType.lsl: 544 case enumCompileType.lsl:
545 lock (CScodeProvider) 545 bool complete = false;
546 bool retried = false;
547 do
546 { 548 {
547 results = CScodeProvider.CompileAssemblyFromSource( 549 lock (CScodeProvider)
550 {
551 results = CScodeProvider.CompileAssemblyFromSource(
548 parameters, Script); 552 parameters, Script);
549 } 553 }
554 // Deal with an occasional segv in the compiler.
555 // Rarely, if ever, occurs twice in succession.
556 // Line # == 0 and no file name are indications that
557 // this is a native stack trace rather than a normal
558 // error log.
559 if (results.Errors.Count > 0)
560 {
561 if (!retried && (results.Errors[0].FileName == null || results.Errors[0].FileName == String.Empty) &&
562 results.Errors[0].Line == 0)
563 {
564 // System.Console.WriteLine("retrying failed compilation");
565 retried = true;
566 }
567 else
568 {
569 complete = true;
570 }
571 }
572 else
573 {
574 complete = true;
575 }
576 } while (!complete);
550 break; 577 break;
551 case enumCompileType.js: 578 case enumCompileType.js:
552 results = JScodeProvider.CompileAssemblyFromSource( 579 results = JScodeProvider.CompileAssemblyFromSource(
553 parameters, Script); 580 parameters, Script);
554 break; 581 break;
555 case enumCompileType.yp: 582 case enumCompileType.yp:
556 results = YPcodeProvider.CompileAssemblyFromSource( 583 results = YPcodeProvider.CompileAssemblyFromSource(
557 parameters, Script); 584 parameters, Script);
558 break; 585 break;
559 default: 586 default:
560 throw new Exception("Compiler is not able to recongnize "+ 587 throw new Exception("Compiler is not able to recongnize "+
561 "language type \"" + lang.ToString() + "\""); 588 "language type \"" + lang.ToString() + "\"");
562 } 589 }
563 590
564 // Check result 591 // Check result
@@ -567,56 +594,62 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
567 // 594 //
568 // WARNINGS AND ERRORS 595 // WARNINGS AND ERRORS
569 // 596 //
570 int display = 5; 597 bool hadErrors = false;
598 string errtext = String.Empty;
599
571 if (results.Errors.Count > 0) 600 if (results.Errors.Count > 0)
572 { 601 {
573 string errtext = String.Empty;
574 foreach (CompilerError CompErr in results.Errors) 602 foreach (CompilerError CompErr in results.Errors)
575 { 603 {
576 // Show 5 errors max 604 string severity = CompErr.IsWarning ? "Warning" : "Error";
577 //
578 if (display <= 0)
579 break;
580 display--;
581
582 string severity = "Error";
583 if (CompErr.IsWarning)
584 {
585 severity = "Warning";
586 }
587 605
588 KeyValuePair<int, int> lslPos; 606 KeyValuePair<int, int> lslPos;
589 607
590 lslPos = FindErrorPosition(CompErr.Line, CompErr.Column); 608 // Show 5 errors max, but check entire list for errors
591 609
592 string text = CompErr.ErrorText; 610 if (severity == "Error")
611 {
612 lslPos = FindErrorPosition(CompErr.Line, CompErr.Column);
613 string text = CompErr.ErrorText;
614
615 // Use LSL type names
616 if (lang == enumCompileType.lsl)
617 text = ReplaceTypes(CompErr.ErrorText);
618
619 // The Second Life viewer's script editor begins
620 // countingn lines and columns at 0, so we subtract 1.
621 errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n",
622 lslPos.Key - 1, lslPos.Value - 1,
623 CompErr.ErrorNumber, text, severity);
624 hadErrors = true;
625 }
626 }
627 }
628
629 if (hadErrors)
630 {
631 throw new Exception(errtext);
632 }
593 633
594 // Use LSL type names 634 // On today's highly asynchronous systems, the result of
595 if (lang == enumCompileType.lsl) 635 // the compile may not be immediately apparent. Wait a
596 text = ReplaceTypes(CompErr.ErrorText); 636 // reasonable amount of time before giving up on it.
597 637
598 // The Second Life viewer's script editor begins 638 if (!File.Exists(OutFile))
599 // countingn lines and columns at 0, so we subtract 1. 639 {
600 errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", 640 for (int i=0; i<20 && !File.Exists(OutFile); i++)
601 lslPos.Key - 1, lslPos.Value - 1, 641 {
602 CompErr.ErrorNumber, text, severity); 642 System.Threading.Thread.Sleep(250);
603 } 643 }
604 644 // One final chance...
605 if (!File.Exists(OutFile)) 645 if (!File.Exists(OutFile))
606 { 646 {
647 errtext = String.Empty;
648 errtext += "No compile error. But not able to locate compiled file.";
607 throw new Exception(errtext); 649 throw new Exception(errtext);
608 } 650 }
609 } 651 }
610 652
611 //
612 // NO ERRORS, BUT NO COMPILED FILE
613 //
614 if (!File.Exists(OutFile))
615 {
616 string errtext = String.Empty;
617 errtext += "No compile error. But not able to locate compiled file.";
618 throw new Exception(errtext);
619 }
620// m_log.DebugFormat("[Compiler] Compiled new assembly "+ 653// m_log.DebugFormat("[Compiler] Compiled new assembly "+
621// "for {0}", asset); 654// "for {0}", asset);
622 655
@@ -629,7 +662,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
629 662
630 if (fi == null) 663 if (fi == null)
631 { 664 {
632 string errtext = String.Empty; 665 errtext = String.Empty;
633 errtext += "No compile error. But not able to stat file."; 666 errtext += "No compile error. But not able to stat file.";
634 throw new Exception(errtext); 667 throw new Exception(errtext);
635 } 668 }
@@ -644,7 +677,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
644 } 677 }
645 catch (Exception) 678 catch (Exception)
646 { 679 {
647 string errtext = String.Empty; 680 errtext = String.Empty;
648 errtext += "No compile error. But not able to open file."; 681 errtext += "No compile error. But not able to open file.";
649 throw new Exception(errtext); 682 throw new Exception(errtext);
650 } 683 }
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.