aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-19 06:15:21 +0000
committerMelanie Thielker2008-11-19 06:15:21 +0000
commit3234472d6203671a492a73042a0b56d6301903e0 (patch)
tree2d4c6ef2b21ee24d315e27564b5426cdfe77e9b3 /OpenSim/Region
parentEnsure that the physics representation of a deleted object is also removed (diff)
downloadopensim-SC_OLD-3234472d6203671a492a73042a0b56d6301903e0.zip
opensim-SC_OLD-3234472d6203671a492a73042a0b56d6301903e0.tar.gz
opensim-SC_OLD-3234472d6203671a492a73042a0b56d6301903e0.tar.bz2
opensim-SC_OLD-3234472d6203671a492a73042a0b56d6301903e0.tar.xz
Reverting the texture sending patch and the new libOMV. This makes this
release a direct descendant of the stable 7364, with all the features and none of the issues. This omits the following patch chain: r7383 r7382 r7381 r7377 r7375 r7373 r7372 r7370 r7369 r7368 r7367 r7366
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/TextureDownload/TextureDownloadModule.cs58
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs9
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs307
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs1
-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/Scene.Inventory.cs1
-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.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs3
22 files changed, 430 insertions, 545 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 3265817..502fe6a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3890,7 +3890,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3890 { 3890 {
3891 uint regionX; 3891 uint regionX;
3892 uint regionY; 3892 uint regionY;
3893 Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); 3893 Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
3894 locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX; 3894 locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX;
3895 locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY; 3895 locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY;
3896 locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter)); 3896 locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
@@ -7175,7 +7175,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7175 Transfer.TransferInfo.Params = new byte[20]; 7175 Transfer.TransferInfo.Params = new byte[20];
7176 Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); 7176 Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
7177 int assType = req.AssetInf.Type; 7177 int assType = req.AssetInf.Type;
7178 Array.Copy(Utils.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); 7178 Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
7179 } 7179 }
7180 else if (req.AssetRequestSource == 3) 7180 else if (req.AssetRequestSource == 3)
7181 { 7181 {
diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
index 878aa4b..8030b59 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 OSDArray(); 80 llsd_response.snapshot_resources = new LLSDArray();
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 73e41ee..e1d7ac3 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 [OSDMap] 33 [LLSDMap]
34 public class LLSDDiscoveryResponse 34 public class LLSDDiscoveryResponse
35 { 35 {
36 public OSDArray snapshot_resources; 36 public LLSDArray snapshot_resources;
37 } 37 }
38 38
39 [OSDMap] 39 [LLSDMap]
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/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
index aac6e35..af51df6 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -176,52 +176,44 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
176 { 176 {
177 ITextureSender sender = null; 177 ITextureSender sender = null;
178 178
179// try 179 try
180// { 180 {
181 while (true) 181 while (true)
182 { 182 {
183 try 183 sender = m_queueSenders.Dequeue();
184
185 if (sender.Cancel)
184 { 186 {
185 sender = m_queueSenders.Dequeue(); 187 TextureSent(sender);
186 188
187 if (sender.Cancel) 189 sender.Cancel = false;
190 }
191 else
192 {
193 bool finished = sender.SendTexturePacket();
194 if (finished)
188 { 195 {
189 TextureSent(sender); 196 TextureSent(sender);
190
191 sender.Cancel = false;
192 } 197 }
193 else 198 else
194 { 199 {
195 bool finished = sender.SendTexturePacket(); 200 m_queueSenders.Enqueue(sender);
196 if (finished)
197 {
198 TextureSent(sender);
199 }
200 else
201 {
202 m_queueSenders.Enqueue(sender);
203 }
204 } 201 }
202 }
205 203
206 // Make sure that any sender we currently have can get garbage collected 204 // Make sure that any sender we currently have can get garbage collected
207 sender = null; 205 sender = null;
208 206
209 //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); 207 //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count());
210 }
211 catch(Exception e)
212 {
213 m_log.ErrorFormat(
214 "[TEXTURE]: Texture send thread caught exception. The texture send was aborted. Exception is {0}", e);
215 }
216 } 208 }
217// } 209 }
218// catch (Exception e) 210 catch (Exception e)
219// { 211 {
220// // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened 212 // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
221// m_log.ErrorFormat( 213 m_log.ErrorFormat(
222// "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", 214 "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}",
223// e); 215 e);
224// } 216 }
225 } 217 }
226 218
227 /// <summary> 219 /// <summary>
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
index 044ee76..c064064 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
@@ -28,6 +28,7 @@
28using System.Reflection; 28using System.Reflection;
29using log4net; 29using log4net;
30using OpenMetaverse; 30using OpenMetaverse;
31using OpenMetaverse.Packets;
31using OpenSim.Framework; 32using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
33 34
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
index bcae259..715dc4b 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -57,10 +57,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
57 /// <summary> 57 /// <summary>
58 /// We will allow the client to request the same texture n times before dropping further requests 58 /// We will allow the client to request the same texture n times before dropping further requests
59 /// 59 ///
60 /// This number contains repeated requests for the same texture at different resolutions (which 60 /// This number includes repeated requests for the same texture at different resolutions (which we don't
61 /// are handled since r7368). However, this situation should be handled in a more sophisticated way. 61 /// currently handle properly as far as I know). However, this situation should be handled in a more
62 /// sophisticated way.
62 /// </summary> 63 /// </summary>
63 private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 15; 64 private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5;
64 65
65 /// <summary> 66 /// <summary>
66 /// XXX Also going to limit requests for found textures. 67 /// XXX Also going to limit requests for found textures.
@@ -149,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
149 150
150 m_scene.AddPendingDownloads(1); 151 m_scene.AddPendingDownloads(1);
151 152
152 TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber, e.Priority); 153 TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber);
153 m_textureSenders.Add(e.RequestedAssetID, requestHandler); 154 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
154 155
155 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); 156 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
index 65ca854..cd61798 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
@@ -27,188 +27,106 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using OpenMetaverse.Packets;
30using log4net; 31using log4net;
31using OpenSim.Framework; 32using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
33 34
34namespace OpenSim.Region.Environment.Modules.Agent.TextureSender 35namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
35{ 36{
36 public class ImageDownload 37 /// <summary>
38 /// A TextureSender handles the process of receiving a texture requested by the client from the
39 /// AssetCache, and then sending that texture back to the client.
40 /// </summary>
41 public class TextureSender : ITextureSender
37 { 42 {
38 public const int FIRST_IMAGE_PACKET_SIZE = 600; 43 private static readonly ILog m_log
39 public const int IMAGE_PACKET_SIZE = 1000; 44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40
41 public OpenMetaverse.AssetTexture Texture;
42 public int DiscardLevel;
43 public float Priority;
44 public int CurrentPacket;
45 public int StopPacket;
46
47 public ImageDownload(OpenMetaverse.AssetTexture texture, int discardLevel, float priority, int packet)
48 {
49 Texture = texture;
50 Update(discardLevel, priority, packet);
51 }
52
53 /// <summary>
54 /// Updates an image transfer with new information and recalculates
55 /// offsets
56 /// </summary>
57 /// <param name="discardLevel">New requested discard level</param>
58 /// <param name="priority">New requested priority</param>
59 /// <param name="packet">New requested packet offset</param>
60 public void Update(int discardLevel, float priority, int packet)
61 {
62 Priority = priority;
63 DiscardLevel = Clamp(discardLevel, 0, Texture.LayerInfo.Length - 1);
64 StopPacket = GetPacketForBytePosition(Texture.LayerInfo[(Texture.LayerInfo.Length - 1) - DiscardLevel].End);
65 CurrentPacket = Clamp(packet, 1, TexturePacketCount());
66 }
67
68 /// <summary>
69 /// Returns the total number of packets needed to transfer this texture,
70 /// including the first packet of size FIRST_IMAGE_PACKET_SIZE
71 /// </summary>
72 /// <returns>Total number of packets needed to transfer this texture</returns>
73 public int TexturePacketCount()
74 {
75 return ((Texture.AssetData.Length - FIRST_IMAGE_PACKET_SIZE + IMAGE_PACKET_SIZE - 1) / IMAGE_PACKET_SIZE) + 1;
76 }
77 45
78 /// <summary> 46 /// <summary>
79 /// Returns the current byte offset for this transfer, calculated from 47 /// Records the number of times texture send has been called.
80 /// the CurrentPacket
81 /// </summary> 48 /// </summary>
82 /// <returns>Current byte offset for this transfer</returns> 49 public int counter = 0;
83 public int CurrentBytePosition()
84 {
85 return FIRST_IMAGE_PACKET_SIZE + (CurrentPacket - 1) * IMAGE_PACKET_SIZE;
86 }
87 50
88 /// <summary> 51 public bool ImageLoaded = false;
89 /// Returns the size, in bytes, of the last packet. This will be somewhere
90 /// between 1 and IMAGE_PACKET_SIZE bytes
91 /// </summary>
92 /// <returns>Size of the last packet in the transfer</returns>
93 public int LastPacketSize()
94 {
95 return Texture.AssetData.Length - (FIRST_IMAGE_PACKET_SIZE + ((TexturePacketCount() - 2) * IMAGE_PACKET_SIZE));
96 }
97 52
98 /// <summary> 53 /// <summary>
99 /// Find the packet number that contains a given byte position 54 /// Holds the texture asset to send.
100 /// </summary> 55 /// </summary>
101 /// <param name="bytePosition">Byte position</param> 56 private AssetBase m_asset;
102 /// <returns>Packet number that contains the given byte position</returns>
103 int GetPacketForBytePosition(int bytePosition)
104 {
105 return ((bytePosition - FIRST_IMAGE_PACKET_SIZE + IMAGE_PACKET_SIZE - 1) / IMAGE_PACKET_SIZE);
106 }
107 57
108 /// <summary> 58 //public UUID assetID { get { return m_asset.FullID; } }
109 /// Clamp a given value between a range
110 /// </summary>
111 /// <param name="value">Value to clamp</param>
112 /// <param name="min">Minimum allowable value</param>
113 /// <param name="max">Maximum allowable value</param>
114 /// <returns>A value inclusively between lower and upper</returns>
115 static int Clamp(int value, int min, int max)
116 {
117 // First we check to see if we're greater than the max
118 value = (value > max) ? max : value;
119 59
120 // Then we check to see if we're less than the min. 60 // private bool m_cancel = false;
121 value = (value < min) ? min : value;
122 61
123 // There's no check to see if min > max. 62 // See ITextureSender
124 return value;
125 }
126 }
127 63
128 /// <summary> 64 // private bool m_sending = false;
129 /// A TextureSender handles the process of receiving a texture requested by the client from the
130 /// AssetCache, and then sending that texture back to the client.
131 /// </summary>
132 public class TextureSender : ITextureSender
133 {
134 private static readonly ILog m_log
135 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
136 65
137 public bool ImageLoaded = false; 66 /// <summary>
67 /// This is actually the number of extra packets required to send the texture data! We always assume
68 /// at least one is required.
69 /// </summary>
70 private int NumPackets = 0;
138 71
139 /// <summary> 72 /// <summary>
140 /// Holds the texture asset to send. 73 /// Holds the packet number to send next. In this case, each packet is 1000 bytes long and starts
74 /// at the 600th byte (0th indexed).
141 /// </summary> 75 /// </summary>
142 private AssetBase m_asset; 76 private int PacketCounter = 0;
143 private bool m_cancel = false;
144 private bool m_sending = false;
145 private bool sendFirstPacket = false;
146 private int initialDiscardLevel = 0;
147 private int initialPacketNum = 0;
148 private float initialPriority = 0.0f;
149 77
150 private ImageDownload download; 78 private int RequestedDiscardLevel = -1;
151 private IClientAPI RequestUser; 79 private IClientAPI RequestUser;
80 private uint StartPacketNumber = 0;
152 81
153 public TextureSender(IClientAPI client, int discardLevel, uint packetNumber, float priority) 82 public TextureSender(IClientAPI client, int discardLevel, uint packetNumber)
154 { 83 {
155 RequestUser = client; 84 RequestUser = client;
156 initialDiscardLevel = discardLevel; 85 RequestedDiscardLevel = discardLevel;
157 initialPacketNum = (int)packetNumber; 86 StartPacketNumber = packetNumber;
158 initialPriority = priority;
159 } 87 }
160 88
161 #region ITextureSender Members 89 #region ITextureSender Members
162 90
163 public bool Cancel 91 public bool Cancel
164 { 92 {
165 get { return m_cancel; } 93 get { return false; }
166 set { m_cancel = value; } 94 set
95 {
96 // m_cancel = value;
97 }
167 } 98 }
168 99
169 public bool Sending 100 public bool Sending
170 { 101 {
171 get { return m_sending; } 102 get { return false; }
172 set { m_sending = value; } 103 set
104 {
105 // m_sending = value;
106 }
173 } 107 }
174 108
175 // See ITextureSender 109 // See ITextureSender
176 public void UpdateRequest(int discardLevel, uint packetNumber) 110 public void UpdateRequest(int discardLevel, uint packetNumber)
177 { 111 {
178 if (download == null) 112 RequestedDiscardLevel = discardLevel;
179 return; 113 StartPacketNumber = packetNumber;
180 114 PacketCounter = (int) StartPacketNumber;
181 lock (download)
182 {
183 if (discardLevel < download.DiscardLevel)
184 m_log.DebugFormat("Image download {0} is changing from DiscardLevel {1} to {2}",
185 m_asset.FullID, download.DiscardLevel, discardLevel);
186
187 if (packetNumber != download.CurrentPacket)
188 m_log.DebugFormat("Image download {0} is changing from Packet {1} to {2}",
189 m_asset.FullID, download.CurrentPacket, packetNumber);
190
191 download.Update(discardLevel, download.Priority, (int)packetNumber);
192
193 sendFirstPacket = true;
194 }
195 } 115 }
196 116
197 // See ITextureSender 117 // See ITextureSender
198 public bool SendTexturePacket() 118 public bool SendTexturePacket()
199 { 119 {
200 if (download != null && !m_cancel && (sendFirstPacket || download.CurrentPacket <= download.StopPacket)) 120 //m_log.DebugFormat("[TEXTURE SENDER]: Sending packet for {0}", m_asset.FullID);
201 { 121
202 SendPacket(); 122 SendPacket();
203 return false; 123 counter++;
204 } 124 if ((NumPackets == 0) || (RequestedDiscardLevel == -1) || (PacketCounter > NumPackets) ||
205 else 125 ((RequestedDiscardLevel > 0) && (counter > 50 + (NumPackets / (RequestedDiscardLevel + 1)))))
206 { 126 {
207 m_sending = false;
208 m_cancel = true;
209 sendFirstPacket = false;
210 return true; 127 return true;
211 } 128 }
129 return false;
212 } 130 }
213 131
214 #endregion 132 #endregion
@@ -222,52 +140,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
222 public void TextureReceived(AssetBase asset) 140 public void TextureReceived(AssetBase asset)
223 { 141 {
224 m_asset = asset; 142 m_asset = asset;
225 143 NumPackets = CalculateNumPackets(asset.Data.Length);
226 try 144 PacketCounter = (int) StartPacketNumber;
227 { 145 ImageLoaded = true;
228 OpenMetaverse.AssetTexture texture = new OpenMetaverse.AssetTexture(m_asset.FullID, m_asset.Data);
229 if (texture.DecodeLayerBoundaries())
230 {
231 bool sane = true;
232
233 // Sanity check all of the layers
234 for (int i = 0; i < texture.LayerInfo.Length; i++)
235 {
236 if (texture.LayerInfo[i].End > texture.AssetData.Length)
237 {
238 sane = false;
239 break;
240 }
241 }
242
243 if (sane)
244 {
245 download = new ImageDownload(texture, initialDiscardLevel, initialPriority, initialPacketNum);
246 ImageLoaded = true;
247 m_sending = true;
248 m_cancel = false;
249 sendFirstPacket = true;
250 return;
251 }
252 else
253 {
254 m_log.Error("JPEG2000 texture decoding succeeded, but sanity check failed for " +
255 m_asset.FullID.ToString());
256 }
257 }
258 else
259 {
260 m_log.Error("JPEG2000 texture decoding failed for " + m_asset.FullID.ToString());
261 }
262 }
263 catch (Exception ex)
264 {
265 m_log.Error("JPEG2000 texture decoding threw an exception for " + m_asset.FullID.ToString(), ex);
266 }
267
268 ImageLoaded = false;
269 m_sending = false;
270 m_cancel = true;
271 } 146 }
272 147
273 /// <summary> 148 /// <summary>
@@ -275,48 +150,66 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
275 /// </summary> 150 /// </summary>
276 private void SendPacket() 151 private void SendPacket()
277 { 152 {
278 lock (download) 153 if (PacketCounter <= NumPackets)
279 { 154 {
280 if (sendFirstPacket) 155 if (PacketCounter == 0)
281 { 156 {
282 sendFirstPacket = false; 157 if (NumPackets == 0)
283
284 if (m_asset.Data.Length <= ImageDownload.FIRST_IMAGE_PACKET_SIZE)
285 { 158 {
286 RequestUser.SendImageFirstPart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); 159 RequestUser.SendImageFirstPart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2);
287 return; 160 PacketCounter++;
288 } 161 }
289 else 162 else
290 { 163 {
291 byte[] firstImageData = new byte[ImageDownload.FIRST_IMAGE_PACKET_SIZE]; 164 byte[] ImageData1 = new byte[600];
292 try { Buffer.BlockCopy(m_asset.Data, 0, firstImageData, 0, ImageDownload.FIRST_IMAGE_PACKET_SIZE); } 165 Array.Copy(m_asset.Data, 0, ImageData1, 0, 600);
293 catch (Exception) 166
294 { 167 RequestUser.SendImageFirstPart(
295 m_log.Error("Texture data copy failed on first packet for " + m_asset.FullID.ToString()); 168 (ushort)(NumPackets), m_asset.FullID, (uint)m_asset.Data.Length, ImageData1, 2);
296 m_cancel = true; 169 PacketCounter++;
297 m_sending = false;
298 return;
299 }
300 RequestUser.SendImageFirstPart((ushort)download.TexturePacketCount(), m_asset.FullID, (uint)m_asset.Data.Length, firstImageData, 2);
301 } 170 }
302 } 171 }
303 172 else
304 int imagePacketSize = (download.CurrentPacket == download.TexturePacketCount() - 1) ?
305 download.LastPacketSize() : ImageDownload.IMAGE_PACKET_SIZE;
306
307 byte[] imageData = new byte[imagePacketSize];
308 try { Buffer.BlockCopy(m_asset.Data, download.CurrentBytePosition(), imageData, 0, imagePacketSize); }
309 catch (Exception)
310 { 173 {
311 m_log.Error("Texture data copy failed for " + m_asset.FullID.ToString()); 174 int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1));
312 m_cancel = true; 175 if (size > 1000) size = 1000;
313 m_sending = false; 176 byte[] imageData = new byte[size];
314 return; 177 try
178 {
179 Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), imageData, 0, size);
180 }
181 catch (ArgumentOutOfRangeException)
182 {
183 m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" +
184 m_asset.FullID.ToString());
185 return;
186 }
187
188 RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.FullID, imageData);
189 PacketCounter++;
315 } 190 }
191 }
192 }
316 193
317 RequestUser.SendImageNextPart((ushort)download.CurrentPacket, m_asset.FullID, imageData); 194 /// <summary>
318 ++download.CurrentPacket; 195 /// Calculate the number of packets that will be required to send the texture loaded into this sender
196 /// This is actually the number of 1000 byte packets not including an initial 600 byte packet...
197 /// </summary>
198 /// <param name="length"></param>
199 /// <returns></returns>
200 private int CalculateNumPackets(int length)
201 {
202 int numPackets = 0;
203
204 if (length > 600)
205 {
206 //over 600 bytes so split up file
207 int restData = (length - 600);
208 int restPackets = ((restData + 999) / 1000);
209 numPackets = restPackets;
319 } 210 }
211
212 return numPackets;
320 } 213 }
321 } 214 }
322} 215}
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
index 5b6c2a6..2f9a691 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(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); 177 Array.Copy(Helpers.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(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); 186 Array.Copy(Helpers.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/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index 989f36c..daff760 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -29,6 +29,7 @@ using System.Collections;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenMetaverse.Packets;
32using log4net; 33using log4net;
33using Nini.Config; 34using Nini.Config;
34using Nwc.XmlRpc; 35using Nwc.XmlRpc;
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
index 3fc8005..c532ac0 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 OSD = OpenMetaverse.StructuredData.OSD; 47using LLSD = OpenMetaverse.StructuredData.LLSD;
48using OSDMap = OpenMetaverse.StructuredData.OSDMap; 48using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
49using OSDArray = OpenMetaverse.StructuredData.OSDArray; 49using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
50using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 50using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
51using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.OSD>; 51using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.LLSD>;
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 OSDMap body; 58 public LLSDMap 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(OSD ev, UUID avatarID) 149 public bool Enqueue(LLSD 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 OSD element = queue.Dequeue(15000); // 15s timeout 311 LLSD 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 OSDArray array = new OSDArray(); 340 LLSDArray array = new LLSDArray();
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 OSDMap events = new OSDMap(); 357 LLSDMap events = new LLSDMap();
358 events.Add("events", array); 358 events.Add("events", array);
359 359
360 events.Add("id", new OSDInteger(thisID)); 360 events.Add("id", new LLSDInteger(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"] = OSDParser.SerializeLLSDXmlString(events); 369 responsedata["str_response_string"] = LLSDParser.SerializeXmlString(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 OSD EventQueueFallBack(string path, OSD request, string endpoint) 427 public LLSD EventQueueFallBack(string path, LLSD 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 OSDArray array = new OSDArray(); 476 LLSDArray array = new LLSDArray();
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 OSDMap events = new OSDMap(); 492 LLSDMap events = new LLSDMap();
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 OSDString("shutdown404!"); 515 return new LLSDString("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 21be82a..0d0eed2 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 OSD buildEvent(string eventName, OSD eventBody) 55 public static LLSD buildEvent(string eventName, LLSD eventBody)
56 { 56 {
57 OSDMap llsdEvent = new OSDMap(2); 57 LLSDMap llsdEvent = new LLSDMap(2);
58 llsdEvent.Add("message", new OSDString(eventName)); 58 llsdEvent.Add("message", new LLSDString(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 OSD EnableSimulator(ulong Handle, IPEndPoint endPoint) 64 public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint)
65 { 65 {
66 OSDMap llsdSimInfo = new OSDMap(3); 66 LLSDMap llsdSimInfo = new LLSDMap(3);
67 67
68 llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle))); 68 llsdSimInfo.Add("Handle", new LLSDBinary(regionHandleToByteArray(Handle)));
69 llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); 69 llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes()));
70 llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); 70 llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port));
71 71
72 OSDArray arr = new OSDArray(1); 72 LLSDArray arr = new LLSDArray(1);
73 arr.Add(llsdSimInfo); 73 arr.Add(llsdSimInfo);
74 74
75 OSDMap llsdBody = new OSDMap(1); 75 LLSDMap llsdBody = new LLSDMap(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 OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, 81 public static LLSD 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 OSDArray LookAtArr = new OSDArray(3); 85 LLSDArray LookAtArr = new LLSDArray(3);
86 LookAtArr.Add(OSD.FromReal(lookAt.X)); 86 LookAtArr.Add(LLSD.FromReal(lookAt.X));
87 LookAtArr.Add(OSD.FromReal(lookAt.Y)); 87 LookAtArr.Add(LLSD.FromReal(lookAt.Y));
88 LookAtArr.Add(OSD.FromReal(lookAt.Z)); 88 LookAtArr.Add(LLSD.FromReal(lookAt.Z));
89 89
90 OSDArray PositionArr = new OSDArray(3); 90 LLSDArray PositionArr = new LLSDArray(3);
91 PositionArr.Add(OSD.FromReal(pos.X)); 91 PositionArr.Add(LLSD.FromReal(pos.X));
92 PositionArr.Add(OSD.FromReal(pos.Y)); 92 PositionArr.Add(LLSD.FromReal(pos.Y));
93 PositionArr.Add(OSD.FromReal(pos.Z)); 93 PositionArr.Add(LLSD.FromReal(pos.Z));
94 94
95 OSDMap InfoMap = new OSDMap(2); 95 LLSDMap InfoMap = new LLSDMap(2);
96 InfoMap.Add("LookAt", LookAtArr); 96 InfoMap.Add("LookAt", LookAtArr);
97 InfoMap.Add("Position", PositionArr); 97 InfoMap.Add("Position", PositionArr);
98 98
99 OSDArray InfoArr = new OSDArray(1); 99 LLSDArray InfoArr = new LLSDArray(1);
100 InfoArr.Add(InfoMap); 100 InfoArr.Add(InfoMap);
101 101
102 OSDMap AgentDataMap = new OSDMap(2); 102 LLSDMap AgentDataMap = new LLSDMap(2);
103 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID)); 103 AgentDataMap.Add("AgentID", LLSD.FromUUID(AgentID));
104 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID)); 104 AgentDataMap.Add("SessionID", LLSD.FromUUID(SessionID));
105 105
106 OSDArray AgentDataArr = new OSDArray(1); 106 LLSDArray AgentDataArr = new LLSDArray(1);
107 AgentDataArr.Add(AgentDataMap); 107 AgentDataArr.Add(AgentDataMap);
108 108
109 OSDMap RegionDataMap = new OSDMap(4); 109 LLSDMap RegionDataMap = new LLSDMap(4);
110 RegionDataMap.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(Handle))); 110 RegionDataMap.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(Handle)));
111 RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL)); 111 RegionDataMap.Add("SeedCapability", LLSD.FromString(capsURL));
112 RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); 112 RegionDataMap.Add("SimIP", LLSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes()));
113 RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port)); 113 RegionDataMap.Add("SimPort", LLSD.FromInteger(newRegionExternalEndPoint.Port));
114 114
115 OSDArray RegionDataArr = new OSDArray(1); 115 LLSDArray RegionDataArr = new LLSDArray(1);
116 RegionDataArr.Add(RegionDataMap); 116 RegionDataArr.Add(RegionDataMap);
117 117
118 OSDMap llsdBody = new OSDMap(3); 118 LLSDMap llsdBody = new LLSDMap(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 OSD TeleportFinishEvent( 126 public static LLSD 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 OSDMap info = new OSDMap(); 130 LLSDMap info = new LLSDMap();
131 info.Add("AgentID", OSD.FromUUID(AgentID)); 131 info.Add("AgentID", LLSD.FromUUID(AgentID));
132 info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? 132 info.Add("LocationID", LLSD.FromInteger(4)); // TODO what is this?
133 info.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(regionHandle))); 133 info.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(regionHandle)));
134 info.Add("SeedCapability", OSD.FromString(capsURL)); 134 info.Add("SeedCapability", LLSD.FromString(capsURL));
135 info.Add("SimAccess", OSD.FromInteger(simAccess)); 135 info.Add("SimAccess", LLSD.FromInteger(simAccess));
136 info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); 136 info.Add("SimIP", LLSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
137 info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); 137 info.Add("SimPort", LLSD.FromInteger(regionExternalEndPoint.Port));
138 info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation 138 info.Add("TeleportFlags", LLSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
139 139
140 OSDArray infoArr = new OSDArray(); 140 LLSDArray infoArr = new LLSDArray();
141 infoArr.Add(info); 141 infoArr.Add(info);
142 142
143 OSDMap body = new OSDMap(); 143 LLSDMap body = new LLSDMap();
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 OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) 149 public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono)
150 { 150 {
151 OSDMap script = new OSDMap(); 151 LLSDMap script = new LLSDMap();
152 script.Add("ObjectID", OSD.FromUUID(objectID)); 152 script.Add("ObjectID", LLSD.FromUUID(objectID));
153 script.Add("ItemID", OSD.FromUUID(itemID)); 153 script.Add("ItemID", LLSD.FromUUID(itemID));
154 script.Add("Running", OSD.FromBoolean(running)); 154 script.Add("Running", LLSD.FromBoolean(running));
155 script.Add("Mono", OSD.FromBoolean(mono)); 155 script.Add("Mono", LLSD.FromBoolean(mono));
156 156
157 OSDArray scriptArr = new OSDArray(); 157 LLSDArray scriptArr = new LLSDArray();
158 scriptArr.Add(script); 158 scriptArr.Add(script);
159 159
160 OSDMap body = new OSDMap(); 160 LLSDMap body = new LLSDMap();
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 OSD KeepAliveEvent() 166 public static LLSD KeepAliveEvent()
167 { 167 {
168 return buildEvent("FAKEEVENT", new OSDMap()); 168 return buildEvent("FAKEEVENT", new LLSDMap());
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 1c86c2f..5b06408 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 OSD = OpenMetaverse.StructuredData.OSD; 49using LLSD = OpenMetaverse.StructuredData.LLSD;
50using OSDMap = OpenMetaverse.StructuredData.OSDMap; 50using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
51using OSDArray = OpenMetaverse.StructuredData.OSDArray; 51using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
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 OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint) 221 public LLSD ProcessRegionDomainSeed(string path, LLSD 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 OSDMap(); 237 //return new LLSDMap();
238 238
239 } 239 }
240 240
241 public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint) 241 public LLSD ProcessAgentDomainMessage(string path, LLSD 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 OSD GenerateRezAvatarRequestMessage(string regionname) 291 private LLSD 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 OSDMap responseMap = new OSDMap(); 322 LLSDMap responseMap = new LLSDMap();
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"] = OSD.FromBoolean(true); 350 responseMap["connect"] = LLSD.FromBoolean(true);
351 OSDMap capabilitiesMap = new OSDMap(); 351 LLSDMap capabilitiesMap = new LLSDMap();
352 capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); 352 capabilitiesMap["rez_avatar/request"] = LLSD.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 OSD RequestRezAvatarMethod(string path, OSD request) 379 public LLSD RequestRezAvatarMethod(string path, LLSD request)
380 { 380 {
381 //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString()); 381 //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
382 382
383 OSDMap requestMap = (OSDMap)request; 383 LLSDMap requestMap = (LLSDMap)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 OSDMap responseMap = new OSDMap(); 444 LLSDMap responseMap = new LLSDMap();
445 445
446 if (RemoteAgentID == UUID.Zero) 446 if (RemoteAgentID == UUID.Zero)
447 { 447 {
448 responseMap["connect"] = OSD.FromBoolean(false); 448 responseMap["connect"] = LLSD.FromBoolean(false);
449 responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request"); 449 responseMap["message"] = LLSD.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"] = OSD.FromString(reg.ExternalHostName); 454 responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);
455 455
456 // DEPRECIATED 456 // DEPRECIATED
457 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 457 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
458 458
459 responseMap["connect"] = OSD.FromBoolean(true); 459 responseMap["connect"] = LLSD.FromBoolean(true);
460 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); 460 responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port);
461 responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX 461 responseMap["region_x"] = LLSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX
462 responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY 462 responseMap["region_y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY
463 responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); 463 responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID);
464 responseMap["sim_access"] = OSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); 464 responseMap["sim_access"] = LLSD.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"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 578 responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
579 579
580 // REPLACEMENT 580 // REPLACEMENT
581 responseMap["region_seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 581 responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
582 582
583 responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 583 responseMap["rez_avatar"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
584 responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 584 responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
585 responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); 585 responseMap["rez_avatar/derez"] = LLSD.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 OSD RezAvatarMethod(string path, OSD request) 608 public LLSD RezAvatarMethod(string path, LLSD request)
609 { 609 {
610 m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); 610 m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString());
611 611
612 OSDMap responseMap = new OSDMap(); 612 LLSDMap responseMap = new LLSDMap();
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 OSDMap requestMap = (OSDMap)request; 619 LLSDMap requestMap = (LLSDMap)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 OSDArray Parameter = new OSDArray(); 625 LLSDArray Parameter = new LLSDArray();
626 if (requestMap.ContainsKey("parameter")) 626 if (requestMap.ContainsKey("parameter"))
627 { 627 {
628 Parameter = (OSDArray)requestMap["parameter"]; 628 Parameter = (LLSDArray)((LLSD)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 OSDMap item = (OSDMap)Parameter[i]; 639 LLSDMap item = (LLSDMap)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 OSDArray PositionArray = new OSDArray(); 717 LLSDArray PositionArray = new LLSDArray();
718 PositionArray.Add(OSD.FromInteger(128)); 718 PositionArray.Add(LLSD.FromInteger(128));
719 PositionArray.Add(OSD.FromInteger(128)); 719 PositionArray.Add(LLSD.FromInteger(128));
720 PositionArray.Add(OSD.FromInteger(40)); 720 PositionArray.Add(LLSD.FromInteger(40));
721 721
722 OSDArray LookAtArray = new OSDArray(); 722 LLSDArray LookAtArray = new LLSDArray();
723 LookAtArray.Add(OSD.FromInteger(1)); 723 LookAtArray.Add(LLSD.FromInteger(1));
724 LookAtArray.Add(OSD.FromInteger(1)); 724 LookAtArray.Add(LLSD.FromInteger(1));
725 LookAtArray.Add(OSD.FromInteger(1)); 725 LookAtArray.Add(LLSD.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"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X 735 responseMap["region_x"] = LLSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X
736 responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y 736 responseMap["region_y"] = LLSD.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"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 739 responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
740 responseMap["region"] = OSD.FromUUID(reg.originRegionID); 740 responseMap["region"] = LLSD.FromUUID(reg.originRegionID);
741 responseMap["look_at"] = LookAtArray; 741 responseMap["look_at"] = LookAtArray;
742 742
743 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); 743 responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port);
744 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); 744 responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString());
745 745
746 // DEPRECIATED 746 // DEPRECIATED
747 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 747 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
748 748
749 responseMap["session_id"] = OSD.FromUUID(SessionID); 749 responseMap["session_id"] = LLSD.FromUUID(SessionID);
750 responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID); 750 responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID);
751 responseMap["circuit_code"] = OSD.FromInteger(circuitcode); 751 responseMap["circuit_code"] = LLSD.FromInteger(circuitcode);
752 752
753 responseMap["position"] = PositionArray; 753 responseMap["position"] = PositionArray;
754 754
755 responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); 755 responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID);
756 756
757 responseMap["sim_access"] = OSD.FromString("Mature"); 757 responseMap["sim_access"] = LLSD.FromString("Mature");
758 758
759 responseMap["connect"] = OSD.FromBoolean(true); 759 responseMap["connect"] = LLSD.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 OSD DerezAvatarMethod(string path, OSD request) 770 public LLSD DerezAvatarMethod(string path, LLSD 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 OSDMap responseMap = new OSDMap(); 775 LLSDMap responseMap = new LLSDMap();
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 //OSDMap outboundRequestMap = new OSDMap(); 793 //LLSDMap outboundRequestMap = new LLSDMap();
794 OSDMap inboundRequestMap = (OSDMap)request; 794 LLSDMap inboundRequestMap = (LLSDMap)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 OSDArray LookAtArray = new OSDArray(); 800 LLSDArray LookAtArray = new LLSDArray();
801 LookAtArray.Add(OSD.FromInteger(1)); 801 LookAtArray.Add(LLSD.FromInteger(1));
802 LookAtArray.Add(OSD.FromInteger(1)); 802 LookAtArray.Add(LLSD.FromInteger(1));
803 LookAtArray.Add(OSD.FromInteger(1)); 803 LookAtArray.Add(LLSD.FromInteger(1));
804 804
805 OSDArray PositionArray = new OSDArray(); 805 LLSDArray PositionArray = new LLSDArray();
806 PositionArray.Add(OSD.FromInteger(128)); 806 PositionArray.Add(LLSD.FromInteger(128));
807 PositionArray.Add(OSD.FromInteger(128)); 807 PositionArray.Add(LLSD.FromInteger(128));
808 PositionArray.Add(OSD.FromInteger(40)); 808 PositionArray.Add(LLSD.FromInteger(40));
809 809
810 OSDArray lookArray = new OSDArray(); 810 LLSDArray lookArray = new LLSDArray();
811 lookArray.Add(OSD.FromInteger(128)); 811 lookArray.Add(LLSD.FromInteger(128));
812 lookArray.Add(OSD.FromInteger(128)); 812 lookArray.Add(LLSD.FromInteger(128));
813 lookArray.Add(OSD.FromInteger(40)); 813 lookArray.Add(LLSD.FromInteger(40));
814 814
815 responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up 815 responseMap["connect"] = LLSD.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 OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); 820 LLSDMap 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 OSDArray RezResponsePositionArray = null; 855 LLSDArray 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 = (OSDArray)rezResponseMap["position"]; 859 RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
860 } 860 }
861 // DEPRECIATED 861 // DEPRECIATED
862 responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap); 862 responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
863 863
864 // REPLACEMENT r3 864 // REPLACEMENT r3
865 responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap); 865 responseMap["region_seed_capability"] = LLSD.FromString(rezRespSeedCap);
866 866
867 // DEPRECIATED 867 // DEPRECIATED
868 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); 868 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
869 869
870 responseMap["sim_host"] = OSD.FromString(rezRespSim_host); 870 responseMap["sim_host"] = LLSD.FromString(rezRespSim_host);
871 responseMap["sim_port"] = OSD.FromInteger(rrPort); 871 responseMap["sim_port"] = LLSD.FromInteger(rrPort);
872 responseMap["region_x"] = OSD.FromInteger(rrX ); 872 responseMap["region_x"] = LLSD.FromInteger(rrX );
873 responseMap["region_y"] = OSD.FromInteger(rrY ); 873 responseMap["region_y"] = LLSD.FromInteger(rrY );
874 responseMap["region_id"] = OSD.FromUUID(rrRID); 874 responseMap["region_id"] = LLSD.FromUUID(rrRID);
875 responseMap["sim_access"] = OSD.FromString(rrAccess); 875 responseMap["sim_access"] = LLSD.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"] = OSD.FromBoolean(true); 882 responseMap["connect"] = LLSD.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 OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState) 902 private LLSDMap invokeRezAvatarCap(LLSDMap 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 OSDMap RAMap = new OSDMap(); 910 LLSDMap RAMap = new LLSDMap();
911 OSDMap AgentParms = new OSDMap(); 911 LLSDMap AgentParms = new LLSDMap();
912 OSDMap RegionParms = new OSDMap(); 912 LLSDMap RegionParms = new LLSDMap();
913 913
914 OSDArray Parameter = new OSDArray(2); 914 LLSDArray Parameter = new LLSDArray(2);
915 915
916 OSDMap version = new OSDMap(); 916 LLSDMap version = new LLSDMap();
917 version["version"] = OSD.FromInteger(userState.src_version); 917 version["version"] = LLSD.FromInteger(userState.src_version);
918 Parameter.Add(version); 918 Parameter.Add((LLSD)version);
919 919
920 OSDMap SrcData = new OSDMap(); 920 LLSDMap SrcData = new LLSDMap();
921 SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); 921 SrcData["estate_id"] = LLSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID);
922 SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); 922 SrcData["parent_estate_id"] = LLSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID));
923 SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID); 923 SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID);
924 SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent); 924 SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent);
925 Parameter.Add(SrcData); 925 Parameter.Add((LLSD)SrcData);
926 926
927 AgentParms["first_name"] = OSD.FromString(userState.first_name); 927 AgentParms["first_name"] = LLSD.FromString(userState.first_name);
928 AgentParms["last_name"] = OSD.FromString(userState.last_name); 928 AgentParms["last_name"] = LLSD.FromString(userState.last_name);
929 AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id); 929 AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id);
930 RegionParms["region_id"] = OSD.FromUUID(userState.region_id); 930 RegionParms["region_id"] = LLSD.FromUUID(userState.region_id);
931 AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code); 931 AgentParms["circuit_code"] = LLSD.FromInteger(userState.circuit_code);
932 AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id); 932 AgentParms["secure_session_id"] = LLSD.FromUUID(userState.secure_session_id);
933 AgentParms["session_id"] = OSD.FromUUID(userState.session_id); 933 AgentParms["session_id"] = LLSD.FromUUID(userState.session_id);
934 AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access); 934 AgentParms["agent_access"] = LLSD.FromBoolean(userState.agent_access);
935 AgentParms["god_level"] = OSD.FromInteger(userState.god_level); 935 AgentParms["god_level"] = LLSD.FromInteger(userState.god_level);
936 AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide); 936 AgentParms["god_overide"] = LLSD.FromBoolean(userState.god_overide);
937 AgentParms["identified"] = OSD.FromBoolean(userState.identified); 937 AgentParms["identified"] = LLSD.FromBoolean(userState.identified);
938 AgentParms["transacted"] = OSD.FromBoolean(userState.transacted); 938 AgentParms["transacted"] = LLSD.FromBoolean(userState.transacted);
939 AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified); 939 AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified);
940 AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate); 940 AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate);
941 AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host); 941 AgentParms["inventory_host"] = LLSD.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 OSD LLSDofRAMap = RAMap; // RENAME if this works 954 LLSD 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 = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); 958 byte[] buffer = LLSDParser.SerializeXmlBytes(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"] = OSD.FromBoolean(false); 976 responseMap["connect"] = LLSD.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"] = OSD.FromBoolean(false); 1000 responseMap["connect"] = LLSD.FromBoolean(false);
1001 1001
1002 return responseMap; 1002 return responseMap;
1003 } 1003 }
1004 OSD rezResponse = null; 1004 LLSD rezResponse = null;
1005 try 1005 try
1006 { 1006 {
1007 rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply); 1007 rezResponse = LLSDParser.DeserializeXml(rez_avatar_reply);
1008 1008
1009 responseMap = (OSDMap)rezResponse; 1009 responseMap = (LLSDMap)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"] = OSD.FromBoolean(false); 1014 responseMap["connect"] = LLSD.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 OSD GenerateNoHandlerMessage() 1022 public LLSD GenerateNoHandlerMessage()
1023 { 1023 {
1024 OSDMap map = new OSDMap(); 1024 LLSDMap map = new LLSDMap();
1025 map["reason"] = OSD.FromString("LLSDRequest"); 1025 map["reason"] = LLSD.FromString("LLSDRequest");
1026 map["message"] = OSD.FromString("No handler registered for LLSD Requests"); 1026 map["message"] = LLSD.FromString("No handler registered for LLSD Requests");
1027 map["login"] = OSD.FromString("false"); 1027 map["login"] = LLSD.FromString("false");
1028 map["connect"] = OSD.FromString("false"); 1028 map["connect"] = LLSD.FromString("false");
1029 return map; 1029 return map;
1030 } 1030 }
1031 public OSD GenerateNoStateMessage(UUID passedAvatar) 1031 public LLSD GenerateNoStateMessage(UUID passedAvatar)
1032 { 1032 {
1033 OSDMap map = new OSDMap(); 1033 LLSDMap map = new LLSDMap();
1034 map["reason"] = OSD.FromString("derez failed"); 1034 map["reason"] = LLSD.FromString("derez failed");
1035 map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); 1035 map["message"] = LLSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString());
1036 map["login"] = OSD.FromString("false"); 1036 map["login"] = LLSD.FromString("false");
1037 map["connect"] = OSD.FromString("false"); 1037 map["connect"] = LLSD.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 197d5c2..27c7014 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 8318cdc..c51a314 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 OSD = OpenMetaverse.StructuredData.OSD; 51using LLSD = OpenMetaverse.StructuredData.LLSD;
52using OSDMap = OpenMetaverse.StructuredData.OSDMap; 52using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
53using OSDArray = OpenMetaverse.StructuredData.OSDArray; 53using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
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(GetOSDMapLayerResponse()); 205 mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
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(GetOSDMapLayerResponse()); 218 mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
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 OSDMapLayer GetOSDMapLayerResponse() 226 protected static LLSDMapLayer GetLLSDMapLayerResponse()
227 { 227 {
228 OSDMapLayer mapLayer = new OSDMapLayer(); 228 LLSDMapLayer mapLayer = new LLSDMapLayer();
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 Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); 324 Helpers.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 OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); 410 LLSDMap 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 OSDMap Response for the mapitem</param> 436 /// <param name="response">The LLSDMap Response for the mapitem</param>
437 private void RequestMapItemsCompleted(OSDMap response) 437 private void RequestMapItemsCompleted(LLSDMap 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 OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()]; 463 LLSDArray itemarray = (LLSDArray)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 OSDMap mapitem = (OSDMap)itemarray[i]; 466 LLSDMap mapitem = (LLSDMap)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 OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, 520 private LLSDMap 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 OSDMap(); 531 return new LLSDMap();
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 OSDMap(); 572 return new LLSDMap();
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 OSDMap RAMap = new OSDMap(); 588 LLSDMap RAMap = new LLSDMap();
589 589
590 // string RAMapString = RAMap.ToString(); 590 // string RAMapString = RAMap.ToString();
591 OSD LLSDofRAMap = RAMap; // RENAME if this works 591 LLSD LLSDofRAMap = RAMap; // RENAME if this works
592 592
593 byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); 593 byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap);
594 OSDMap responseMap = new OSDMap(); 594 LLSDMap responseMap = new LLSDMap();
595 responseMap["requestID"] = OSD.FromUUID(requestID); 595 responseMap["requestID"] = LLSD.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"] = OSD.FromBoolean(false); 609 responseMap["connect"] = LLSD.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 OSDMap(); 633 return new LLSDMap();
634 } 634 }
635 } 635 }
636 catch (WebException) 636 catch (WebException)
637 { 637 {
638 responseMap["connect"] = OSD.FromBoolean(false); 638 responseMap["connect"] = LLSD.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 OSD rezResponse = null; 649 LLSD rezResponse = null;
650 try 650 try
651 { 651 {
652 rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply); 652 rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply);
653 653
654 responseMap = (OSDMap)rezResponse; 654 responseMap = (LLSDMap)rezResponse;
655 responseMap["requestID"] = OSD.FromUUID(requestID); 655 responseMap["requestID"] = LLSD.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"] = OSD.FromBoolean(false); 660 responseMap["connect"] = LLSD.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 OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) 796 public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint)
797 { 797 {
798 uint xstart = 0; 798 uint xstart = 0;
799 uint ystart = 0; 799 uint ystart = 0;
800 800
801 Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); 801 Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
802 802
803 OSDMap responsemap = new OSDMap(); 803 LLSDMap responsemap = new LLSDMap();
804 List<ScenePresence> avatars = m_scene.GetAvatars(); 804 List<ScenePresence> avatars = m_scene.GetAvatars();
805 OSDArray responsearr = new OSDArray(avatars.Count); 805 LLSDArray responsearr = new LLSDArray(avatars.Count);
806 OSDMap responsemapdata = new OSDMap(); 806 LLSDMap responsemapdata = new LLSDMap();
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 OSDMap(); 811 responsemapdata = new LLSDMap();
812 responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); 812 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
813 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); 813 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
814 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 814 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
815 responsemapdata["Name"] = OSD.FromString("TH"); 815 responsemapdata["Name"] = LLSD.FromString("TH");
816 responsemapdata["Extra"] = OSD.FromInteger(0); 816 responsemapdata["Extra"] = LLSD.FromInteger(0);
817 responsemapdata["Extra2"] = OSD.FromInteger(0); 817 responsemapdata["Extra2"] = LLSD.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 OSDMap(); 824 responsemapdata = new LLSDMap();
825 responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1)); 825 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1));
826 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1)); 826 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1));
827 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 827 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
828 responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); 828 responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
829 responsemapdata["Extra"] = OSD.FromInteger(0); 829 responsemapdata["Extra"] = LLSD.FromInteger(0);
830 responsemapdata["Extra2"] = OSD.FromInteger(0); 830 responsemapdata["Extra2"] = LLSD.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 OSDArray(avatars.Count); 837 responsearr = new LLSDArray(avatars.Count);
838 foreach (ScenePresence av in avatars) 838 foreach (ScenePresence av in avatars)
839 { 839 {
840 responsemapdata = new OSDMap(); 840 responsemapdata = new LLSDMap();
841 responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); 841 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
842 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); 842 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
843 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 843 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
844 responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); 844 responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
845 responsemapdata["Extra"] = OSD.FromInteger(1); 845 responsemapdata["Extra"] = LLSD.FromInteger(1);
846 responsemapdata["Extra2"] = OSD.FromInteger(0); 846 responsemapdata["Extra2"] = LLSD.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/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 324e38c..79d79ef 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using System.Text; 31using System.Text;
32using System.Timers; 32using System.Timers;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenMetaverse.Packets;
34using log4net; 35using log4net;
35using OpenSim.Framework; 36using OpenSim.Framework;
36using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 8167c68..3948d31 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 OSD = OpenMetaverse.StructuredData.OSD; 39using LLSD = OpenMetaverse.StructuredData.LLSD;
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 OSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint); 287 LLSD 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 OSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint, 701 LLSD 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 Utils.LongToUInts(regionHandle, out regX, out regY); 751 Helpers.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 ba638e5..1309e77 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -584,11 +584,11 @@ namespace OpenSim.Region.Environment.Scenes
584 584
585 invString.AddPermissionsStart(); 585 invString.AddPermissionsStart();
586 586
587 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); 587 invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask));
588 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); 588 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
589 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); 589 invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
590 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); 590 invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
591 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); 591 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextPermissions));
592 592
593 invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); 593 invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
594 invString.AddNameValueLine("owner_id", ownerID.ToString()); 594 invString.AddNameValueLine("owner_id", ownerID.ToString());
@@ -601,7 +601,7 @@ namespace OpenSim.Region.Environment.Scenes
601 invString.AddNameValueLine("asset_id", item.AssetID.ToString()); 601 invString.AddNameValueLine("asset_id", item.AssetID.ToString());
602 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); 602 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
603 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); 603 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
604 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); 604 invString.AddNameValueLine("flags", Helpers.UIntToHexString(item.Flags));
605 605
606 invString.AddSaleStart(); 606 invString.AddSaleStart();
607 invString.AddNameValueLine("sale_type", "not"); 607 invString.AddNameValueLine("sale_type", "not");
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index c7862ec..227a941 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 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); 1092 Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
1093 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); 1093 Helpers.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
1094 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); 1094 Helpers.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 19f0f9c..19532e6 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 OSD = OpenMetaverse.StructuredData.OSD; 42using LLSD = OpenMetaverse.StructuredData.LLSD;
43 43
44 44
45namespace OpenSim.Region.Environment.Scenes 45namespace OpenSim.Region.Environment.Scenes
@@ -2171,7 +2171,7 @@ namespace OpenSim.Region.Environment.Scenes
2171 } 2171 }
2172 2172
2173 Vector3 vel = m_velocity; 2173 Vector3 vel = m_velocity;
2174 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 2174 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
2175 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); 2175 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
2176 if (neighbourRegion != null && ValidateAttachments()) 2176 if (neighbourRegion != null && ValidateAttachments())
2177 { 2177 {
@@ -2209,7 +2209,7 @@ namespace OpenSim.Region.Environment.Scenes
2209 if (eq != null) 2209 if (eq != null)
2210 { 2210 {
2211 2211
2212 OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, 2212 LLSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
2213 capsPath, UUID, ControllingClient.SessionId); 2213 capsPath, UUID, ControllingClient.SessionId);
2214 eq.Enqueue(Item, UUID); 2214 eq.Enqueue(Item, UUID);
2215 } 2215 }
diff --git a/OpenSim/Region/Interfaces/IEventQueue.cs b/OpenSim/Region/Interfaces/IEventQueue.cs
index 5c327d9..42fdcae 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(OSD o, UUID avatarID); 39 bool Enqueue(LLSD o, UUID avatarID);
40 } 40 }
41} 41}
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
index eeca143..9cdd006 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
@@ -29,9 +29,6 @@ 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;
35using OpenSim.Region.ScriptEngine.Interfaces; 32using OpenSim.Region.ScriptEngine.Interfaces;
36using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 33using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
37 34
@@ -135,9 +132,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
135 ads.ConfigurationFile = 132 ads.ConfigurationFile =
136 AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; 133 AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
137 134
135
138 AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + 136 AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" +
139 AppDomainNameCount, null, ads); 137 AppDomainNameCount, null, ads);
140
141 m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + 138 m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName +
142 "]: AppDomain Loading: " + 139 "]: AppDomain Loading: " +
143 AssemblyName.GetAssemblyName( 140 AssemblyName.GetAssemblyName(
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 98d4f3b..e5dfb2b 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -30,7 +30,6 @@ 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;
34using System.Security.Policy; 33using System.Security.Policy;
35using System.Reflection; 34using System.Reflection;
36using System.Globalization; 35using System.Globalization;
@@ -541,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
541 AppDomain.CreateDomain( 540 AppDomain.CreateDomain(
542 m_Scene.RegionInfo.RegionID.ToString(), 541 m_Scene.RegionInfo.RegionID.ToString(),
543 evidence, appSetup); 542 evidence, appSetup);
544 543
545 m_AppDomains[appDomain].AssemblyResolve += 544 m_AppDomains[appDomain].AssemblyResolve +=
546 new ResolveEventHandler( 545 new ResolveEventHandler(
547 AssemblyResolver.OnAssemblyResolve); 546 AssemblyResolver.OnAssemblyResolve);