aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/DataSnapshot/DataRequestHandler.cs2
-rw-r--r--OpenSim/Region/DataSnapshot/LLSDDiscovery.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs110
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs284
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs112
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs6
-rw-r--r--OpenSim/Region/Interfaces/IEventQueue.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs13
16 files changed, 319 insertions, 297 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index aa3cd85..4a4dcd8 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3889,7 +3889,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3889 { 3889 {
3890 uint regionX; 3890 uint regionX;
3891 uint regionY; 3891 uint regionY;
3892 Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); 3892 Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
3893 locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX; 3893 locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX;
3894 locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY; 3894 locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY;
3895 locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter)); 3895 locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
@@ -7174,7 +7174,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7174 Transfer.TransferInfo.Params = new byte[20]; 7174 Transfer.TransferInfo.Params = new byte[20];
7175 Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); 7175 Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
7176 int assType = req.AssetInf.Type; 7176 int assType = req.AssetInf.Type;
7177 Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); 7177 Array.Copy(Utils.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
7178 } 7178 }
7179 else if (req.AssetRequestSource == 3) 7179 else if (req.AssetRequestSource == 3)
7180 { 7180 {
diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
index 8030b59..878aa4b 100644
--- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
+++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.DataSnapshot
77 { 77 {
78 //Very static for now, flexible enough to add new formats 78 //Very static for now, flexible enough to add new formats
79 LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse(); 79 LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse();
80 llsd_response.snapshot_resources = new LLSDArray(); 80 llsd_response.snapshot_resources = new OSDArray();
81 81
82 LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL(); 82 LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL();
83 llsd_dataurl.snapshot_format = "os-datasnapshot-v1"; 83 llsd_dataurl.snapshot_format = "os-datasnapshot-v1";
diff --git a/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs b/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs
index e1d7ac3..73e41ee 100644
--- a/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs
+++ b/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs
@@ -30,13 +30,13 @@ using OpenSim.Framework.Communications.Capabilities;
30 30
31namespace OpenSim.Region.DataSnapshot 31namespace OpenSim.Region.DataSnapshot
32{ 32{
33 [LLSDMap] 33 [OSDMap]
34 public class LLSDDiscoveryResponse 34 public class LLSDDiscoveryResponse
35 { 35 {
36 public LLSDArray snapshot_resources; 36 public OSDArray snapshot_resources;
37 } 37 }
38 38
39 [LLSDMap] 39 [OSDMap]
40 public class LLSDDiscoveryDataURL 40 public class LLSDDiscoveryDataURL
41 { 41 {
42 public string snapshot_format; 42 public string snapshot_format;
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
index 2f9a691..5b6c2a6 100644
--- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
174 { 174 {
175 // for now (testing) we only support files under 1000 bytes 175 // for now (testing) we only support files under 1000 bytes
176 byte[] transferData = new byte[Data.Length + 4]; 176 byte[] transferData = new byte[Data.Length + 4];
177 Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); 177 Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
178 Array.Copy(Data, 0, transferData, 4, Data.Length); 178 Array.Copy(Data, 0, transferData, 4, Data.Length);
179 Client.SendXferPacket(XferID, 0 + 0x80000000, transferData); 179 Client.SendXferPacket(XferID, 0 + 0x80000000, transferData);
180 180
@@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
183 else 183 else
184 { 184 {
185 byte[] transferData = new byte[1000 + 4]; 185 byte[] transferData = new byte[1000 + 4];
186 Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); 186 Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
187 Array.Copy(Data, 0, transferData, 4, 1000); 187 Array.Copy(Data, 0, transferData, 4, 1000);
188 Client.SendXferPacket(XferID, 0, transferData); 188 Client.SendXferPacket(XferID, 0, transferData);
189 Packet++; 189 Packet++;
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
index c532ac0..3fc8005 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
@@ -44,18 +44,18 @@ using OpenSim.Region.Environment.Interfaces;
44using OpenSim.Region.Interfaces; 44using OpenSim.Region.Interfaces;
45using OpenSim.Region.Environment.Scenes; 45using OpenSim.Region.Environment.Scenes;
46 46
47using LLSD = OpenMetaverse.StructuredData.LLSD; 47using OSD = OpenMetaverse.StructuredData.OSD;
48using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; 48using OSDMap = OpenMetaverse.StructuredData.OSDMap;
49using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; 49using OSDArray = OpenMetaverse.StructuredData.OSDArray;
50using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 50using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
51using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.LLSD>; 51using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.OSD>;
52 52
53namespace OpenSim.Region.Environment.Modules.Framework 53namespace OpenSim.Region.Environment.Modules.Framework
54{ 54{
55 public struct QueueItem 55 public struct QueueItem
56 { 56 {
57 public int id; 57 public int id;
58 public LLSDMap body; 58 public OSDMap body;
59 } 59 }
60 60
61 public class EventQueueGetModule : IEventQueue, IRegionModule 61 public class EventQueueGetModule : IEventQueue, IRegionModule
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
146 146
147 147
148 #region IEventQueue Members 148 #region IEventQueue Members
149 public bool Enqueue(LLSD ev, UUID avatarID) 149 public bool Enqueue(OSD ev, UUID avatarID)
150 { 150 {
151 m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); 151 m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
152 try 152 try
@@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
308// } 308// }
309 309
310 BlockingLLSDQueue queue = GetQueue(agentID); 310 BlockingLLSDQueue queue = GetQueue(agentID);
311 LLSD element = queue.Dequeue(15000); // 15s timeout 311 OSD element = queue.Dequeue(15000); // 15s timeout
312 312
313 Hashtable responsedata = new Hashtable(); 313 Hashtable responsedata = new Hashtable();
314 314
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
337 337
338 338
339 339
340 LLSDArray array = new LLSDArray(); 340 OSDArray array = new OSDArray();
341 if (element == null) // didn't have an event in 15s 341 if (element == null) // didn't have an event in 15s
342 { 342 {
343 // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! 343 // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
@@ -354,10 +354,10 @@ namespace OpenSim.Region.Environment.Modules.Framework
354 } 354 }
355 } 355 }
356 356
357 LLSDMap events = new LLSDMap(); 357 OSDMap events = new OSDMap();
358 events.Add("events", array); 358 events.Add("events", array);
359 359
360 events.Add("id", new LLSDInteger(thisID)); 360 events.Add("id", new OSDInteger(thisID));
361 lock (m_ids) 361 lock (m_ids)
362 { 362 {
363 m_ids[agentID] = thisID + 1; 363 m_ids[agentID] = thisID + 1;
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
366 responsedata["int_response_code"] = 200; 366 responsedata["int_response_code"] = 200;
367 responsedata["content_type"] = "application/xml"; 367 responsedata["content_type"] = "application/xml";
368 responsedata["keepalive"] = false; 368 responsedata["keepalive"] = false;
369 responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); 369 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
370 m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); 370 m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
371 371
372 return responsedata; 372 return responsedata;
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
424 424
425 } 425 }
426 426
427 public LLSD EventQueueFallBack(string path, LLSD request, string endpoint) 427 public OSD EventQueueFallBack(string path, OSD request, string endpoint)
428 { 428 {
429 // This is a fallback element to keep the client from loosing EventQueueGet 429 // This is a fallback element to keep the client from loosing EventQueueGet
430 // Why does CAPS fail sometimes!? 430 // Why does CAPS fail sometimes!?
@@ -473,7 +473,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
473 thisID = m_ids[AvatarID]; 473 thisID = m_ids[AvatarID];
474 474
475 BlockingLLSDQueue queue = GetQueue(AvatarID); 475 BlockingLLSDQueue queue = GetQueue(AvatarID);
476 LLSDArray array = new LLSDArray(); 476 OSDArray array = new OSDArray();
477 LLSD element = queue.Dequeue(15000); // 15s timeout 477 LLSD element = queue.Dequeue(15000); // 15s timeout
478 if (element == null) 478 if (element == null)
479 { 479 {
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
489 thisID++; 489 thisID++;
490 } 490 }
491 } 491 }
492 LLSDMap events = new LLSDMap(); 492 OSDMap events = new OSDMap();
493 events.Add("events", array); 493 events.Add("events", array);
494 494
495 events.Add("id", new LLSDInteger(thisID)); 495 events.Add("id", new LLSDInteger(thisID));
@@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
512 { 512 {
513 //return new LLSD(); 513 //return new LLSD();
514 } 514 }
515 return new LLSDString("shutdown404!"); 515 return new OSDString("shutdown404!");
516 } 516 }
517 } 517 }
518} 518}
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs
index 0d0eed2..21be82a 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs
@@ -52,70 +52,70 @@ namespace OpenSim.Region.Environment
52 }; 52 };
53 } 53 }
54 54
55 public static LLSD buildEvent(string eventName, LLSD eventBody) 55 public static OSD buildEvent(string eventName, OSD eventBody)
56 { 56 {
57 LLSDMap llsdEvent = new LLSDMap(2); 57 OSDMap llsdEvent = new OSDMap(2);
58 llsdEvent.Add("message", new LLSDString(eventName)); 58 llsdEvent.Add("message", new OSDString(eventName));
59 llsdEvent.Add("body", eventBody); 59 llsdEvent.Add("body", eventBody);
60 60
61 return llsdEvent; 61 return llsdEvent;
62 } 62 }
63 63
64 public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint) 64 public static OSD EnableSimulator(ulong Handle, IPEndPoint endPoint)
65 { 65 {
66 LLSDMap llsdSimInfo = new LLSDMap(3); 66 OSDMap llsdSimInfo = new OSDMap(3);
67 67
68 llsdSimInfo.Add("Handle", new LLSDBinary(regionHandleToByteArray(Handle))); 68 llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle)));
69 llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes())); 69 llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes()));
70 llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port)); 70 llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port));
71 71
72 LLSDArray arr = new LLSDArray(1); 72 OSDArray arr = new OSDArray(1);
73 arr.Add(llsdSimInfo); 73 arr.Add(llsdSimInfo);
74 74
75 LLSDMap llsdBody = new LLSDMap(1); 75 OSDMap llsdBody = new OSDMap(1);
76 llsdBody.Add("SimulatorInfo", arr); 76 llsdBody.Add("SimulatorInfo", arr);
77 77
78 return buildEvent("EnableSimulator", llsdBody); 78 return buildEvent("EnableSimulator", llsdBody);
79 } 79 }
80 80
81 public static LLSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, 81 public static OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt,
82 IPEndPoint newRegionExternalEndPoint, 82 IPEndPoint newRegionExternalEndPoint,
83 string capsURL, UUID AgentID, UUID SessionID) 83 string capsURL, UUID AgentID, UUID SessionID)
84 { 84 {
85 LLSDArray LookAtArr = new LLSDArray(3); 85 OSDArray LookAtArr = new OSDArray(3);
86 LookAtArr.Add(LLSD.FromReal(lookAt.X)); 86 LookAtArr.Add(OSD.FromReal(lookAt.X));
87 LookAtArr.Add(LLSD.FromReal(lookAt.Y)); 87 LookAtArr.Add(OSD.FromReal(lookAt.Y));
88 LookAtArr.Add(LLSD.FromReal(lookAt.Z)); 88 LookAtArr.Add(OSD.FromReal(lookAt.Z));
89 89
90 LLSDArray PositionArr = new LLSDArray(3); 90 OSDArray PositionArr = new OSDArray(3);
91 PositionArr.Add(LLSD.FromReal(pos.X)); 91 PositionArr.Add(OSD.FromReal(pos.X));
92 PositionArr.Add(LLSD.FromReal(pos.Y)); 92 PositionArr.Add(OSD.FromReal(pos.Y));
93 PositionArr.Add(LLSD.FromReal(pos.Z)); 93 PositionArr.Add(OSD.FromReal(pos.Z));
94 94
95 LLSDMap InfoMap = new LLSDMap(2); 95 OSDMap InfoMap = new OSDMap(2);
96 InfoMap.Add("LookAt", LookAtArr); 96 InfoMap.Add("LookAt", LookAtArr);
97 InfoMap.Add("Position", PositionArr); 97 InfoMap.Add("Position", PositionArr);
98 98
99 LLSDArray InfoArr = new LLSDArray(1); 99 OSDArray InfoArr = new OSDArray(1);
100 InfoArr.Add(InfoMap); 100 InfoArr.Add(InfoMap);
101 101
102 LLSDMap AgentDataMap = new LLSDMap(2); 102 OSDMap AgentDataMap = new OSDMap(2);
103 AgentDataMap.Add("AgentID", LLSD.FromUUID(AgentID)); 103 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID));
104 AgentDataMap.Add("SessionID", LLSD.FromUUID(SessionID)); 104 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID));
105 105
106 LLSDArray AgentDataArr = new LLSDArray(1); 106 OSDArray AgentDataArr = new OSDArray(1);
107 AgentDataArr.Add(AgentDataMap); 107 AgentDataArr.Add(AgentDataMap);
108 108
109 LLSDMap RegionDataMap = new LLSDMap(4); 109 OSDMap RegionDataMap = new OSDMap(4);
110 RegionDataMap.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(Handle))); 110 RegionDataMap.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(Handle)));
111 RegionDataMap.Add("SeedCapability", LLSD.FromString(capsURL)); 111 RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL));
112 RegionDataMap.Add("SimIP", LLSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); 112 RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes()));
113 RegionDataMap.Add("SimPort", LLSD.FromInteger(newRegionExternalEndPoint.Port)); 113 RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port));
114 114
115 LLSDArray RegionDataArr = new LLSDArray(1); 115 OSDArray RegionDataArr = new OSDArray(1);
116 RegionDataArr.Add(RegionDataMap); 116 RegionDataArr.Add(RegionDataMap);
117 117
118 LLSDMap llsdBody = new LLSDMap(3); 118 OSDMap llsdBody = new OSDMap(3);
119 llsdBody.Add("Info", InfoArr); 119 llsdBody.Add("Info", InfoArr);
120 llsdBody.Add("AgentData", AgentDataArr); 120 llsdBody.Add("AgentData", AgentDataArr);
121 llsdBody.Add("RegionData", RegionDataArr); 121 llsdBody.Add("RegionData", RegionDataArr);
@@ -123,49 +123,49 @@ namespace OpenSim.Region.Environment
123 return buildEvent("CrossedRegion", llsdBody); 123 return buildEvent("CrossedRegion", llsdBody);
124 } 124 }
125 125
126 public static LLSD TeleportFinishEvent( 126 public static OSD TeleportFinishEvent(
127 ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, 127 ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
128 uint locationID, uint flags, string capsURL, UUID AgentID) 128 uint locationID, uint flags, string capsURL, UUID AgentID)
129 { 129 {
130 LLSDMap info = new LLSDMap(); 130 OSDMap info = new OSDMap();
131 info.Add("AgentID", LLSD.FromUUID(AgentID)); 131 info.Add("AgentID", OSD.FromUUID(AgentID));
132 info.Add("LocationID", LLSD.FromInteger(4)); // TODO what is this? 132 info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this?
133 info.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(regionHandle))); 133 info.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(regionHandle)));
134 info.Add("SeedCapability", LLSD.FromString(capsURL)); 134 info.Add("SeedCapability", OSD.FromString(capsURL));
135 info.Add("SimAccess", LLSD.FromInteger(simAccess)); 135 info.Add("SimAccess", OSD.FromInteger(simAccess));
136 info.Add("SimIP", LLSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); 136 info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
137 info.Add("SimPort", LLSD.FromInteger(regionExternalEndPoint.Port)); 137 info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port));
138 info.Add("TeleportFlags", LLSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation 138 info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
139 139
140 LLSDArray infoArr = new LLSDArray(); 140 OSDArray infoArr = new OSDArray();
141 infoArr.Add(info); 141 infoArr.Add(info);
142 142
143 LLSDMap body = new LLSDMap(); 143 OSDMap body = new OSDMap();
144 body.Add("Info", infoArr); 144 body.Add("Info", infoArr);
145 145
146 return buildEvent("TeleportFinish", body); 146 return buildEvent("TeleportFinish", body);
147 } 147 }
148 148
149 public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) 149 public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono)
150 { 150 {
151 LLSDMap script = new LLSDMap(); 151 OSDMap script = new OSDMap();
152 script.Add("ObjectID", LLSD.FromUUID(objectID)); 152 script.Add("ObjectID", OSD.FromUUID(objectID));
153 script.Add("ItemID", LLSD.FromUUID(itemID)); 153 script.Add("ItemID", OSD.FromUUID(itemID));
154 script.Add("Running", LLSD.FromBoolean(running)); 154 script.Add("Running", OSD.FromBoolean(running));
155 script.Add("Mono", LLSD.FromBoolean(mono)); 155 script.Add("Mono", OSD.FromBoolean(mono));
156 156
157 LLSDArray scriptArr = new LLSDArray(); 157 OSDArray scriptArr = new OSDArray();
158 scriptArr.Add(script); 158 scriptArr.Add(script);
159 159
160 LLSDMap body = new LLSDMap(); 160 OSDMap body = new OSDMap();
161 body.Add("Script", scriptArr); 161 body.Add("Script", scriptArr);
162 162
163 return buildEvent("ScriptRunningReply", body); 163 return buildEvent("ScriptRunningReply", body);
164 } 164 }
165 165
166 public static LLSD KeepAliveEvent() 166 public static OSD KeepAliveEvent()
167 { 167 {
168 return buildEvent("FAKEEVENT", new LLSDMap()); 168 return buildEvent("FAKEEVENT", new OSDMap());
169 } 169 }
170 } 170 }
171} 171}
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 5b06408..1c86c2f 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -46,9 +46,9 @@ using OpenSim.Framework.Servers;
46using OpenSim.Region.Environment.Interfaces; 46using OpenSim.Region.Environment.Interfaces;
47using OpenSim.Region.Environment.Scenes; 47using OpenSim.Region.Environment.Scenes;
48 48
49using LLSD = OpenMetaverse.StructuredData.LLSD; 49using OSD = OpenMetaverse.StructuredData.OSD;
50using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; 50using OSDMap = OpenMetaverse.StructuredData.OSDMap;
51using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; 51using OSDArray = OpenMetaverse.StructuredData.OSDArray;
52 52
53namespace OpenSim.Region.Environment.Modules.InterGrid 53namespace OpenSim.Region.Environment.Modules.InterGrid
54{ 54{
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
218 218
219 #endregion 219 #endregion
220 220
221 public LLSD ProcessRegionDomainSeed(string path, LLSD request, string endpoint) 221 public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint)
222 { 222 {
223 string[] pathSegments = path.Split('/'); 223 string[] pathSegments = path.Split('/');
224 224
@@ -234,11 +234,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
234 234
235 //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", 235 //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
236 // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]); 236 // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]);
237 //return new LLSDMap(); 237 //return new OSDMap();
238 238
239 } 239 }
240 240
241 public LLSD ProcessAgentDomainMessage(string path, LLSD request, string endpoint) 241 public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint)
242 { 242 {
243 // /agent/* 243 // /agent/*
244 244
@@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
288 //return null; 288 //return null;
289 } 289 }
290 290
291 private LLSD GenerateRezAvatarRequestMessage(string regionname) 291 private OSD GenerateRezAvatarRequestMessage(string regionname)
292 { 292 {
293 Scene region = null; 293 Scene region = null;
294 bool usedroot = false; 294 bool usedroot = false;
@@ -319,7 +319,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
319 319
320 RegionInfo reg = region.RegionInfo; 320 RegionInfo reg = region.RegionInfo;
321 321
322 LLSDMap responseMap = new LLSDMap(); 322 OSDMap responseMap = new OSDMap();
323 string rezHttpProtocol = "http://"; 323 string rezHttpProtocol = "http://";
324 //string regionCapsHttpProtocol = "http://"; 324 //string regionCapsHttpProtocol = "http://";
325 string httpaddr = reg.ExternalHostName; 325 string httpaddr = reg.ExternalHostName;
@@ -347,9 +347,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
347 httpaddr = httpsCN; 347 httpaddr = httpsCN;
348 } 348 }
349 349
350 responseMap["connect"] = LLSD.FromBoolean(true); 350 responseMap["connect"] = OSD.FromBoolean(true);
351 LLSDMap capabilitiesMap = new LLSDMap(); 351 OSDMap capabilitiesMap = new OSDMap();
352 capabilitiesMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); 352 capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath);
353 responseMap["capabilities"] = capabilitiesMap; 353 responseMap["capabilities"] = capabilitiesMap;
354 354
355 return responseMap; 355 return responseMap;
@@ -376,11 +376,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
376 } 376 }
377 377
378 378
379 public LLSD RequestRezAvatarMethod(string path, LLSD request) 379 public OSD RequestRezAvatarMethod(string path, OSD request)
380 { 380 {
381 //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString()); 381 //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
382 382
383 LLSDMap requestMap = (LLSDMap)request; 383 OSDMap requestMap = (OSDMap)request;
384 384
385 385
386 Scene homeScene = null; 386 Scene homeScene = null;
@@ -441,27 +441,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
441 441
442 UpdateOGPState(LocalAgentID, userState); 442 UpdateOGPState(LocalAgentID, userState);
443 443
444 LLSDMap responseMap = new LLSDMap(); 444 OSDMap responseMap = new OSDMap();
445 445
446 if (RemoteAgentID == UUID.Zero) 446 if (RemoteAgentID == UUID.Zero)
447 { 447 {
448 responseMap["connect"] = LLSD.FromBoolean(false); 448 responseMap["connect"] = OSD.FromBoolean(false);
449 responseMap["message"] = LLSD.FromString("No agent ID was specified in rez_avatar/request"); 449 responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request");
450 m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body"); 450 m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body");
451 return responseMap; 451 return responseMap;
452 } 452 }
453 453
454 responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName); 454 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);
455 455
456 // DEPRECIATED 456 // DEPRECIATED
457 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 457 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
458 458
459 responseMap["connect"] = LLSD.FromBoolean(true); 459 responseMap["connect"] = OSD.FromBoolean(true);
460 responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); 460 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
461 responseMap["region_x"] = LLSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX 461 responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX
462 responseMap["region_y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY 462 responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY
463 responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); 463 responseMap["region_id"] = OSD.FromUUID(reg.originRegionID);
464 responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); 464 responseMap["sim_access"] = OSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG");
465 465
466 // Generate a dummy agent for the user so we can get back a CAPS path 466 // Generate a dummy agent for the user so we can get back a CAPS path
467 AgentCircuitData agentData = new AgentCircuitData(); 467 AgentCircuitData agentData = new AgentCircuitData();
@@ -575,14 +575,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
575 575
576 576
577 // DEPRECIATED 577 // DEPRECIATED
578 responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 578 responseMap["seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
579 579
580 // REPLACEMENT 580 // REPLACEMENT
581 responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 581 responseMap["region_seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
582 582
583 responseMap["rez_avatar"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 583 responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
584 responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 584 responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
585 responseMap["rez_avatar/derez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); 585 responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath);
586 586
587 // Add the user to the list of CAPS that are outstanding. 587 // Add the user to the list of CAPS that are outstanding.
588 // well allow the caps hosts in this dictionary 588 // well allow the caps hosts in this dictionary
@@ -605,27 +605,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
605 return responseMap; 605 return responseMap;
606 } 606 }
607 607
608 public LLSD RezAvatarMethod(string path, LLSD request) 608 public OSD RezAvatarMethod(string path, OSD request)
609 { 609 {
610 m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); 610 m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString());
611 611
612 LLSDMap responseMap = new LLSDMap(); 612 OSDMap responseMap = new OSDMap();
613 613
614 AgentCircuitData userData = null; 614 AgentCircuitData userData = null;
615 615
616 // Only people we've issued a cap can go further 616 // Only people we've issued a cap can go further
617 if (TryGetAgentCircuitData(path,out userData)) 617 if (TryGetAgentCircuitData(path,out userData))
618 { 618 {
619 LLSDMap requestMap = (LLSDMap)request; 619 OSDMap requestMap = (OSDMap)request;
620 620
621 // take these values to start. There's a few more 621 // take these values to start. There's a few more
622 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); 622 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
623 UUID SessionID = requestMap["session_id"].AsUUID(); 623 UUID SessionID = requestMap["session_id"].AsUUID();
624 int circuitcode = requestMap["circuit_code"].AsInteger(); 624 int circuitcode = requestMap["circuit_code"].AsInteger();
625 LLSDArray Parameter = new LLSDArray(); 625 OSDArray Parameter = new OSDArray();
626 if (requestMap.ContainsKey("parameter")) 626 if (requestMap.ContainsKey("parameter"))
627 { 627 {
628 Parameter = (LLSDArray)((LLSD)requestMap["parameter"]); 628 Parameter = (OSDArray)requestMap["parameter"];
629 } 629 }
630 630
631 //int version = 1; 631 //int version = 1;
@@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
636 636
637 for (int i = 0; i < Parameter.Count; i++) 637 for (int i = 0; i < Parameter.Count; i++)
638 { 638 {
639 LLSDMap item = (LLSDMap)Parameter[i]; 639 OSDMap item = (OSDMap)Parameter[i];
640// if (item.ContainsKey("version")) 640// if (item.ContainsKey("version"))
641// { 641// {
642// version = item["version"].AsInteger(); 642// version = item["version"].AsInteger();
@@ -714,15 +714,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
714 RegionInfo reg = homeScene.RegionInfo; 714 RegionInfo reg = homeScene.RegionInfo;
715 715
716 // Dummy positional and look at info.. we don't have it. 716 // Dummy positional and look at info.. we don't have it.
717 LLSDArray PositionArray = new LLSDArray(); 717 OSDArray PositionArray = new OSDArray();
718 PositionArray.Add(LLSD.FromInteger(128)); 718 PositionArray.Add(OSD.FromInteger(128));
719 PositionArray.Add(LLSD.FromInteger(128)); 719 PositionArray.Add(OSD.FromInteger(128));
720 PositionArray.Add(LLSD.FromInteger(40)); 720 PositionArray.Add(OSD.FromInteger(40));
721 721
722 LLSDArray LookAtArray = new LLSDArray(); 722 OSDArray LookAtArray = new OSDArray();
723 LookAtArray.Add(LLSD.FromInteger(1)); 723 LookAtArray.Add(OSD.FromInteger(1));
724 LookAtArray.Add(LLSD.FromInteger(1)); 724 LookAtArray.Add(OSD.FromInteger(1));
725 LookAtArray.Add(LLSD.FromInteger(1)); 725 LookAtArray.Add(OSD.FromInteger(1));
726 726
727 // Our region's X and Y position in OpenSimulator space. 727 // Our region's X and Y position in OpenSimulator space.
728 uint fooX = reg.RegionLocX; 728 uint fooX = reg.RegionLocX;
@@ -732,31 +732,31 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
732 m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID); 732 m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID);
733 733
734 // Convert the X and Y position to LL space 734 // Convert the X and Y position to LL space
735 responseMap["region_x"] = LLSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X 735 responseMap["region_x"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X
736 responseMap["region_y"] = LLSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y 736 responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y
737 737
738 // Give em a new seed capability 738 // Give em a new seed capability
739 responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 739 responseMap["seed_capability"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
740 responseMap["region"] = LLSD.FromUUID(reg.originRegionID); 740 responseMap["region"] = OSD.FromUUID(reg.originRegionID);
741 responseMap["look_at"] = LookAtArray; 741 responseMap["look_at"] = LookAtArray;
742 742
743 responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); 743 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
744 responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); 744 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString());
745 745
746 // DEPRECIATED 746 // DEPRECIATED
747 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 747 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
748 748
749 responseMap["session_id"] = LLSD.FromUUID(SessionID); 749 responseMap["session_id"] = OSD.FromUUID(SessionID);
750 responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID); 750 responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID);
751 responseMap["circuit_code"] = LLSD.FromInteger(circuitcode); 751 responseMap["circuit_code"] = OSD.FromInteger(circuitcode);
752 752
753 responseMap["position"] = PositionArray; 753 responseMap["position"] = PositionArray;
754 754
755 responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); 755 responseMap["region_id"] = OSD.FromUUID(reg.originRegionID);
756 756
757 responseMap["sim_access"] = LLSD.FromString("Mature"); 757 responseMap["sim_access"] = OSD.FromString("Mature");
758 758
759 responseMap["connect"] = LLSD.FromBoolean(true); 759 responseMap["connect"] = OSD.FromBoolean(true);
760 760
761 761
762 762
@@ -767,12 +767,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
767 return responseMap; 767 return responseMap;
768 } 768 }
769 769
770 public LLSD DerezAvatarMethod(string path, LLSD request) 770 public OSD DerezAvatarMethod(string path, OSD request)
771 { 771 {
772 m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); 772 m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
773 773
774 //LLSD llsdResponse = null; 774 //LLSD llsdResponse = null;
775 LLSDMap responseMap = new LLSDMap(); 775 OSDMap responseMap = new OSDMap();
776 776
777 string[] PathArray = path.Split('/'); 777 string[] PathArray = path.Split('/');
778 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); 778 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
@@ -790,34 +790,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
790 OGPState userState = GetOGPState(LocalID); 790 OGPState userState = GetOGPState(LocalID);
791 if (userState.agent_id != UUID.Zero) 791 if (userState.agent_id != UUID.Zero)
792 { 792 {
793 //LLSDMap outboundRequestMap = new LLSDMap(); 793 //OSDMap outboundRequestMap = new OSDMap();
794 LLSDMap inboundRequestMap = (LLSDMap)request; 794 OSDMap inboundRequestMap = (OSDMap)request;
795 string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); 795 string rezAvatarString = inboundRequestMap["rez_avatar"].AsString();
796 if (rezAvatarString.Length == 0) 796 if (rezAvatarString.Length == 0)
797 { 797 {
798 rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString(); 798 rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString();
799 } 799 }
800 LLSDArray LookAtArray = new LLSDArray(); 800 OSDArray LookAtArray = new OSDArray();
801 LookAtArray.Add(LLSD.FromInteger(1)); 801 LookAtArray.Add(OSD.FromInteger(1));
802 LookAtArray.Add(LLSD.FromInteger(1)); 802 LookAtArray.Add(OSD.FromInteger(1));
803 LookAtArray.Add(LLSD.FromInteger(1)); 803 LookAtArray.Add(OSD.FromInteger(1));
804 804
805 LLSDArray PositionArray = new LLSDArray(); 805 OSDArray PositionArray = new OSDArray();
806 PositionArray.Add(LLSD.FromInteger(128)); 806 PositionArray.Add(OSD.FromInteger(128));
807 PositionArray.Add(LLSD.FromInteger(128)); 807 PositionArray.Add(OSD.FromInteger(128));
808 PositionArray.Add(LLSD.FromInteger(40)); 808 PositionArray.Add(OSD.FromInteger(40));
809 809
810 LLSDArray lookArray = new LLSDArray(); 810 OSDArray lookArray = new OSDArray();
811 lookArray.Add(LLSD.FromInteger(128)); 811 lookArray.Add(OSD.FromInteger(128));
812 lookArray.Add(LLSD.FromInteger(128)); 812 lookArray.Add(OSD.FromInteger(128));
813 lookArray.Add(LLSD.FromInteger(40)); 813 lookArray.Add(OSD.FromInteger(40));
814 814
815 responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up 815 responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up
816 responseMap["look_at"] = LookAtArray; 816 responseMap["look_at"] = LookAtArray;
817 817
818 m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); 818 m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name);
819 819
820 LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); 820 OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState);
821 821
822 // If invoking it returned an error, parse and end 822 // If invoking it returned an error, parse and end
823 if (rezResponseMap.ContainsKey("connect")) 823 if (rezResponseMap.ContainsKey("connect"))
@@ -852,34 +852,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
852 int rrY = rezResponseMap["region_y"].AsInteger(); 852 int rrY = rezResponseMap["region_y"].AsInteger();
853 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); 853 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
854 UUID rrRID = rezResponseMap["region_id"].AsUUID(); 854 UUID rrRID = rezResponseMap["region_id"].AsUUID();
855 LLSDArray RezResponsePositionArray = null; 855 OSDArray RezResponsePositionArray = null;
856 string rrAccess = rezResponseMap["sim_access"].AsString(); 856 string rrAccess = rezResponseMap["sim_access"].AsString();
857 if (rezResponseMap.ContainsKey("position")) 857 if (rezResponseMap.ContainsKey("position"))
858 { 858 {
859 RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; 859 RezResponsePositionArray = (OSDArray)rezResponseMap["position"];
860 } 860 }
861 // DEPRECIATED 861 // DEPRECIATED
862 responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); 862 responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap);
863 863
864 // REPLACEMENT r3 864 // REPLACEMENT r3
865 responseMap["region_seed_capability"] = LLSD.FromString(rezRespSeedCap); 865 responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap);
866 866
867 // DEPRECIATED 867 // DEPRECIATED
868 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); 868 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
869 869
870 responseMap["sim_host"] = LLSD.FromString(rezRespSim_host); 870 responseMap["sim_host"] = OSD.FromString(rezRespSim_host);
871 responseMap["sim_port"] = LLSD.FromInteger(rrPort); 871 responseMap["sim_port"] = OSD.FromInteger(rrPort);
872 responseMap["region_x"] = LLSD.FromInteger(rrX ); 872 responseMap["region_x"] = OSD.FromInteger(rrX );
873 responseMap["region_y"] = LLSD.FromInteger(rrY ); 873 responseMap["region_y"] = OSD.FromInteger(rrY );
874 responseMap["region_id"] = LLSD.FromUUID(rrRID); 874 responseMap["region_id"] = OSD.FromUUID(rrRID);
875 responseMap["sim_access"] = LLSD.FromString(rrAccess); 875 responseMap["sim_access"] = OSD.FromString(rrAccess);
876 876
877 if (RezResponsePositionArray != null) 877 if (RezResponsePositionArray != null)
878 { 878 {
879 responseMap["position"] = RezResponsePositionArray; 879 responseMap["position"] = RezResponsePositionArray;
880 } 880 }
881 responseMap["look_at"] = lookArray; 881 responseMap["look_at"] = lookArray;
882 responseMap["connect"] = LLSD.FromBoolean(true); 882 responseMap["connect"] = OSD.FromBoolean(true);
883 883
884 ShutdownConnection(LocalID,this); 884 ShutdownConnection(LocalID,this);
885 // PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS 885 // PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS
@@ -899,7 +899,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
899 //return responseMap; 899 //return responseMap;
900 } 900 }
901 901
902 private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState) 902 private OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState)
903 { 903 {
904 Scene reg = GetRootScene(); 904 Scene reg = GetRootScene();
905 905
@@ -907,38 +907,38 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
907 DeRezRequest.Method = "POST"; 907 DeRezRequest.Method = "POST";
908 DeRezRequest.ContentType = "application/xml+llsd"; 908 DeRezRequest.ContentType = "application/xml+llsd";
909 909
910 LLSDMap RAMap = new LLSDMap(); 910 OSDMap RAMap = new OSDMap();
911 LLSDMap AgentParms = new LLSDMap(); 911 OSDMap AgentParms = new OSDMap();
912 LLSDMap RegionParms = new LLSDMap(); 912 OSDMap RegionParms = new OSDMap();
913 913
914 LLSDArray Parameter = new LLSDArray(2); 914 OSDArray Parameter = new OSDArray(2);
915 915
916 LLSDMap version = new LLSDMap(); 916 OSDMap version = new OSDMap();
917 version["version"] = LLSD.FromInteger(userState.src_version); 917 version["version"] = OSD.FromInteger(userState.src_version);
918 Parameter.Add((LLSD)version); 918 Parameter.Add(version);
919 919
920 LLSDMap SrcData = new LLSDMap(); 920 OSDMap SrcData = new OSDMap();
921 SrcData["estate_id"] = LLSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); 921 SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID);
922 SrcData["parent_estate_id"] = LLSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); 922 SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID));
923 SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID); 923 SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID);
924 SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent); 924 SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent);
925 Parameter.Add((LLSD)SrcData); 925 Parameter.Add(SrcData);
926 926
927 AgentParms["first_name"] = LLSD.FromString(userState.first_name); 927 AgentParms["first_name"] = OSD.FromString(userState.first_name);
928 AgentParms["last_name"] = LLSD.FromString(userState.last_name); 928 AgentParms["last_name"] = OSD.FromString(userState.last_name);
929 AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id); 929 AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id);
930 RegionParms["region_id"] = LLSD.FromUUID(userState.region_id); 930 RegionParms["region_id"] = OSD.FromUUID(userState.region_id);
931 AgentParms["circuit_code"] = LLSD.FromInteger(userState.circuit_code); 931 AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code);
932 AgentParms["secure_session_id"] = LLSD.FromUUID(userState.secure_session_id); 932 AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id);
933 AgentParms["session_id"] = LLSD.FromUUID(userState.session_id); 933 AgentParms["session_id"] = OSD.FromUUID(userState.session_id);
934 AgentParms["agent_access"] = LLSD.FromBoolean(userState.agent_access); 934 AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access);
935 AgentParms["god_level"] = LLSD.FromInteger(userState.god_level); 935 AgentParms["god_level"] = OSD.FromInteger(userState.god_level);
936 AgentParms["god_overide"] = LLSD.FromBoolean(userState.god_overide); 936 AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide);
937 AgentParms["identified"] = LLSD.FromBoolean(userState.identified); 937 AgentParms["identified"] = OSD.FromBoolean(userState.identified);
938 AgentParms["transacted"] = LLSD.FromBoolean(userState.transacted); 938 AgentParms["transacted"] = OSD.FromBoolean(userState.transacted);
939 AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified); 939 AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified);
940 AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate); 940 AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate);
941 AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host); 941 AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host);
942 942
943 // version 1 943 // version 1
944 RAMap = AgentParms; 944 RAMap = AgentParms;
@@ -951,11 +951,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
951 951
952 string RAMapString = RAMap.ToString(); 952 string RAMapString = RAMap.ToString();
953 m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString); 953 m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString);
954 LLSD LLSDofRAMap = RAMap; // RENAME if this works 954 OSD LLSDofRAMap = RAMap; // RENAME if this works
955 955
956 m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString()); 956 m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString());
957 //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap)); 957 //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap));
958 byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); 958 byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap);
959 959
960 //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer); 960 //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer);
961 //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump); 961 //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump);
@@ -973,7 +973,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
973 catch (WebException ex) 973 catch (WebException ex)
974 { 974 {
975 m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message); 975 m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message);
976 responseMap["connect"] = LLSD.FromBoolean(false); 976 responseMap["connect"] = OSD.FromBoolean(false);
977 977
978 return responseMap; 978 return responseMap;
979 } 979 }
@@ -997,21 +997,21 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
997 catch (WebException ex) 997 catch (WebException ex)
998 { 998 {
999 m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message); 999 m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message);
1000 responseMap["connect"] = LLSD.FromBoolean(false); 1000 responseMap["connect"] = OSD.FromBoolean(false);
1001 1001
1002 return responseMap; 1002 return responseMap;
1003 } 1003 }
1004 LLSD rezResponse = null; 1004 OSD rezResponse = null;
1005 try 1005 try
1006 { 1006 {
1007 rezResponse = LLSDParser.DeserializeXml(rez_avatar_reply); 1007 rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply);
1008 1008
1009 responseMap = (LLSDMap)rezResponse; 1009 responseMap = (OSDMap)rezResponse;
1010 } 1010 }
1011 catch (Exception ex) 1011 catch (Exception ex)
1012 { 1012 {
1013 m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); 1013 m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
1014 responseMap["connect"] = LLSD.FromBoolean(false); 1014 responseMap["connect"] = OSD.FromBoolean(false);
1015 1015
1016 return responseMap; 1016 return responseMap;
1017 } 1017 }
@@ -1019,22 +1019,22 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
1019 return responseMap; 1019 return responseMap;
1020 } 1020 }
1021 1021
1022 public LLSD GenerateNoHandlerMessage() 1022 public OSD GenerateNoHandlerMessage()
1023 { 1023 {
1024 LLSDMap map = new LLSDMap(); 1024 OSDMap map = new OSDMap();
1025 map["reason"] = LLSD.FromString("LLSDRequest"); 1025 map["reason"] = OSD.FromString("LLSDRequest");
1026 map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); 1026 map["message"] = OSD.FromString("No handler registered for LLSD Requests");
1027 map["login"] = LLSD.FromString("false"); 1027 map["login"] = OSD.FromString("false");
1028 map["connect"] = LLSD.FromString("false"); 1028 map["connect"] = OSD.FromString("false");
1029 return map; 1029 return map;
1030 } 1030 }
1031 public LLSD GenerateNoStateMessage(UUID passedAvatar) 1031 public OSD GenerateNoStateMessage(UUID passedAvatar)
1032 { 1032 {
1033 LLSDMap map = new LLSDMap(); 1033 OSDMap map = new OSDMap();
1034 map["reason"] = LLSD.FromString("derez failed"); 1034 map["reason"] = OSD.FromString("derez failed");
1035 map["message"] = LLSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); 1035 map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString());
1036 map["login"] = LLSD.FromString("false"); 1036 map["login"] = OSD.FromString("false");
1037 map["connect"] = LLSD.FromString("false"); 1037 map["connect"] = OSD.FromString("false");
1038 return map; 1038 return map;
1039 } 1039 }
1040 private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata) 1040 private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata)
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 27c7014..197d5c2 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
369 List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>(); 369 List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>();
370 foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) 370 foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
371 { 371 {
372 if (entry.Flags == (AccessList) flags) 372 if (entry.Flags == (AccessList)flags)
373 { 373 {
374 toRemove.Add(entry); 374 toRemove.Add(entry);
375 } 375 }
@@ -384,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
384 ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry(); 384 ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry();
385 temp.AgentID = entry.AgentID; 385 temp.AgentID = entry.AgentID;
386 temp.Time = new DateTime(); //Pointless? Yes. 386 temp.Time = new DateTime(); //Pointless? Yes.
387 temp.Flags = (AccessList) flags; 387 temp.Flags = (AccessList)flags;
388 388
389 if (!newData.ParcelAccessList.Contains(temp)) 389 if (!newData.ParcelAccessList.Contains(temp))
390 { 390 {
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index c51a314..8318cdc 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -48,9 +48,9 @@ using OpenSim.Region.Environment.Scenes;
48using OpenSim.Region.Environment.Types; 48using OpenSim.Region.Environment.Types;
49using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 49using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
50 50
51using LLSD = OpenMetaverse.StructuredData.LLSD; 51using OSD = OpenMetaverse.StructuredData.OSD;
52using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; 52using OSDMap = OpenMetaverse.StructuredData.OSDMap;
53using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; 53using OSDArray = OpenMetaverse.StructuredData.OSDArray;
54 54
55namespace OpenSim.Region.Environment.Modules.World.WorldMap 55namespace OpenSim.Region.Environment.Modules.World.WorldMap
56{ 56{
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
202 } 202 }
203 } 203 }
204 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); 204 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
205 mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); 205 mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
206 return mapResponse.ToString(); 206 return mapResponse.ToString();
207 } 207 }
208 208
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
215 { 215 {
216 m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName); 216 m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName);
217 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); 217 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
218 mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); 218 mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
219 return mapResponse; 219 return mapResponse;
220 } 220 }
221 221
@@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
223 /// 223 ///
224 /// </summary> 224 /// </summary>
225 /// <returns></returns> 225 /// <returns></returns>
226 protected static LLSDMapLayer GetLLSDMapLayerResponse() 226 protected static OSDMapLayer GetOSDMapLayerResponse()
227 { 227 {
228 LLSDMapLayer mapLayer = new LLSDMapLayer(); 228 OSDMapLayer mapLayer = new OSDMapLayer();
229 mapLayer.Right = 5000; 229 mapLayer.Right = 5000;
230 mapLayer.Top = 5000; 230 mapLayer.Top = 5000;
231 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006"); 231 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
321 } 321 }
322 uint xstart = 0; 322 uint xstart = 0;
323 uint ystart = 0; 323 uint ystart = 0;
324 Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); 324 Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
325 if (itemtype == 6) // we only sevice 6 right now (avatar green dots) 325 if (itemtype == 6) // we only sevice 6 right now (avatar green dots)
326 { 326 {
327 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) 327 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
@@ -407,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
407 407
408 if (dorequest) 408 if (dorequest)
409 { 409 {
410 LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); 410 OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
411 RequestMapItemsCompleted(response); 411 RequestMapItemsCompleted(response);
412 } 412 }
413 } 413 }
@@ -433,8 +433,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
433 /// <summary> 433 /// <summary>
434 /// Sends the mapitem response to the IClientAPI 434 /// Sends the mapitem response to the IClientAPI
435 /// </summary> 435 /// </summary>
436 /// <param name="response">The LLSDMap Response for the mapitem</param> 436 /// <param name="response">The OSDMap Response for the mapitem</param>
437 private void RequestMapItemsCompleted(LLSDMap response) 437 private void RequestMapItemsCompleted(OSDMap response)
438 { 438 {
439 UUID requestID = response["requestID"].AsUUID(); 439 UUID requestID = response["requestID"].AsUUID();
440 440
@@ -460,10 +460,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
460 if (response.ContainsKey(mrs.itemtype.ToString())) 460 if (response.ContainsKey(mrs.itemtype.ToString()))
461 { 461 {
462 List<mapItemReply> returnitems = new List<mapItemReply>(); 462 List<mapItemReply> returnitems = new List<mapItemReply>();
463 LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()]; 463 OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()];
464 for (int i = 0; i < itemarray.Count; i++) 464 for (int i = 0; i < itemarray.Count; i++)
465 { 465 {
466 LLSDMap mapitem = (LLSDMap)itemarray[i]; 466 OSDMap mapitem = (OSDMap)itemarray[i];
467 mapItemReply mi = new mapItemReply(); 467 mapItemReply mi = new mapItemReply();
468 mi.x = (uint)mapitem["X"].AsInteger(); 468 mi.x = (uint)mapitem["X"].AsInteger();
469 mi.y = (uint)mapitem["Y"].AsInteger(); 469 mi.y = (uint)mapitem["Y"].AsInteger();
@@ -517,7 +517,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
517 /// <param name="itemtype">passed in from packet</param> 517 /// <param name="itemtype">passed in from packet</param>
518 /// <param name="regionhandle">Region we're looking up</param> 518 /// <param name="regionhandle">Region we're looking up</param>
519 /// <returns></returns> 519 /// <returns></returns>
520 private LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, 520 private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
521 uint EstateID, bool godlike, uint itemtype, ulong regionhandle) 521 uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
522 { 522 {
523 bool blacklisted = false; 523 bool blacklisted = false;
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
528 } 528 }
529 529
530 if (blacklisted) 530 if (blacklisted)
531 return new LLSDMap(); 531 return new OSDMap();
532 532
533 UUID requestID = UUID.Random(); 533 UUID requestID = UUID.Random();
534 lock (m_cachedRegionMapItemsAddress) 534 lock (m_cachedRegionMapItemsAddress)
@@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
569 569
570 // Can't find the http server 570 // Can't find the http server
571 if (httpserver.Length == 0 || blacklisted) 571 if (httpserver.Length == 0 || blacklisted)
572 return new LLSDMap(); 572 return new OSDMap();
573 573
574 MapRequestState mrs = new MapRequestState(); 574 MapRequestState mrs = new MapRequestState();
575 mrs.agentID = id; 575 mrs.agentID = id;
@@ -585,14 +585,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
585 WebRequest mapitemsrequest = WebRequest.Create(httpserver); 585 WebRequest mapitemsrequest = WebRequest.Create(httpserver);
586 mapitemsrequest.Method = "POST"; 586 mapitemsrequest.Method = "POST";
587 mapitemsrequest.ContentType = "application/xml+llsd"; 587 mapitemsrequest.ContentType = "application/xml+llsd";
588 LLSDMap RAMap = new LLSDMap(); 588 OSDMap RAMap = new OSDMap();
589 589
590 // string RAMapString = RAMap.ToString(); 590 // string RAMapString = RAMap.ToString();
591 LLSD LLSDofRAMap = RAMap; // RENAME if this works 591 OSD LLSDofRAMap = RAMap; // RENAME if this works
592 592
593 byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); 593 byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap);
594 LLSDMap responseMap = new LLSDMap(); 594 OSDMap responseMap = new OSDMap();
595 responseMap["requestID"] = LLSD.FromUUID(requestID); 595 responseMap["requestID"] = OSD.FromUUID(requestID);
596 596
597 Stream os = null; 597 Stream os = null;
598 try 598 try
@@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
606 catch (WebException ex) 606 catch (WebException ex)
607 { 607 {
608 m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message); 608 m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message);
609 responseMap["connect"] = LLSD.FromBoolean(false); 609 responseMap["connect"] = OSD.FromBoolean(false);
610 lock (m_blacklistedurls) 610 lock (m_blacklistedurls)
611 { 611 {
612 if (!m_blacklistedurls.ContainsKey(httpserver)) 612 if (!m_blacklistedurls.ContainsKey(httpserver))
@@ -630,12 +630,12 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
630 } 630 }
631 else 631 else
632 { 632 {
633 return new LLSDMap(); 633 return new OSDMap();
634 } 634 }
635 } 635 }
636 catch (WebException) 636 catch (WebException)
637 { 637 {
638 responseMap["connect"] = LLSD.FromBoolean(false); 638 responseMap["connect"] = OSD.FromBoolean(false);
639 lock (m_blacklistedurls) 639 lock (m_blacklistedurls)
640 { 640 {
641 if (!m_blacklistedurls.ContainsKey(httpserver)) 641 if (!m_blacklistedurls.ContainsKey(httpserver))
@@ -646,18 +646,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
646 646
647 return responseMap; 647 return responseMap;
648 } 648 }
649 LLSD rezResponse = null; 649 OSD rezResponse = null;
650 try 650 try
651 { 651 {
652 rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply); 652 rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply);
653 653
654 responseMap = (LLSDMap)rezResponse; 654 responseMap = (OSDMap)rezResponse;
655 responseMap["requestID"] = LLSD.FromUUID(requestID); 655 responseMap["requestID"] = OSD.FromUUID(requestID);
656 } 656 }
657 catch (Exception) 657 catch (Exception)
658 { 658 {
659 //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); 659 //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
660 responseMap["connect"] = LLSD.FromBoolean(false); 660 responseMap["connect"] = OSD.FromBoolean(false);
661 661
662 return responseMap; 662 return responseMap;
663 } 663 }
@@ -793,57 +793,57 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
793 return null; 793 return null;
794 } 794 }
795 795
796 public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint) 796 public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint)
797 { 797 {
798 uint xstart = 0; 798 uint xstart = 0;
799 uint ystart = 0; 799 uint ystart = 0;
800 800
801 Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); 801 Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
802 802
803 LLSDMap responsemap = new LLSDMap(); 803 OSDMap responsemap = new OSDMap();
804 List<ScenePresence> avatars = m_scene.GetAvatars(); 804 List<ScenePresence> avatars = m_scene.GetAvatars();
805 LLSDArray responsearr = new LLSDArray(avatars.Count); 805 OSDArray responsearr = new OSDArray(avatars.Count);
806 LLSDMap responsemapdata = new LLSDMap(); 806 OSDMap responsemapdata = new OSDMap();
807 int tc = System.Environment.TickCount; 807 int tc = System.Environment.TickCount;
808 /* 808 /*
809 foreach (ScenePresence av in avatars) 809 foreach (ScenePresence av in avatars)
810 { 810 {
811 responsemapdata = new LLSDMap(); 811 responsemapdata = new OSDMap();
812 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); 812 responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
813 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); 813 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
814 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); 814 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
815 responsemapdata["Name"] = LLSD.FromString("TH"); 815 responsemapdata["Name"] = OSD.FromString("TH");
816 responsemapdata["Extra"] = LLSD.FromInteger(0); 816 responsemapdata["Extra"] = OSD.FromInteger(0);
817 responsemapdata["Extra2"] = LLSD.FromInteger(0); 817 responsemapdata["Extra2"] = OSD.FromInteger(0);
818 responsearr.Add(responsemapdata); 818 responsearr.Add(responsemapdata);
819 } 819 }
820 responsemap["1"] = responsearr; 820 responsemap["1"] = responsearr;
821 */ 821 */
822 if (avatars.Count == 0) 822 if (avatars.Count == 0)
823 { 823 {
824 responsemapdata = new LLSDMap(); 824 responsemapdata = new OSDMap();
825 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1)); 825 responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1));
826 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1)); 826 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1));
827 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); 827 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
828 responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); 828 responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
829 responsemapdata["Extra"] = LLSD.FromInteger(0); 829 responsemapdata["Extra"] = OSD.FromInteger(0);
830 responsemapdata["Extra2"] = LLSD.FromInteger(0); 830 responsemapdata["Extra2"] = OSD.FromInteger(0);
831 responsearr.Add(responsemapdata); 831 responsearr.Add(responsemapdata);
832 832
833 responsemap["6"] = responsearr; 833 responsemap["6"] = responsearr;
834 } 834 }
835 else 835 else
836 { 836 {
837 responsearr = new LLSDArray(avatars.Count); 837 responsearr = new OSDArray(avatars.Count);
838 foreach (ScenePresence av in avatars) 838 foreach (ScenePresence av in avatars)
839 { 839 {
840 responsemapdata = new LLSDMap(); 840 responsemapdata = new OSDMap();
841 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); 841 responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
842 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); 842 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
843 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); 843 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
844 responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); 844 responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
845 responsemapdata["Extra"] = LLSD.FromInteger(1); 845 responsemapdata["Extra"] = OSD.FromInteger(1);
846 responsemapdata["Extra2"] = LLSD.FromInteger(0); 846 responsemapdata["Extra2"] = OSD.FromInteger(0);
847 responsearr.Add(responsemapdata); 847 responsearr.Add(responsemapdata);
848 } 848 }
849 responsemap["6"] = responsearr; 849 responsemap["6"] = responsearr;
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 3948d31..8167c68 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -36,7 +36,7 @@ using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Communications; 37using OpenSim.Framework.Communications;
38using OpenSim.Region.Interfaces; 38using OpenSim.Region.Interfaces;
39using LLSD = OpenMetaverse.StructuredData.LLSD; 39using OSD = OpenMetaverse.StructuredData.OSD;
40 40
41namespace OpenSim.Region.Environment.Scenes 41namespace OpenSim.Region.Environment.Scenes
42{ 42{
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes
284 IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>(); 284 IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>();
285 if (eq != null) 285 if (eq != null)
286 { 286 {
287 LLSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint); 287 OSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint);
288 eq.Enqueue(Item, avatar.UUID); 288 eq.Enqueue(Item, avatar.UUID);
289 } 289 }
290 else 290 else
@@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Scenes
698 698
699 if (eq != null) 699 if (eq != null)
700 { 700 {
701 LLSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint, 701 OSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint,
702 4, teleportFlags, capsPath, avatar.UUID); 702 4, teleportFlags, capsPath, avatar.UUID);
703 eq.Enqueue(Item, avatar.UUID); 703 eq.Enqueue(Item, avatar.UUID);
704 } 704 }
@@ -748,7 +748,7 @@ namespace OpenSim.Region.Environment.Scenes
748 748
749 // and set the map-tile to '(Offline)' 749 // and set the map-tile to '(Offline)'
750 uint regX, regY; 750 uint regX, regY;
751 Helpers.LongToUInts(regionHandle, out regX, out regY); 751 Utils.LongToUInts(regionHandle, out regX, out regY);
752 752
753 MapBlockData block = new MapBlockData(); 753 MapBlockData block = new MapBlockData();
754 block.X = (ushort)(regX / Constants.RegionSize); 754 block.X = (ushort)(regX / Constants.RegionSize);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 073bccf..4209e4a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -562,11 +562,11 @@ namespace OpenSim.Region.Environment.Scenes
562 562
563 invString.AddPermissionsStart(); 563 invString.AddPermissionsStart();
564 564
565 invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask)); 565 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
566 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask)); 566 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
567 invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0)); 567 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0));
568 invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask)); 568 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
569 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextPermissions)); 569 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
570 570
571 invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); 571 invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
572 invString.AddNameValueLine("owner_id", ownerID.ToString()); 572 invString.AddNameValueLine("owner_id", ownerID.ToString());
@@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Scenes
579 invString.AddNameValueLine("asset_id", item.AssetID.ToString()); 579 invString.AddNameValueLine("asset_id", item.AssetID.ToString());
580 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); 580 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
581 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); 581 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
582 invString.AddNameValueLine("flags", Helpers.UIntToHexString(item.Flags)); 582 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
583 583
584 invString.AddSaleStart(); 584 invString.AddSaleStart();
585 invString.AddNameValueLine("sale_type", "not"); 585 invString.AddNameValueLine("sale_type", "not");
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index fa656f6..deb7f89 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1089,9 +1089,9 @@ if (m_shape != null) {
1089 data[pos] = (byte)pTexAnim.SizeX; pos++; 1089 data[pos] = (byte)pTexAnim.SizeX; pos++;
1090 data[pos] = (byte)pTexAnim.SizeY; pos++; 1090 data[pos] = (byte)pTexAnim.SizeY; pos++;
1091 1091
1092 Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); 1092 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
1093 Helpers.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); 1093 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
1094 Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); 1094 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
1095 1095
1096 m_TextureAnimation = data; 1096 m_TextureAnimation = data;
1097 } 1097 }
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 935c51b..3c51aa6 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -39,7 +39,7 @@ using OpenSim.Region.Environment.Interfaces;
39using OpenSim.Region.Environment.Types; 39using OpenSim.Region.Environment.Types;
40using OpenSim.Region.Interfaces; 40using OpenSim.Region.Interfaces;
41using OpenSim.Region.Physics.Manager; 41using OpenSim.Region.Physics.Manager;
42using LLSD = OpenMetaverse.StructuredData.LLSD; 42using OSD = OpenMetaverse.StructuredData.OSD;
43 43
44 44
45namespace OpenSim.Region.Environment.Scenes 45namespace OpenSim.Region.Environment.Scenes
@@ -2170,7 +2170,7 @@ namespace OpenSim.Region.Environment.Scenes
2170 } 2170 }
2171 2171
2172 Vector3 vel = m_velocity; 2172 Vector3 vel = m_velocity;
2173 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 2173 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
2174 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); 2174 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
2175 if (neighbourRegion != null && ValidateAttachments()) 2175 if (neighbourRegion != null && ValidateAttachments())
2176 { 2176 {
@@ -2208,7 +2208,7 @@ namespace OpenSim.Region.Environment.Scenes
2208 if (eq != null) 2208 if (eq != null)
2209 { 2209 {
2210 2210
2211 LLSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, 2211 OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
2212 capsPath, UUID, ControllingClient.SessionId); 2212 capsPath, UUID, ControllingClient.SessionId);
2213 eq.Enqueue(Item, UUID); 2213 eq.Enqueue(Item, UUID);
2214 } 2214 }
diff --git a/OpenSim/Region/Interfaces/IEventQueue.cs b/OpenSim/Region/Interfaces/IEventQueue.cs
index 42fdcae..5c327d9 100644
--- a/OpenSim/Region/Interfaces/IEventQueue.cs
+++ b/OpenSim/Region/Interfaces/IEventQueue.cs
@@ -36,6 +36,6 @@ namespace OpenSim.Region.Interfaces
36{ 36{
37 public interface IEventQueue 37 public interface IEventQueue
38 { 38 {
39 bool Enqueue(LLSD o, UUID avatarID); 39 bool Enqueue(OSD o, UUID avatarID);
40 } 40 }
41} 41}
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
index 9cdd006..7931cb2 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
@@ -29,6 +29,9 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Security;
33using System.Security.Policy;
34using System.Security.Permissions;
32using OpenSim.Region.ScriptEngine.Interfaces; 35using OpenSim.Region.ScriptEngine.Interfaces;
33using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 36using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
34 37
@@ -132,9 +135,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
132 ads.ConfigurationFile = 135 ads.ConfigurationFile =
133 AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; 136 AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
134 137
135
136 AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + 138 AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" +
137 AppDomainNameCount, null, ads); 139 AppDomainNameCount, null, ads);
140
141 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
142 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
143 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
144 PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
145 CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
146 sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
147 AD.SetAppDomainPolicy(sandboxPolicy);
148
138 m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + 149 m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName +
139 "]: AppDomain Loading: " + 150 "]: AppDomain Loading: " +
140 AssemblyName.GetAssemblyName( 151 AssemblyName.GetAssemblyName(
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index e5dfb2b..5d5e975 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -30,6 +30,7 @@ using System.IO;
30using System.Threading; 30using System.Threading;
31using System.Collections; 31using System.Collections;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Security;
33using System.Security.Policy; 34using System.Security.Policy;
34using System.Reflection; 35using System.Reflection;
35using System.Globalization; 36using System.Globalization;
@@ -536,11 +537,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine
536 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; 537 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence;
537 Evidence evidence = new Evidence(baseEvidence); 538 Evidence evidence = new Evidence(baseEvidence);
538 539
539 m_AppDomains[appDomain] = 540 AppDomain sandbox =
540 AppDomain.CreateDomain( 541 AppDomain.CreateDomain(
541 m_Scene.RegionInfo.RegionID.ToString(), 542 m_Scene.RegionInfo.RegionID.ToString(),
542 evidence, appSetup); 543 evidence, appSetup);
543 544
545 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
546 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
547 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
548 PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
549 CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
550 sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
551 sandbox.SetAppDomainPolicy(sandboxPolicy);
552
553 m_AppDomains[appDomain] = sandbox;
554
544 m_AppDomains[appDomain].AssemblyResolve += 555 m_AppDomains[appDomain].AssemblyResolve +=
545 new ResolveEventHandler( 556 new ResolveEventHandler(
546 AssemblyResolver.OnAssemblyResolve); 557 AssemblyResolver.OnAssemblyResolve);