From 3234472d6203671a492a73042a0b56d6301903e0 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Wed, 19 Nov 2008 06:15:21 +0000
Subject: 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
---
.../Modules/World/WorldMap/WorldMapModule.cs | 112 ++++++++++-----------
1 file changed, 56 insertions(+), 56 deletions(-)
(limited to 'OpenSim/Region/Environment/Modules/World/WorldMap')
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;
using OpenSim.Region.Environment.Types;
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
-using OSD = OpenMetaverse.StructuredData.OSD;
-using OSDMap = OpenMetaverse.StructuredData.OSDMap;
-using OSDArray = OpenMetaverse.StructuredData.OSDArray;
+using LLSD = OpenMetaverse.StructuredData.LLSD;
+using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
+using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
namespace OpenSim.Region.Environment.Modules.World.WorldMap
{
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
}
}
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
- mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
+ mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
return mapResponse.ToString();
}
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
{
m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName);
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
- mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
+ mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
return mapResponse;
}
@@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
///
///
///
- protected static OSDMapLayer GetOSDMapLayerResponse()
+ protected static LLSDMapLayer GetLLSDMapLayerResponse()
{
- OSDMapLayer mapLayer = new OSDMapLayer();
+ LLSDMapLayer mapLayer = new LLSDMapLayer();
mapLayer.Right = 5000;
mapLayer.Top = 5000;
mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
}
uint xstart = 0;
uint ystart = 0;
- Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
+ Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
if (itemtype == 6) // we only sevice 6 right now (avatar green dots)
{
if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
@@ -407,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
if (dorequest)
{
- OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
+ LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
RequestMapItemsCompleted(response);
}
}
@@ -433,8 +433,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
///
/// Sends the mapitem response to the IClientAPI
///
- /// The OSDMap Response for the mapitem
- private void RequestMapItemsCompleted(OSDMap response)
+ /// The LLSDMap Response for the mapitem
+ private void RequestMapItemsCompleted(LLSDMap response)
{
UUID requestID = response["requestID"].AsUUID();
@@ -460,10 +460,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
if (response.ContainsKey(mrs.itemtype.ToString()))
{
List returnitems = new List();
- OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()];
+ LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()];
for (int i = 0; i < itemarray.Count; i++)
{
- OSDMap mapitem = (OSDMap)itemarray[i];
+ LLSDMap mapitem = (LLSDMap)itemarray[i];
mapItemReply mi = new mapItemReply();
mi.x = (uint)mapitem["X"].AsInteger();
mi.y = (uint)mapitem["Y"].AsInteger();
@@ -517,7 +517,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
/// passed in from packet
/// Region we're looking up
///
- private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
+ private LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
{
bool blacklisted = false;
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
}
if (blacklisted)
- return new OSDMap();
+ return new LLSDMap();
UUID requestID = UUID.Random();
lock (m_cachedRegionMapItemsAddress)
@@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
// Can't find the http server
if (httpserver.Length == 0 || blacklisted)
- return new OSDMap();
+ return new LLSDMap();
MapRequestState mrs = new MapRequestState();
mrs.agentID = id;
@@ -585,14 +585,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
WebRequest mapitemsrequest = WebRequest.Create(httpserver);
mapitemsrequest.Method = "POST";
mapitemsrequest.ContentType = "application/xml+llsd";
- OSDMap RAMap = new OSDMap();
+ LLSDMap RAMap = new LLSDMap();
// string RAMapString = RAMap.ToString();
- OSD LLSDofRAMap = RAMap; // RENAME if this works
+ LLSD LLSDofRAMap = RAMap; // RENAME if this works
- byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap);
- OSDMap responseMap = new OSDMap();
- responseMap["requestID"] = OSD.FromUUID(requestID);
+ byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap);
+ LLSDMap responseMap = new LLSDMap();
+ responseMap["requestID"] = LLSD.FromUUID(requestID);
Stream os = null;
try
@@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
catch (WebException ex)
{
m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message);
- responseMap["connect"] = OSD.FromBoolean(false);
+ responseMap["connect"] = LLSD.FromBoolean(false);
lock (m_blacklistedurls)
{
if (!m_blacklistedurls.ContainsKey(httpserver))
@@ -630,12 +630,12 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
}
else
{
- return new OSDMap();
+ return new LLSDMap();
}
}
catch (WebException)
{
- responseMap["connect"] = OSD.FromBoolean(false);
+ responseMap["connect"] = LLSD.FromBoolean(false);
lock (m_blacklistedurls)
{
if (!m_blacklistedurls.ContainsKey(httpserver))
@@ -646,18 +646,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
return responseMap;
}
- OSD rezResponse = null;
+ LLSD rezResponse = null;
try
{
- rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply);
+ rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply);
- responseMap = (OSDMap)rezResponse;
- responseMap["requestID"] = OSD.FromUUID(requestID);
+ responseMap = (LLSDMap)rezResponse;
+ responseMap["requestID"] = LLSD.FromUUID(requestID);
}
catch (Exception)
{
//m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
- responseMap["connect"] = OSD.FromBoolean(false);
+ responseMap["connect"] = LLSD.FromBoolean(false);
return responseMap;
}
@@ -793,57 +793,57 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
return null;
}
- public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint)
+ public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint)
{
uint xstart = 0;
uint ystart = 0;
- Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
+ Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
- OSDMap responsemap = new OSDMap();
+ LLSDMap responsemap = new LLSDMap();
List avatars = m_scene.GetAvatars();
- OSDArray responsearr = new OSDArray(avatars.Count);
- OSDMap responsemapdata = new OSDMap();
+ LLSDArray responsearr = new LLSDArray(avatars.Count);
+ LLSDMap responsemapdata = new LLSDMap();
int tc = System.Environment.TickCount;
/*
foreach (ScenePresence av in avatars)
{
- responsemapdata = new OSDMap();
- responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
- responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
- responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
- responsemapdata["Name"] = OSD.FromString("TH");
- responsemapdata["Extra"] = OSD.FromInteger(0);
- responsemapdata["Extra2"] = OSD.FromInteger(0);
+ responsemapdata = new LLSDMap();
+ responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
+ responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
+ responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
+ responsemapdata["Name"] = LLSD.FromString("TH");
+ responsemapdata["Extra"] = LLSD.FromInteger(0);
+ responsemapdata["Extra2"] = LLSD.FromInteger(0);
responsearr.Add(responsemapdata);
}
responsemap["1"] = responsearr;
*/
if (avatars.Count == 0)
{
- responsemapdata = new OSDMap();
- responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1));
- responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1));
- responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
- responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
- responsemapdata["Extra"] = OSD.FromInteger(0);
- responsemapdata["Extra2"] = OSD.FromInteger(0);
+ responsemapdata = new LLSDMap();
+ responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1));
+ responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1));
+ responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
+ responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
+ responsemapdata["Extra"] = LLSD.FromInteger(0);
+ responsemapdata["Extra2"] = LLSD.FromInteger(0);
responsearr.Add(responsemapdata);
responsemap["6"] = responsearr;
}
else
{
- responsearr = new OSDArray(avatars.Count);
+ responsearr = new LLSDArray(avatars.Count);
foreach (ScenePresence av in avatars)
{
- responsemapdata = new OSDMap();
- responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
- responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
- responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
- responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
- responsemapdata["Extra"] = OSD.FromInteger(1);
- responsemapdata["Extra2"] = OSD.FromInteger(0);
+ responsemapdata = new LLSDMap();
+ responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
+ responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
+ responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
+ responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
+ responsemapdata["Extra"] = LLSD.FromInteger(1);
+ responsemapdata["Extra2"] = LLSD.FromInteger(0);
responsearr.Add(responsemapdata);
}
responsemap["6"] = responsearr;
--
cgit v1.1