From c25a0ea7923aa390d30b8eebdbca4e599edf9b0d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 17 Nov 2008 21:00:34 +0000 Subject: * Update libOMV to r2359. This is necessary for the progressive texture patch * Update libopenjpeg as well for this patch. * Appears to be okay on a very short sniff test * Source code will be placed in opensim-libs shortly --- OpenSim/Data/RegionProfileData.cs | 2 +- .../Framework/Communications/Capabilities/Caps.cs | 16 +- .../Communications/Capabilities/LLSDArray.cs | 4 +- .../Capabilities/LLSDAssetUploadRequest.cs | 2 +- .../Capabilities/LLSDAssetUploadResponse.cs | 2 +- .../Communications/Capabilities/LLSDCapEvent.cs | 2 +- .../Communications/Capabilities/LLSDHelpers.cs | 22 +- .../Capabilities/LLSDInventoryItem.cs | 16 +- .../Communications/Capabilities/LLSDItemUpdate.cs | 2 +- .../Communications/Capabilities/LLSDMapLayer.cs | 4 +- .../Capabilities/LLSDMapLayerResponse.cs | 2 +- .../Capabilities/LLSDParcelVoiceInfoResponse.cs | 2 +- .../Capabilities/LLSDStreamHandler.cs | 4 +- .../LLSDTaskInventoryUploadComplete.cs | 2 +- .../Capabilities/LLSDTaskScriptUpdate.cs | 2 +- .../Communications/Capabilities/LLSDType.cs | 4 +- .../Capabilities/LLSDVoiceAccountResponse.cs | 2 +- OpenSim/Framework/Communications/LoginResponse.cs | 126 ++++----- OpenSim/Framework/Communications/LoginService.cs | 8 +- .../Framework/Communications/UserManagerBase.cs | 2 +- OpenSim/Framework/Location.cs | 2 +- OpenSim/Framework/PrimitiveBaseShape.cs | 14 +- OpenSim/Framework/Servers/BaseHttpServer.cs | 18 +- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 5 +- OpenSim/Framework/Servers/LLSDMethod.cs | 4 +- OpenSim/Framework/Servers/LLSDMethodString.cs | 2 +- OpenSim/Framework/UserProfileData.cs | 2 +- OpenSim/Framework/Util.cs | 10 +- OpenSim/Grid/GridServer/GridManager.cs | 12 +- OpenSim/Grid/MessagingServer/MessageService.cs | 2 +- .../Region/ClientStack/LindenUDP/LLClientView.cs | 4 +- OpenSim/Region/DataSnapshot/DataRequestHandler.cs | 2 +- OpenSim/Region/DataSnapshot/LLSDDiscovery.cs | 6 +- .../Environment/Modules/Agent/Xfer/XferModule.cs | 4 +- .../Modules/Framework/EventQueueGetModule.cs | 30 +-- .../Modules/Framework/EventQueueHelper.cs | 110 ++++---- .../Modules/InterGrid/OpenGridProtocolModule.cs | 284 ++++++++++----------- .../Environment/Modules/World/Land/LandObject.cs | 4 +- .../Modules/World/WorldMap/WorldMapModule.cs | 112 ++++---- .../Scenes/SceneCommunicationService.cs | 8 +- .../Scenes/SceneObjectPart.Inventory.cs | 12 +- .../Region/Environment/Scenes/SceneObjectPart.cs | 6 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 6 +- OpenSim/Region/Interfaces/IEventQueue.cs | 2 +- .../ScriptEngine/DotNetEngine/AppDomainManager.cs | 13 +- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 +- OpenSim/TestSuite/PhysicsBot.cs | 4 +- OpenSim/Tools/pCampBot/PhysicsBot.cs | 4 +- 48 files changed, 470 insertions(+), 451 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs index b30fcf5..a683bf1 100644 --- a/OpenSim/Data/RegionProfileData.cs +++ b/OpenSim/Data/RegionProfileData.cs @@ -153,7 +153,7 @@ namespace OpenSim.Data simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]); simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]); simData.regionHandle = - Helpers.UIntsToLong((simData.regionLocX*Constants.RegionSize), + Utils.UIntsToLong((simData.regionLocX * Constants.RegionSize), (simData.regionLocY*Constants.RegionSize)); simData.serverIP = (string) responseData["sim_ip"]; simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 28e56da..b4a0473 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Capabilities m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest); m_log.Warn("[SEED]: " + capsBase + m_requestPath); //m_capsHandlers["MapLayer"] = - // new LLSDStreamhandler("POST", + // new LLSDStreamhandler("POST", // capsBase + m_mapLayerPath, // GetMapLayer); m_capsHandlers["NewFileAgentInventory"] = @@ -297,7 +297,7 @@ namespace OpenSim.Framework.Communications.Capabilities Hashtable inventoryhash = (Hashtable)foldersrequested[i]; LLSDFetchInventoryDescendents llsdRequest = new LLSDFetchInventoryDescendents(); - LLSDHelpers.DeserialiseLLSDMap(inventoryhash, llsdRequest); + LLSDHelpers.DeserialiseOSDMap(inventoryhash, llsdRequest); LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest); inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); @@ -431,7 +431,7 @@ namespace OpenSim.Framework.Communications.Capabilities { m_log.Debug("[CAPS]: MapLayer Request in region: " + m_regionName); LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); - mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); return mapResponse; } @@ -439,9 +439,9 @@ namespace OpenSim.Framework.Communications.Capabilities /// /// /// - protected static LLSDMapLayer GetLLSDMapLayerResponse() + protected static OSDMapLayer GetOSDMapLayerResponse() { - LLSDMapLayer mapLayer = new LLSDMapLayer(); + OSDMapLayer mapLayer = new OSDMapLayer(); mapLayer.Right = 5000; mapLayer.Top = 5000; mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006"); @@ -545,7 +545,7 @@ namespace OpenSim.Framework.Communications.Capabilities Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request)); LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); - LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); + LLSDHelpers.DeserialiseOSDMap(hash, llsdUpdateRequest); string capsBase = "/CAPS/" + m_capsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); @@ -600,10 +600,10 @@ namespace OpenSim.Framework.Communications.Capabilities OSHttpRequest httpRequest, OSHttpResponse httpResponse) { m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); - //OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); + //OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request)); LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); - LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); + LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest); string capsBase = "/CAPS/" + m_capsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs index 3579cc2..668ca79 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs @@ -30,11 +30,11 @@ using System.Collections; namespace OpenSim.Framework.Communications.Capabilities { [LLSDType("ARRAY")] - public class LLSDArray + public class OSDArray { public ArrayList Array = new ArrayList(); - public LLSDArray() + public OSDArray() { } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs index 5833b65..16547d5 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs @@ -30,7 +30,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDAssetUploadRequest { public string asset_type = String.Empty; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs index 63b3351..04e9ed7 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs @@ -29,7 +29,7 @@ using System; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDAssetUploadResponse { public string uploader = String.Empty; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs index 5ff21b8..d8a6265 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs @@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities public class LLSDCapEvent { public int id = 0; - public LLSDArray events = new LLSDArray(); + public OSDArray events = new OSDArray(); public LLSDCapEvent() { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index b14bfdd..ae4a3db 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs @@ -44,7 +44,7 @@ namespace OpenSim.Framework.Communications.Capabilities XmlTextWriter writer = new XmlTextWriter(sw); writer.Formatting = Formatting.None; writer.WriteStartElement(String.Empty, "llsd", String.Empty); - SerializeLLSDType(writer, obj); + SerializeOSDType(writer, obj); writer.WriteEndElement(); writer.Close(); @@ -53,7 +53,7 @@ namespace OpenSim.Framework.Communications.Capabilities return sw.ToString(); } - private static void SerializeLLSDType(XmlTextWriter writer, object obj) + private static void SerializeOSDType(XmlTextWriter writer, object obj) { Type myType = obj.GetType(); LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); @@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Capabilities fieldName = fieldName.Replace("___", "-"); writer.WriteString(fieldName); writer.WriteEndElement(); - SerializeLLSDType(writer, fieldValue); + SerializeOSDType(writer, fieldValue); } else { @@ -87,13 +87,13 @@ namespace OpenSim.Framework.Communications.Capabilities writer.WriteEndElement(); LLSD.LLSDWriteOne(writer, fieldValue); // OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement( - // writer, OpenMetaverse.StructuredData.LLSD.FromObject(fieldValue)); + // writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue)); } } writer.WriteEndElement(); break; case "ARRAY": - // LLSDArray arrayObject = obj as LLSDArray; + // OSDArray arrayObject = obj as OSDArray; // ArrayList a = arrayObject.Array; ArrayList a = (ArrayList) obj.GetType().GetField("Array").GetValue(obj); if (a != null) @@ -101,7 +101,7 @@ namespace OpenSim.Framework.Communications.Capabilities writer.WriteStartElement(String.Empty, "array", String.Empty); foreach (object item in a) { - SerializeLLSDType(writer, item); + SerializeOSDType(writer, item); } writer.WriteEndElement(); } @@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications.Capabilities { LLSD.LLSDWriteOne(writer, obj); //OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement( - // writer, OpenMetaverse.StructuredData.LLSD.FromObject(obj)); + // writer, OpenMetaverse.StructuredData.OSD.FromObject(obj)); } } - public static object DeserialiseLLSDMap(Hashtable llsd, object obj) + public static object DeserialiseOSDMap(Hashtable llsd, object obj) { Type myType = obj.GetType(); LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); @@ -133,12 +133,12 @@ namespace OpenSim.Framework.Communications.Capabilities FieldInfo field = myType.GetField(keyName); if (field != null) { - // if (enumerator.Value is OpenMetaverse.StructuredData.LLSDMap) + // if (enumerator.Value is OpenMetaverse.StructuredData.OSDMap) if (enumerator.Value is Hashtable) { object fieldValue = field.GetValue(obj); - DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); - // DeserialiseLLSDMap((OpenMetaverse.StructuredData.LLSDMap) enumerator.Value, fieldValue); + DeserialiseOSDMap((Hashtable) enumerator.Value, fieldValue); + // DeserialiseOSDMap((OpenMetaverse.StructuredData.OSDMap) enumerator.Value, fieldValue); } else if (enumerator.Value is ArrayList) { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs index ff36821..3651513 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDInventoryItem { public UUID parent_id; @@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Capabilities public int created_at; } - [LLSDMap] + [OSDMap] public class LLSDPermissions { public UUID creator_id; @@ -61,20 +61,20 @@ namespace OpenSim.Framework.Communications.Capabilities public bool is_owner_group; } - [LLSDMap] + [OSDMap] public class LLSDSaleInfo { public int sale_price; public string sale_type; } - [LLSDMap] + [OSDMap] public class LLSDInventoryDescendents { - public LLSDArray folders = new LLSDArray(); + public OSDArray folders = new OSDArray(); } - [LLSDMap] + [OSDMap] public class LLSDFetchInventoryDescendents { public UUID folder_id; @@ -84,13 +84,13 @@ namespace OpenSim.Framework.Communications.Capabilities public bool fetch_items; } - [LLSDMap] + [OSDMap] public class LLSDInventoryFolderContents { public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-" public int descendents; public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names - public LLSDArray items = new LLSDArray(); + public OSDArray items = new OSDArray(); public UUID owner___id; // and of course we can't have field names with "-" in public int version; } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs index c147bd3..4568732 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDItemUpdate { public UUID item_id; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs index fc381e4..356fa5e 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs @@ -30,7 +30,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { [LLSDType("MAP")] - public class LLSDMapLayer + public class OSDMapLayer { public int Left = 0; public int Right = 0; @@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities public int Bottom = 0; public UUID ImageID = UUID.Zero; - public LLSDMapLayer() + public OSDMapLayer() { } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs index 7dabbec..26815f9 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs @@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities public class LLSDMapLayerResponse { public LLSDMapRequest AgentData = new LLSDMapRequest(); - public LLSDArray LayerData = new LLSDArray(); + public OSDArray LayerData = new OSDArray(); public LLSDMapLayerResponse() { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs index c045dcf..829a2a9 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs @@ -30,7 +30,7 @@ using System.Collections; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDParcelVoiceInfoResponse { public int parcel_local_id; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 7fcbb81..c68a205 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs @@ -53,12 +53,12 @@ namespace OpenSim.Framework.Communications.Capabilities //string requestBody = streamReader.ReadToEnd(); //streamReader.Close(); - // OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap) + // OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap) // OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); TRequest llsdRequest = new TRequest(); - LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); + LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest); TResponse response = m_method(llsdRequest); diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs index b34cbf9..bcea657 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDTaskInventoryUploadComplete { /// diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs index 730e95b..7401768 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDTaskScriptUpdate { /// diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs index 181a465..949e119 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs @@ -46,9 +46,9 @@ namespace OpenSim.Framework.Communications.Capabilities } [AttributeUsage(AttributeTargets.Class)] - public class LLSDMap : LLSDType + public class OSDMap : LLSDType { - public LLSDMap() : base("MAP") + public OSDMap() : base("MAP") { } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs index 8143233..6cd5ee3 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs @@ -28,7 +28,7 @@ namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDVoiceAccountResponse { public string username; diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index b2565b1..867e9e6 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs @@ -201,17 +201,17 @@ namespace OpenSim.Framework.Communications return (xmlRpcResponse); } - public LLSD GenerateFailureResponseLLSD(string reason, string message, string login) + public OSD GenerateFailureResponseLLSD(string reason, string message, string login) { - LLSDMap map = new LLSDMap(); + OSDMap map = new OSDMap(); // Ensure Login Failed message/reason; ErrorMessage = message; ErrorReason = reason; - map["reason"] = LLSD.FromString(ErrorReason); - map["message"] = LLSD.FromString(ErrorMessage); - map["login"] = LLSD.FromString(login); + map["reason"] = OSD.FromString(ErrorReason); + map["message"] = OSD.FromString(ErrorMessage); + map["login"] = OSD.FromString(login); return map; } @@ -221,7 +221,7 @@ namespace OpenSim.Framework.Communications return (CreateLoginFailedResponse()); } - public LLSD CreateFailedResponseLLSD() + public OSD CreateFailedResponseLLSD() { return CreateLoginFailedResponseLLSD(); } @@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateLoginFailedResponseLLSD() + public OSD CreateLoginFailedResponseLLSD() { return GenerateFailureResponseLLSD( "key", @@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateAlreadyLoggedInResponseLLSD() + public OSD CreateAlreadyLoggedInResponseLLSD() { return GenerateFailureResponseLLSD( "presence", @@ -283,7 +283,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateLoginBlockedResponseLLSD() + public OSD CreateLoginBlockedResponseLLSD() { return GenerateFailureResponseLLSD( "presence", @@ -299,7 +299,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateDeadRegionResponseLLSD() + public OSD CreateDeadRegionResponseLLSD() { return GenerateFailureResponseLLSD( "key", @@ -315,7 +315,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateGridErrorResponseLLSD() + public OSD CreateGridErrorResponseLLSD() { return GenerateFailureResponseLLSD( "key", @@ -404,90 +404,90 @@ namespace OpenSim.Framework.Communications } } - public LLSD ToLLSDResponse() + public OSD ToLLSDResponse() { try { - LLSDMap map = new LLSDMap(); + OSDMap map = new OSDMap(); - map["first_name"] = LLSD.FromString(Firstname); - map["last_name"] = LLSD.FromString(Lastname); - map["agent_access"] = LLSD.FromString(agentAccess); + map["first_name"] = OSD.FromString(Firstname); + map["last_name"] = OSD.FromString(Lastname); + map["agent_access"] = OSD.FromString(agentAccess); - map["sim_port"] = LLSD.FromInteger(SimPort); - map["sim_ip"] = LLSD.FromString(SimAddress); + map["sim_port"] = OSD.FromInteger(SimPort); + map["sim_ip"] = OSD.FromString(SimAddress); - map["agent_id"] = LLSD.FromUUID(AgentID); - map["session_id"] = LLSD.FromUUID(SessionID); - map["secure_session_id"] = LLSD.FromUUID(SecureSessionID); - map["circuit_code"] = LLSD.FromInteger(CircuitCode); - map["seconds_since_epoch"] = LLSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds); + map["agent_id"] = OSD.FromUUID(AgentID); + map["session_id"] = OSD.FromUUID(SessionID); + map["secure_session_id"] = OSD.FromUUID(SecureSessionID); + map["circuit_code"] = OSD.FromInteger(CircuitCode); + map["seconds_since_epoch"] = OSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds); #region Login Flags - LLSDMap loginFlagsLLSD = new LLSDMap(); - loginFlagsLLSD["daylight_savings"] = LLSD.FromString(DST); - loginFlagsLLSD["stipend_since_login"] = LLSD.FromString(StipendSinceLogin); - loginFlagsLLSD["gendered"] = LLSD.FromString(Gendered); - loginFlagsLLSD["ever_logged_in"] = LLSD.FromString(EverLoggedIn); - map["login-flags"] = WrapLLSDMap(loginFlagsLLSD); + OSDMap loginFlagsLLSD = new OSDMap(); + loginFlagsLLSD["daylight_savings"] = OSD.FromString(DST); + loginFlagsLLSD["stipend_since_login"] = OSD.FromString(StipendSinceLogin); + loginFlagsLLSD["gendered"] = OSD.FromString(Gendered); + loginFlagsLLSD["ever_logged_in"] = OSD.FromString(EverLoggedIn); + map["login-flags"] = WrapOSDMap(loginFlagsLLSD); #endregion Login Flags #region Global Textures - LLSDMap globalTexturesLLSD = new LLSDMap(); - globalTexturesLLSD["sun_texture_id"] = LLSD.FromString(SunTexture); - globalTexturesLLSD["cloud_texture_id"] = LLSD.FromString(CloudTexture); - globalTexturesLLSD["moon_texture_id"] = LLSD.FromString(MoonTexture); + OSDMap globalTexturesLLSD = new OSDMap(); + globalTexturesLLSD["sun_texture_id"] = OSD.FromString(SunTexture); + globalTexturesLLSD["cloud_texture_id"] = OSD.FromString(CloudTexture); + globalTexturesLLSD["moon_texture_id"] = OSD.FromString(MoonTexture); - map["global-textures"] = WrapLLSDMap(globalTexturesLLSD); + map["global-textures"] = WrapOSDMap(globalTexturesLLSD); #endregion Global Textures - map["seed_capability"] = LLSD.FromString(seedCapability); + map["seed_capability"] = OSD.FromString(seedCapability); - map["event_categories"] = ArrayListToLLSDArray(eventCategories); - //map["event_notifications"] = new LLSDArray(); // todo - map["classified_categories"] = ArrayListToLLSDArray(classifiedCategories); + map["event_categories"] = ArrayListToOSDArray(eventCategories); + //map["event_notifications"] = new OSDArray(); // todo + map["classified_categories"] = ArrayListToOSDArray(classifiedCategories); #region UI Config - LLSDMap uiConfigLLSD = new LLSDMap(); - uiConfigLLSD["allow_first_life"] = LLSD.FromString(allowFirstLife); - map["ui-config"] = WrapLLSDMap(uiConfigLLSD); + OSDMap uiConfigLLSD = new OSDMap(); + uiConfigLLSD["allow_first_life"] = OSD.FromString(allowFirstLife); + map["ui-config"] = WrapOSDMap(uiConfigLLSD); #endregion UI Config #region Inventory - map["inventory-skeleton"] = ArrayListToLLSDArray(agentInventory); + map["inventory-skeleton"] = ArrayListToOSDArray(agentInventory); - map["inventory-skel-lib"] = ArrayListToLLSDArray(inventoryLibrary); - map["inventory-root"] = ArrayListToLLSDArray(inventoryRoot); ; - map["inventory-lib-root"] = ArrayListToLLSDArray(inventoryLibRoot); - map["inventory-lib-owner"] = ArrayListToLLSDArray(inventoryLibraryOwner); + map["inventory-skel-lib"] = ArrayListToOSDArray(inventoryLibrary); + map["inventory-root"] = ArrayListToOSDArray(inventoryRoot); ; + map["inventory-lib-root"] = ArrayListToOSDArray(inventoryLibRoot); + map["inventory-lib-owner"] = ArrayListToOSDArray(inventoryLibraryOwner); #endregion Inventory - map["gestures"] = ArrayListToLLSDArray(activeGestures); + map["gestures"] = ArrayListToOSDArray(activeGestures); - map["initial-outfit"] = ArrayListToLLSDArray(initialOutfit); - map["start_location"] = LLSD.FromString(startLocation); + map["initial-outfit"] = ArrayListToOSDArray(initialOutfit); + map["start_location"] = OSD.FromString(startLocation); - map["seed_capability"] = LLSD.FromString(seedCapability); - map["home"] = LLSD.FromString(home); - map["look_at"] = LLSD.FromString(lookAt); - map["message"] = LLSD.FromString(welcomeMessage); - map["region_x"] = LLSD.FromInteger(RegionX * Constants.RegionSize); - map["region_y"] = LLSD.FromInteger(RegionY * Constants.RegionSize); + map["seed_capability"] = OSD.FromString(seedCapability); + map["home"] = OSD.FromString(home); + map["look_at"] = OSD.FromString(lookAt); + map["message"] = OSD.FromString(welcomeMessage); + map["region_x"] = OSD.FromInteger(RegionX * Constants.RegionSize); + map["region_y"] = OSD.FromInteger(RegionY * Constants.RegionSize); if (m_buddyList != null) { - map["buddy-list"] = ArrayListToLLSDArray(m_buddyList.ToArray()); + map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); } - map["login"] = LLSD.FromString("true"); + map["login"] = OSD.FromString("true"); return map; } @@ -499,24 +499,24 @@ namespace OpenSim.Framework.Communications } } - public LLSDArray ArrayListToLLSDArray(ArrayList arrlst) + public OSDArray ArrayListToOSDArray(ArrayList arrlst) { - LLSDArray llsdBack = new LLSDArray(); + OSDArray llsdBack = new OSDArray(); foreach (Hashtable ht in arrlst) { - LLSDMap mp = new LLSDMap(); + OSDMap mp = new OSDMap(); foreach (DictionaryEntry deHt in ht) { - mp.Add((string)deHt.Key, LLSDString.FromObject(deHt.Value)); + mp.Add((string)deHt.Key, OSDString.FromObject(deHt.Value)); } llsdBack.Add(mp); } return llsdBack; } - private static LLSDArray WrapLLSDMap(LLSDMap wrapMe) + private static OSDArray WrapOSDMap(OSDMap wrapMe) { - LLSDArray array = new LLSDArray(); + OSDArray array = new OSDArray(); array.Add(wrapMe); return array; } diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 7a657b5..c569a71 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -321,7 +321,7 @@ namespace OpenSim.Framework.Communications /// /// The LLSD request /// The response to send - public LLSD LLSDLoginMethod(LLSD request) + public OSD LLSDLoginMethod(OSD request) { // Temporary fix m_loginMutex.WaitOne(); @@ -335,9 +335,9 @@ namespace OpenSim.Framework.Communications UserProfileData userProfile = null; LoginResponse logResponse = new LoginResponse(); - if (request.Type == LLSDType.Map) + if (request.Type == OSDType.Map) { - LLSDMap map = (LLSDMap)request; + OSDMap map = (OSDMap)request; if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd")) { @@ -749,7 +749,7 @@ namespace OpenSim.Framework.Communications m_userManager.CreateAgent(profile, request); } - public void CreateAgent(UserProfileData profile, LLSD request) + public void CreateAgent(UserProfileData profile, OSD request) { m_userManager.CreateAgent(profile, request); } diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 7189eee..4b5d2bb 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -448,7 +448,7 @@ namespace OpenSim.Framework.Communications profile.CurrentAgent = agent; } - public void CreateAgent(UserProfileData profile, LLSD request) + public void CreateAgent(UserProfileData profile, OSD request) { UserAgentData agent = new UserAgentData(); diff --git a/OpenSim/Framework/Location.cs b/OpenSim/Framework/Location.cs index f67543a..aed2b87 100644 --- a/OpenSim/Framework/Location.cs +++ b/OpenSim/Framework/Location.cs @@ -50,7 +50,7 @@ namespace OpenSim.Framework public ulong RegionHandle { - get { return Helpers.UIntsToLong((uint) m_x, (uint) m_y); } + get { return Utils.UIntsToLong((uint)m_x, (uint)m_y); } } public int X diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index cd50e9e..adb55aa 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -874,7 +874,7 @@ namespace OpenSim.Framework for (int k = 0; k < extraParamCount; k++) { - ushort epType = Helpers.BytesToUInt16(data, i); + ushort epType = Utils.BytesToUInt16(data, i); i += 2; // uint paramLength = Helpers.BytesToUIntBig(data, i); @@ -1014,9 +1014,9 @@ namespace OpenSim.Framework _lightColorG = lColor.G; _lightColorB = lColor.B; - _lightRadius = Helpers.BytesToFloat(data, pos + 4); - _lightCutoff = Helpers.BytesToFloat(data, pos + 8); - _lightFalloff = Helpers.BytesToFloat(data, pos + 12); + _lightRadius = Utils.BytesToFloat(data, pos + 4); + _lightCutoff = Utils.BytesToFloat(data, pos + 8); + _lightFalloff = Utils.BytesToFloat(data, pos + 12); } else { @@ -1040,9 +1040,9 @@ namespace OpenSim.Framework Color4 tmpColor = new Color4(_lightColorR,_lightColorG,_lightColorB,_lightIntensity); tmpColor.GetBytes().CopyTo(data, 0); - Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4); - Helpers.FloatToBytes(_lightCutoff).CopyTo(data, 8); - Helpers.FloatToBytes(_lightFalloff).CopyTo(data, 12); + Utils.FloatToBytes(_lightRadius).CopyTo(data, 4); + Utils.FloatToBytes(_lightCutoff).CopyTo(data, 8); + Utils.FloatToBytes(_lightFalloff).CopyTo(data, 12); return data; } diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 1a54d60..0724e8c 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -692,8 +692,8 @@ namespace OpenSim.Framework.Servers //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody); response.KeepAlive = true; - LLSD llsdRequest = null; - LLSD llsdResponse = null; + OSD llsdRequest = null; + OSD llsdResponse = null; bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest")); @@ -704,7 +704,7 @@ namespace OpenSim.Framework.Servers } try { - llsdRequest = LLSDParser.DeserializeXml(requestBody); + llsdRequest = OSDParser.DeserializeLLSDXml(requestBody); } catch (Exception ex) { @@ -756,7 +756,7 @@ namespace OpenSim.Framework.Servers { response.ContentType = "application/llsd+xml"; //m_log.Info("[Debug BASE HTTP SERVER]: Response: " + llsdResponse.ToString()); - buffer = LLSDParser.SerializeXmlBytes(llsdResponse); + buffer = OSDParser.SerializeLLSDXmlBytes(llsdResponse); } response.SendChunked = false; response.ContentLength64 = buffer.Length; @@ -948,12 +948,12 @@ namespace OpenSim.Framework.Servers } } - private LLSDMap GenerateNoLLSDHandlerResponse() + private OSDMap GenerateNoLLSDHandlerResponse() { - LLSDMap map = new LLSDMap(); - map["reason"] = LLSD.FromString("LLSDRequest"); - map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); - map["login"] = LLSD.FromString("false"); + OSDMap map = new OSDMap(); + map["reason"] = OSD.FromString("LLSDRequest"); + map["message"] = OSD.FromString("No handler registered for LLSD Requests"); + map["login"] = OSD.FromString("false"); return map; } /// diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 1281335..302640b 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -341,8 +341,7 @@ namespace OpenSim.Framework.Servers public virtual void Show(string[] showParams) { switch (showParams[0]) - { - + { case "info": Notice("Version: " + m_version); Notice("Startup directory: " + m_startupDirectory); @@ -350,9 +349,7 @@ namespace OpenSim.Framework.Servers case "stats": if (m_stats != null) - { Notice(m_stats.Report()); - } break; case "threads": diff --git a/OpenSim/Framework/Servers/LLSDMethod.cs b/OpenSim/Framework/Servers/LLSDMethod.cs index 6a39544..693d298 100644 --- a/OpenSim/Framework/Servers/LLSDMethod.cs +++ b/OpenSim/Framework/Servers/LLSDMethod.cs @@ -29,6 +29,6 @@ using OpenMetaverse.StructuredData; namespace OpenSim.Framework.Servers { - public delegate LLSD LLSDMethod( string path, LLSD request, string endpoint ); - public delegate LLSD DefaultLLSDMethod(LLSD request); + public delegate OSD LLSDMethod( string path, OSD request, string endpoint ); + public delegate OSD DefaultLLSDMethod(OSD request); } diff --git a/OpenSim/Framework/Servers/LLSDMethodString.cs b/OpenSim/Framework/Servers/LLSDMethodString.cs index e15b621..77fc290 100644 --- a/OpenSim/Framework/Servers/LLSDMethodString.cs +++ b/OpenSim/Framework/Servers/LLSDMethodString.cs @@ -29,5 +29,5 @@ using OpenMetaverse.StructuredData; namespace OpenSim.Framework.Servers { - public delegate LLSD LLSDMethodString(LLSD request, string thePath); + public delegate OSD LLSDMethodString(OSD request, string thePath); } diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index d12ad40..b6f309d 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs @@ -156,7 +156,7 @@ namespace OpenSim.Framework /// public virtual ulong HomeRegion { - get { return Helpers.UIntsToLong((_homeRegionX * (uint) Constants.RegionSize), (_homeRegionY * (uint) Constants.RegionSize)); } + get { return Utils.UIntsToLong((_homeRegionX * (uint)Constants.RegionSize), (_homeRegionY * (uint)Constants.RegionSize)); } set { _homeRegionX = (uint) (value >> 40); diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index f72797f..f0ad1d5 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -185,7 +185,7 @@ namespace OpenSim.Framework public static ulong UIntsToLong(uint X, uint Y) { - return Helpers.UIntsToLong(X, Y); + return Utils.UIntsToLong(X, Y); } public static T Clamp(T x, T min, T max) @@ -783,9 +783,9 @@ namespace OpenSim.Framework public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y) { byte[] bytes = parcelID.GetBytes(); - regionHandle = Helpers.BytesToUInt64(bytes); - x = Helpers.BytesToUInt(bytes, 8); - y = Helpers.BytesToUInt(bytes, 12); + regionHandle = Utils.BytesToUInt64(bytes); + x = Utils.BytesToUInt(bytes, 8); + y = Utils.BytesToUInt(bytes, 12); } public static void FakeParcelIDToGlobalPosition(UUID parcelID, out uint x, out uint y) @@ -794,7 +794,7 @@ namespace OpenSim.Framework uint rx, ry; ParseFakeParcelID(parcelID, out regionHandle, out x, out y); - Helpers.LongToUInts(regionHandle, out rx, out ry); + Utils.LongToUInts(regionHandle, out rx, out ry); x += rx; y += ry; diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 32b7554..9ab0413 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -582,12 +582,12 @@ namespace OpenSim.Grid.GridServer { if ( GetRegion( - Helpers.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize), + Utils.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize), (uint)(sim.regionLocY + y) * Constants.RegionSize)) != null) { neighbour = GetRegion( - Helpers.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize), + Utils.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize), (uint)(sim.regionLocY + y) * Constants.RegionSize)); NeighbourBlock = new Hashtable(); @@ -675,7 +675,7 @@ namespace OpenSim.Grid.GridServer } catch (KeyNotFoundException) { } - sim.regionHandle = Helpers.UIntsToLong((sim.regionLocX * Constants.RegionSize), (sim.regionLocY * Constants.RegionSize)); + sim.regionHandle = Utils.UIntsToLong((sim.regionLocX * Constants.RegionSize), (sim.regionLocY * Constants.RegionSize)); sim.serverURI = (string)requestData["server_uri"]; sim.httpServerURI = "http://" + sim.serverIP + ":" + sim.httpPort + "/"; @@ -894,7 +894,7 @@ namespace OpenSim.Grid.GridServer { for (int y = ymin; y < ymax + 1; y++) { - ulong regHandle = Helpers.UIntsToLong((uint)(x * Constants.RegionSize), (uint)(y * Constants.RegionSize)); + ulong regHandle = Utils.UIntsToLong((uint)(x * Constants.RegionSize), (uint)(y * Constants.RegionSize)); simProfile = GetRegion(regHandle); if (simProfile != null) { @@ -1124,12 +1124,12 @@ namespace OpenSim.Grid.GridServer case "region_locx": theSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); - theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize)); + theSim.regionHandle = Utils.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize)); break; case "region_locy": theSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); - theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize)); + theSim.regionHandle = Utils.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize)); break; } } diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index b4a0c21..1f04865 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -484,7 +484,7 @@ namespace OpenSim.Grid.MessagingServer regionProfile = new RegionProfileData(); regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]); regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/"; - regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); + regionProfile.regionHandle = Utils.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); regionProfile.regionLocX = regX; regionProfile.regionLocY = regY; diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index aa3cd85..4a4dcd8 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3889,7 +3889,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { uint regionX; uint regionY; - Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); + Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX; locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY; locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter)); @@ -7174,7 +7174,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Transfer.TransferInfo.Params = new byte[20]; Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); int assType = req.AssetInf.Type; - Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); + Array.Copy(Utils.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); } else if (req.AssetRequestSource == 3) { diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs index 8030b59..878aa4b 100644 --- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs +++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.DataSnapshot { //Very static for now, flexible enough to add new formats LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse(); - llsd_response.snapshot_resources = new LLSDArray(); + llsd_response.snapshot_resources = new OSDArray(); LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL(); llsd_dataurl.snapshot_format = "os-datasnapshot-v1"; diff --git a/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs b/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs index e1d7ac3..73e41ee 100644 --- a/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs +++ b/OpenSim/Region/DataSnapshot/LLSDDiscovery.cs @@ -30,13 +30,13 @@ using OpenSim.Framework.Communications.Capabilities; namespace OpenSim.Region.DataSnapshot { - [LLSDMap] + [OSDMap] public class LLSDDiscoveryResponse { - public LLSDArray snapshot_resources; + public OSDArray snapshot_resources; } - [LLSDMap] + [OSDMap] public class LLSDDiscoveryDataURL { public string snapshot_format; diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs index 2f9a691..5b6c2a6 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer { // for now (testing) we only support files under 1000 bytes byte[] transferData = new byte[Data.Length + 4]; - Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); + Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); Array.Copy(Data, 0, transferData, 4, Data.Length); Client.SendXferPacket(XferID, 0 + 0x80000000, transferData); @@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer else { byte[] transferData = new byte[1000 + 4]; - Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); + Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); Array.Copy(Data, 0, transferData, 4, 1000); Client.SendXferPacket(XferID, 0, transferData); Packet++; diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs index c532ac0..3fc8005 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs @@ -44,18 +44,18 @@ using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Interfaces; using OpenSim.Region.Environment.Scenes; -using LLSD = OpenMetaverse.StructuredData.LLSD; -using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; -using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; +using OSD = OpenMetaverse.StructuredData.OSD; +using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using OSDArray = OpenMetaverse.StructuredData.OSDArray; using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue; +using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue; namespace OpenSim.Region.Environment.Modules.Framework { public struct QueueItem { public int id; - public LLSDMap body; + public OSDMap body; } public class EventQueueGetModule : IEventQueue, IRegionModule @@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules.Framework #region IEventQueue Members - public bool Enqueue(LLSD ev, UUID avatarID) + public bool Enqueue(OSD ev, UUID avatarID) { m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); try @@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Framework // } BlockingLLSDQueue queue = GetQueue(agentID); - LLSD element = queue.Dequeue(15000); // 15s timeout + OSD element = queue.Dequeue(15000); // 15s timeout Hashtable responsedata = new Hashtable(); @@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.Framework - LLSDArray array = new LLSDArray(); + OSDArray array = new OSDArray(); if (element == null) // didn't have an event in 15s { // 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 } } - LLSDMap events = new LLSDMap(); + OSDMap events = new OSDMap(); events.Add("events", array); - events.Add("id", new LLSDInteger(thisID)); + events.Add("id", new OSDInteger(thisID)); lock (m_ids) { m_ids[agentID] = thisID + 1; @@ -366,7 +366,7 @@ namespace OpenSim.Region.Environment.Modules.Framework responsedata["int_response_code"] = 200; responsedata["content_type"] = "application/xml"; responsedata["keepalive"] = false; - responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); + responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); return responsedata; @@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Modules.Framework } - public LLSD EventQueueFallBack(string path, LLSD request, string endpoint) + public OSD EventQueueFallBack(string path, OSD request, string endpoint) { // This is a fallback element to keep the client from loosing EventQueueGet // Why does CAPS fail sometimes!? @@ -473,7 +473,7 @@ namespace OpenSim.Region.Environment.Modules.Framework thisID = m_ids[AvatarID]; BlockingLLSDQueue queue = GetQueue(AvatarID); - LLSDArray array = new LLSDArray(); + OSDArray array = new OSDArray(); LLSD element = queue.Dequeue(15000); // 15s timeout if (element == null) { @@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Framework thisID++; } } - LLSDMap events = new LLSDMap(); + OSDMap events = new OSDMap(); events.Add("events", array); events.Add("id", new LLSDInteger(thisID)); @@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Framework { //return new LLSD(); } - return new LLSDString("shutdown404!"); + return new OSDString("shutdown404!"); } } } diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs index 0d0eed2..21be82a 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs @@ -52,70 +52,70 @@ namespace OpenSim.Region.Environment }; } - public static LLSD buildEvent(string eventName, LLSD eventBody) + public static OSD buildEvent(string eventName, OSD eventBody) { - LLSDMap llsdEvent = new LLSDMap(2); - llsdEvent.Add("message", new LLSDString(eventName)); + OSDMap llsdEvent = new OSDMap(2); + llsdEvent.Add("message", new OSDString(eventName)); llsdEvent.Add("body", eventBody); return llsdEvent; } - public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint) + public static OSD EnableSimulator(ulong Handle, IPEndPoint endPoint) { - LLSDMap llsdSimInfo = new LLSDMap(3); + OSDMap llsdSimInfo = new OSDMap(3); - llsdSimInfo.Add("Handle", new LLSDBinary(regionHandleToByteArray(Handle))); - llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes())); - llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port)); + llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle))); + llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); + llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); - LLSDArray arr = new LLSDArray(1); + OSDArray arr = new OSDArray(1); arr.Add(llsdSimInfo); - LLSDMap llsdBody = new LLSDMap(1); + OSDMap llsdBody = new OSDMap(1); llsdBody.Add("SimulatorInfo", arr); return buildEvent("EnableSimulator", llsdBody); } - public static LLSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, + public static OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL, UUID AgentID, UUID SessionID) { - LLSDArray LookAtArr = new LLSDArray(3); - LookAtArr.Add(LLSD.FromReal(lookAt.X)); - LookAtArr.Add(LLSD.FromReal(lookAt.Y)); - LookAtArr.Add(LLSD.FromReal(lookAt.Z)); + OSDArray LookAtArr = new OSDArray(3); + LookAtArr.Add(OSD.FromReal(lookAt.X)); + LookAtArr.Add(OSD.FromReal(lookAt.Y)); + LookAtArr.Add(OSD.FromReal(lookAt.Z)); - LLSDArray PositionArr = new LLSDArray(3); - PositionArr.Add(LLSD.FromReal(pos.X)); - PositionArr.Add(LLSD.FromReal(pos.Y)); - PositionArr.Add(LLSD.FromReal(pos.Z)); + OSDArray PositionArr = new OSDArray(3); + PositionArr.Add(OSD.FromReal(pos.X)); + PositionArr.Add(OSD.FromReal(pos.Y)); + PositionArr.Add(OSD.FromReal(pos.Z)); - LLSDMap InfoMap = new LLSDMap(2); + OSDMap InfoMap = new OSDMap(2); InfoMap.Add("LookAt", LookAtArr); InfoMap.Add("Position", PositionArr); - LLSDArray InfoArr = new LLSDArray(1); + OSDArray InfoArr = new OSDArray(1); InfoArr.Add(InfoMap); - LLSDMap AgentDataMap = new LLSDMap(2); - AgentDataMap.Add("AgentID", LLSD.FromUUID(AgentID)); - AgentDataMap.Add("SessionID", LLSD.FromUUID(SessionID)); + OSDMap AgentDataMap = new OSDMap(2); + AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID)); + AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID)); - LLSDArray AgentDataArr = new LLSDArray(1); + OSDArray AgentDataArr = new OSDArray(1); AgentDataArr.Add(AgentDataMap); - LLSDMap RegionDataMap = new LLSDMap(4); - RegionDataMap.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(Handle))); - RegionDataMap.Add("SeedCapability", LLSD.FromString(capsURL)); - RegionDataMap.Add("SimIP", LLSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); - RegionDataMap.Add("SimPort", LLSD.FromInteger(newRegionExternalEndPoint.Port)); + OSDMap RegionDataMap = new OSDMap(4); + RegionDataMap.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(Handle))); + RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL)); + RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); + RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port)); - LLSDArray RegionDataArr = new LLSDArray(1); + OSDArray RegionDataArr = new OSDArray(1); RegionDataArr.Add(RegionDataMap); - LLSDMap llsdBody = new LLSDMap(3); + OSDMap llsdBody = new OSDMap(3); llsdBody.Add("Info", InfoArr); llsdBody.Add("AgentData", AgentDataArr); llsdBody.Add("RegionData", RegionDataArr); @@ -123,49 +123,49 @@ namespace OpenSim.Region.Environment return buildEvent("CrossedRegion", llsdBody); } - public static LLSD TeleportFinishEvent( + public static OSD TeleportFinishEvent( ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID AgentID) { - LLSDMap info = new LLSDMap(); - info.Add("AgentID", LLSD.FromUUID(AgentID)); - info.Add("LocationID", LLSD.FromInteger(4)); // TODO what is this? - info.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(regionHandle))); - info.Add("SeedCapability", LLSD.FromString(capsURL)); - info.Add("SimAccess", LLSD.FromInteger(simAccess)); - info.Add("SimIP", LLSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); - info.Add("SimPort", LLSD.FromInteger(regionExternalEndPoint.Port)); - info.Add("TeleportFlags", LLSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation - - LLSDArray infoArr = new LLSDArray(); + OSDMap info = new OSDMap(); + info.Add("AgentID", OSD.FromUUID(AgentID)); + info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? + info.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(regionHandle))); + info.Add("SeedCapability", OSD.FromString(capsURL)); + info.Add("SimAccess", OSD.FromInteger(simAccess)); + info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); + info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); + info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation + + OSDArray infoArr = new OSDArray(); infoArr.Add(info); - LLSDMap body = new LLSDMap(); + OSDMap body = new OSDMap(); body.Add("Info", infoArr); return buildEvent("TeleportFinish", body); } - public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) + public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) { - LLSDMap script = new LLSDMap(); - script.Add("ObjectID", LLSD.FromUUID(objectID)); - script.Add("ItemID", LLSD.FromUUID(itemID)); - script.Add("Running", LLSD.FromBoolean(running)); - script.Add("Mono", LLSD.FromBoolean(mono)); + OSDMap script = new OSDMap(); + script.Add("ObjectID", OSD.FromUUID(objectID)); + script.Add("ItemID", OSD.FromUUID(itemID)); + script.Add("Running", OSD.FromBoolean(running)); + script.Add("Mono", OSD.FromBoolean(mono)); - LLSDArray scriptArr = new LLSDArray(); + OSDArray scriptArr = new OSDArray(); scriptArr.Add(script); - LLSDMap body = new LLSDMap(); + OSDMap body = new OSDMap(); body.Add("Script", scriptArr); return buildEvent("ScriptRunningReply", body); } - public static LLSD KeepAliveEvent() + public static OSD KeepAliveEvent() { - return buildEvent("FAKEEVENT", new LLSDMap()); + return buildEvent("FAKEEVENT", new OSDMap()); } } } diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index 5b06408..1c86c2f 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs @@ -46,9 +46,9 @@ using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using LLSD = OpenMetaverse.StructuredData.LLSD; -using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; -using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; +using OSD = OpenMetaverse.StructuredData.OSD; +using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using OSDArray = OpenMetaverse.StructuredData.OSDArray; namespace OpenSim.Region.Environment.Modules.InterGrid { @@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid #endregion - public LLSD ProcessRegionDomainSeed(string path, LLSD request, string endpoint) + public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint) { string[] pathSegments = path.Split('/'); @@ -234,11 +234,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]); - //return new LLSDMap(); + //return new OSDMap(); } - public LLSD ProcessAgentDomainMessage(string path, LLSD request, string endpoint) + public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint) { // /agent/* @@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //return null; } - private LLSD GenerateRezAvatarRequestMessage(string regionname) + private OSD GenerateRezAvatarRequestMessage(string regionname) { Scene region = null; bool usedroot = false; @@ -319,7 +319,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid RegionInfo reg = region.RegionInfo; - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); string rezHttpProtocol = "http://"; //string regionCapsHttpProtocol = "http://"; string httpaddr = reg.ExternalHostName; @@ -347,9 +347,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid httpaddr = httpsCN; } - responseMap["connect"] = LLSD.FromBoolean(true); - LLSDMap capabilitiesMap = new LLSDMap(); - capabilitiesMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); + responseMap["connect"] = OSD.FromBoolean(true); + OSDMap capabilitiesMap = new OSDMap(); + capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); responseMap["capabilities"] = capabilitiesMap; return responseMap; @@ -376,11 +376,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid } - public LLSD RequestRezAvatarMethod(string path, LLSD request) + public OSD RequestRezAvatarMethod(string path, OSD request) { //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString()); - LLSDMap requestMap = (LLSDMap)request; + OSDMap requestMap = (OSDMap)request; Scene homeScene = null; @@ -441,27 +441,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid UpdateOGPState(LocalAgentID, userState); - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); if (RemoteAgentID == UUID.Zero) { - responseMap["connect"] = LLSD.FromBoolean(false); - responseMap["message"] = LLSD.FromString("No agent ID was specified in rez_avatar/request"); + responseMap["connect"] = OSD.FromBoolean(false); + responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request"); m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body"); return responseMap; } - responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName); + responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName); // DEPRECIATED - responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); + responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); - responseMap["connect"] = LLSD.FromBoolean(true); - responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); - responseMap["region_x"] = LLSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX - responseMap["region_y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY - responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); - responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); + responseMap["connect"] = OSD.FromBoolean(true); + responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); + responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX + responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY + responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); + responseMap["sim_access"] = OSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); // Generate a dummy agent for the user so we can get back a CAPS path AgentCircuitData agentData = new AgentCircuitData(); @@ -575,14 +575,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid // DEPRECIATED - responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); + responseMap["seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); // REPLACEMENT - responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); + responseMap["region_seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); - responseMap["rez_avatar"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); - responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); - responseMap["rez_avatar/derez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); + responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); + responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); + responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); // Add the user to the list of CAPS that are outstanding. // well allow the caps hosts in this dictionary @@ -605,27 +605,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return responseMap; } - public LLSD RezAvatarMethod(string path, LLSD request) + public OSD RezAvatarMethod(string path, OSD request) { m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); AgentCircuitData userData = null; // Only people we've issued a cap can go further if (TryGetAgentCircuitData(path,out userData)) { - LLSDMap requestMap = (LLSDMap)request; + OSDMap requestMap = (OSDMap)request; // take these values to start. There's a few more UUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); UUID SessionID = requestMap["session_id"].AsUUID(); int circuitcode = requestMap["circuit_code"].AsInteger(); - LLSDArray Parameter = new LLSDArray(); + OSDArray Parameter = new OSDArray(); if (requestMap.ContainsKey("parameter")) { - Parameter = (LLSDArray)((LLSD)requestMap["parameter"]); + Parameter = (OSDArray)requestMap["parameter"]; } //int version = 1; @@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid for (int i = 0; i < Parameter.Count; i++) { - LLSDMap item = (LLSDMap)Parameter[i]; + OSDMap item = (OSDMap)Parameter[i]; // if (item.ContainsKey("version")) // { // version = item["version"].AsInteger(); @@ -714,15 +714,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid RegionInfo reg = homeScene.RegionInfo; // Dummy positional and look at info.. we don't have it. - LLSDArray PositionArray = new LLSDArray(); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(40)); + OSDArray PositionArray = new OSDArray(); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(40)); - LLSDArray LookAtArray = new LLSDArray(); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); + OSDArray LookAtArray = new OSDArray(); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); // Our region's X and Y position in OpenSimulator space. uint fooX = reg.RegionLocX; @@ -732,31 +732,31 @@ namespace OpenSim.Region.Environment.Modules.InterGrid m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID); // Convert the X and Y position to LL space - responseMap["region_x"] = LLSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X - responseMap["region_y"] = LLSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y + responseMap["region_x"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X + responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y // Give em a new seed capability - responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); - responseMap["region"] = LLSD.FromUUID(reg.originRegionID); + responseMap["seed_capability"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); + responseMap["region"] = OSD.FromUUID(reg.originRegionID); responseMap["look_at"] = LookAtArray; - responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); - responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); + responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); + responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); // DEPRECIATED - responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); + responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); - responseMap["session_id"] = LLSD.FromUUID(SessionID); - responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID); - responseMap["circuit_code"] = LLSD.FromInteger(circuitcode); + responseMap["session_id"] = OSD.FromUUID(SessionID); + responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID); + responseMap["circuit_code"] = OSD.FromInteger(circuitcode); responseMap["position"] = PositionArray; - responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); + responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); - responseMap["sim_access"] = LLSD.FromString("Mature"); + responseMap["sim_access"] = OSD.FromString("Mature"); - responseMap["connect"] = LLSD.FromBoolean(true); + responseMap["connect"] = OSD.FromBoolean(true); @@ -767,12 +767,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return responseMap; } - public LLSD DerezAvatarMethod(string path, LLSD request) + public OSD DerezAvatarMethod(string path, OSD request) { m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); //LLSD llsdResponse = null; - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); string[] PathArray = path.Split('/'); 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 OGPState userState = GetOGPState(LocalID); if (userState.agent_id != UUID.Zero) { - //LLSDMap outboundRequestMap = new LLSDMap(); - LLSDMap inboundRequestMap = (LLSDMap)request; + //OSDMap outboundRequestMap = new OSDMap(); + OSDMap inboundRequestMap = (OSDMap)request; string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); if (rezAvatarString.Length == 0) { rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString(); } - LLSDArray LookAtArray = new LLSDArray(); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); - - LLSDArray PositionArray = new LLSDArray(); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(40)); - - LLSDArray lookArray = new LLSDArray(); - lookArray.Add(LLSD.FromInteger(128)); - lookArray.Add(LLSD.FromInteger(128)); - lookArray.Add(LLSD.FromInteger(40)); - - responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up + OSDArray LookAtArray = new OSDArray(); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); + + OSDArray PositionArray = new OSDArray(); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(40)); + + OSDArray lookArray = new OSDArray(); + lookArray.Add(OSD.FromInteger(128)); + lookArray.Add(OSD.FromInteger(128)); + lookArray.Add(OSD.FromInteger(40)); + + responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up responseMap["look_at"] = LookAtArray; m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); - LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); + OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); // If invoking it returned an error, parse and end if (rezResponseMap.ContainsKey("connect")) @@ -852,34 +852,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid int rrY = rezResponseMap["region_y"].AsInteger(); m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); UUID rrRID = rezResponseMap["region_id"].AsUUID(); - LLSDArray RezResponsePositionArray = null; + OSDArray RezResponsePositionArray = null; string rrAccess = rezResponseMap["sim_access"].AsString(); if (rezResponseMap.ContainsKey("position")) { - RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; + RezResponsePositionArray = (OSDArray)rezResponseMap["position"]; } // DEPRECIATED - responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); + responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap); // REPLACEMENT r3 - responseMap["region_seed_capability"] = LLSD.FromString(rezRespSeedCap); + responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap); // DEPRECIATED - responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); + responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); - responseMap["sim_host"] = LLSD.FromString(rezRespSim_host); - responseMap["sim_port"] = LLSD.FromInteger(rrPort); - responseMap["region_x"] = LLSD.FromInteger(rrX ); - responseMap["region_y"] = LLSD.FromInteger(rrY ); - responseMap["region_id"] = LLSD.FromUUID(rrRID); - responseMap["sim_access"] = LLSD.FromString(rrAccess); + responseMap["sim_host"] = OSD.FromString(rezRespSim_host); + responseMap["sim_port"] = OSD.FromInteger(rrPort); + responseMap["region_x"] = OSD.FromInteger(rrX ); + responseMap["region_y"] = OSD.FromInteger(rrY ); + responseMap["region_id"] = OSD.FromUUID(rrRID); + responseMap["sim_access"] = OSD.FromString(rrAccess); if (RezResponsePositionArray != null) { responseMap["position"] = RezResponsePositionArray; } responseMap["look_at"] = lookArray; - responseMap["connect"] = LLSD.FromBoolean(true); + responseMap["connect"] = OSD.FromBoolean(true); ShutdownConnection(LocalID,this); // 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 //return responseMap; } - private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState) + private OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState) { Scene reg = GetRootScene(); @@ -907,38 +907,38 @@ namespace OpenSim.Region.Environment.Modules.InterGrid DeRezRequest.Method = "POST"; DeRezRequest.ContentType = "application/xml+llsd"; - LLSDMap RAMap = new LLSDMap(); - LLSDMap AgentParms = new LLSDMap(); - LLSDMap RegionParms = new LLSDMap(); - - LLSDArray Parameter = new LLSDArray(2); - - LLSDMap version = new LLSDMap(); - version["version"] = LLSD.FromInteger(userState.src_version); - Parameter.Add((LLSD)version); - - LLSDMap SrcData = new LLSDMap(); - SrcData["estate_id"] = LLSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); - SrcData["parent_estate_id"] = LLSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); - SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID); - SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent); - Parameter.Add((LLSD)SrcData); - - AgentParms["first_name"] = LLSD.FromString(userState.first_name); - AgentParms["last_name"] = LLSD.FromString(userState.last_name); - AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id); - RegionParms["region_id"] = LLSD.FromUUID(userState.region_id); - AgentParms["circuit_code"] = LLSD.FromInteger(userState.circuit_code); - AgentParms["secure_session_id"] = LLSD.FromUUID(userState.secure_session_id); - AgentParms["session_id"] = LLSD.FromUUID(userState.session_id); - AgentParms["agent_access"] = LLSD.FromBoolean(userState.agent_access); - AgentParms["god_level"] = LLSD.FromInteger(userState.god_level); - AgentParms["god_overide"] = LLSD.FromBoolean(userState.god_overide); - AgentParms["identified"] = LLSD.FromBoolean(userState.identified); - AgentParms["transacted"] = LLSD.FromBoolean(userState.transacted); - AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified); - AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate); - AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host); + OSDMap RAMap = new OSDMap(); + OSDMap AgentParms = new OSDMap(); + OSDMap RegionParms = new OSDMap(); + + OSDArray Parameter = new OSDArray(2); + + OSDMap version = new OSDMap(); + version["version"] = OSD.FromInteger(userState.src_version); + Parameter.Add(version); + + OSDMap SrcData = new OSDMap(); + SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); + SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); + SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID); + SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent); + Parameter.Add(SrcData); + + AgentParms["first_name"] = OSD.FromString(userState.first_name); + AgentParms["last_name"] = OSD.FromString(userState.last_name); + AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id); + RegionParms["region_id"] = OSD.FromUUID(userState.region_id); + AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code); + AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id); + AgentParms["session_id"] = OSD.FromUUID(userState.session_id); + AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access); + AgentParms["god_level"] = OSD.FromInteger(userState.god_level); + AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide); + AgentParms["identified"] = OSD.FromBoolean(userState.identified); + AgentParms["transacted"] = OSD.FromBoolean(userState.transacted); + AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified); + AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate); + AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host); // version 1 RAMap = AgentParms; @@ -951,11 +951,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid string RAMapString = RAMap.ToString(); m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString); - LLSD LLSDofRAMap = RAMap; // RENAME if this works + OSD LLSDofRAMap = RAMap; // RENAME if this works m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString()); //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap)); - byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); + byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer); //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump); @@ -973,7 +973,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid catch (WebException ex) { m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } @@ -997,21 +997,21 @@ namespace OpenSim.Region.Environment.Modules.InterGrid catch (WebException ex) { m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } - LLSD rezResponse = null; + OSD rezResponse = null; try { - rezResponse = LLSDParser.DeserializeXml(rez_avatar_reply); + rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply); - responseMap = (LLSDMap)rezResponse; + responseMap = (OSDMap)rezResponse; } catch (Exception ex) { m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } @@ -1019,22 +1019,22 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return responseMap; } - public LLSD GenerateNoHandlerMessage() + public OSD GenerateNoHandlerMessage() { - LLSDMap map = new LLSDMap(); - map["reason"] = LLSD.FromString("LLSDRequest"); - map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); - map["login"] = LLSD.FromString("false"); - map["connect"] = LLSD.FromString("false"); + OSDMap map = new OSDMap(); + map["reason"] = OSD.FromString("LLSDRequest"); + map["message"] = OSD.FromString("No handler registered for LLSD Requests"); + map["login"] = OSD.FromString("false"); + map["connect"] = OSD.FromString("false"); return map; } - public LLSD GenerateNoStateMessage(UUID passedAvatar) + public OSD GenerateNoStateMessage(UUID passedAvatar) { - LLSDMap map = new LLSDMap(); - map["reason"] = LLSD.FromString("derez failed"); - map["message"] = LLSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); - map["login"] = LLSD.FromString("false"); - map["connect"] = LLSD.FromString("false"); + OSDMap map = new OSDMap(); + map["reason"] = OSD.FromString("derez failed"); + map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); + map["login"] = OSD.FromString("false"); + map["connect"] = OSD.FromString("false"); return map; } private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata) diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 27c7014..197d5c2 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land List toRemove = new List(); foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) { - if (entry.Flags == (AccessList) flags) + if (entry.Flags == (AccessList)flags) { toRemove.Add(entry); } @@ -384,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry(); temp.AgentID = entry.AgentID; temp.Time = new DateTime(); //Pointless? Yes. - temp.Flags = (AccessList) flags; + temp.Flags = (AccessList)flags; if (!newData.ParcelAccessList.Contains(temp)) { diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index c51a314..8318cdc 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs @@ -48,9 +48,9 @@ using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Types; using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using LLSD = OpenMetaverse.StructuredData.LLSD; -using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; -using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; +using OSD = OpenMetaverse.StructuredData.OSD; +using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using OSDArray = OpenMetaverse.StructuredData.OSDArray; 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(GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); 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(GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); return mapResponse; } @@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap /// /// /// - protected static LLSDMapLayer GetLLSDMapLayerResponse() + protected static OSDMapLayer GetOSDMapLayerResponse() { - LLSDMapLayer mapLayer = new LLSDMapLayer(); + OSDMapLayer mapLayer = new OSDMapLayer(); 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; - Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); + Utils.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) { - LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); + OSDMap 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 LLSDMap Response for the mapitem - private void RequestMapItemsCompleted(LLSDMap response) + /// The OSDMap Response for the mapitem + private void RequestMapItemsCompleted(OSDMap 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(); - LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()]; + OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()]; for (int i = 0; i < itemarray.Count; i++) { - LLSDMap mapitem = (LLSDMap)itemarray[i]; + OSDMap mapitem = (OSDMap)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 LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, + private OSDMap 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 LLSDMap(); + return new OSDMap(); 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 LLSDMap(); + return new OSDMap(); 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"; - LLSDMap RAMap = new LLSDMap(); + OSDMap RAMap = new OSDMap(); // string RAMapString = RAMap.ToString(); - LLSD LLSDofRAMap = RAMap; // RENAME if this works + OSD LLSDofRAMap = RAMap; // RENAME if this works - byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); - LLSDMap responseMap = new LLSDMap(); - responseMap["requestID"] = LLSD.FromUUID(requestID); + byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); + OSDMap responseMap = new OSDMap(); + responseMap["requestID"] = OSD.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"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); lock (m_blacklistedurls) { if (!m_blacklistedurls.ContainsKey(httpserver)) @@ -630,12 +630,12 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } else { - return new LLSDMap(); + return new OSDMap(); } } catch (WebException) { - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); lock (m_blacklistedurls) { if (!m_blacklistedurls.ContainsKey(httpserver)) @@ -646,18 +646,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap return responseMap; } - LLSD rezResponse = null; + OSD rezResponse = null; try { - rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply); + rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply); - responseMap = (LLSDMap)rezResponse; - responseMap["requestID"] = LLSD.FromUUID(requestID); + responseMap = (OSDMap)rezResponse; + responseMap["requestID"] = OSD.FromUUID(requestID); } catch (Exception) { //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } @@ -793,57 +793,57 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap return null; } - public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint) + public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) { uint xstart = 0; uint ystart = 0; - Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); + Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); - LLSDMap responsemap = new LLSDMap(); + OSDMap responsemap = new OSDMap(); List avatars = m_scene.GetAvatars(); - LLSDArray responsearr = new LLSDArray(avatars.Count); - LLSDMap responsemapdata = new LLSDMap(); + OSDArray responsearr = new OSDArray(avatars.Count); + OSDMap responsemapdata = new OSDMap(); int tc = System.Environment.TickCount; /* foreach (ScenePresence av in avatars) { - 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); + 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); responsearr.Add(responsemapdata); } responsemap["1"] = responsearr; */ if (avatars.Count == 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); + 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); responsearr.Add(responsemapdata); responsemap["6"] = responsearr; } else { - responsearr = new LLSDArray(avatars.Count); + responsearr = new OSDArray(avatars.Count); foreach (ScenePresence av in avatars) { - 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); + 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); responsearr.Add(responsemapdata); } responsemap["6"] = responsearr; diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 3948d31..8167c68 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -36,7 +36,7 @@ using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Region.Interfaces; -using LLSD = OpenMetaverse.StructuredData.LLSD; +using OSD = OpenMetaverse.StructuredData.OSD; namespace OpenSim.Region.Environment.Scenes { @@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes IEventQueue eq = avatar.Scene.RequestModuleInterface(); if (eq != null) { - LLSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint); + OSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint); eq.Enqueue(Item, avatar.UUID); } else @@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Scenes if (eq != null) { - LLSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint, + OSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint, 4, teleportFlags, capsPath, avatar.UUID); eq.Enqueue(Item, avatar.UUID); } @@ -748,7 +748,7 @@ namespace OpenSim.Region.Environment.Scenes // and set the map-tile to '(Offline)' uint regX, regY; - Helpers.LongToUInts(regionHandle, out regX, out regY); + Utils.LongToUInts(regionHandle, out regX, out regY); MapBlockData block = new MapBlockData(); block.X = (ushort)(regX / Constants.RegionSize); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 073bccf..4209e4a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -562,11 +562,11 @@ namespace OpenSim.Region.Environment.Scenes invString.AddPermissionsStart(); - invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask)); - invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask)); - invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0)); - invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask)); - invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextPermissions)); + invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); + invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); + invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); + invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); + invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); invString.AddNameValueLine("owner_id", ownerID.ToString()); @@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Scenes invString.AddNameValueLine("asset_id", item.AssetID.ToString()); invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); - invString.AddNameValueLine("flags", Helpers.UIntToHexString(item.Flags)); + invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); invString.AddSaleStart(); invString.AddNameValueLine("sale_type", "not"); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index fa656f6..deb7f89 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1089,9 +1089,9 @@ if (m_shape != null) { data[pos] = (byte)pTexAnim.SizeX; pos++; data[pos] = (byte)pTexAnim.SizeY; pos++; - Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); - Helpers.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); - Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); + Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); + Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); + Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); m_TextureAnimation = data; } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 935c51b..3c51aa6 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -39,7 +39,7 @@ using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Types; using OpenSim.Region.Interfaces; using OpenSim.Region.Physics.Manager; -using LLSD = OpenMetaverse.StructuredData.LLSD; +using OSD = OpenMetaverse.StructuredData.OSD; namespace OpenSim.Region.Environment.Scenes @@ -2170,7 +2170,7 @@ namespace OpenSim.Region.Environment.Scenes } Vector3 vel = m_velocity; - ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); + ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); if (neighbourRegion != null && ValidateAttachments()) { @@ -2208,7 +2208,7 @@ namespace OpenSim.Region.Environment.Scenes if (eq != null) { - LLSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, + OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, capsPath, UUID, ControllingClient.SessionId); eq.Enqueue(Item, UUID); } diff --git a/OpenSim/Region/Interfaces/IEventQueue.cs b/OpenSim/Region/Interfaces/IEventQueue.cs index 42fdcae..5c327d9 100644 --- a/OpenSim/Region/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Interfaces/IEventQueue.cs @@ -36,6 +36,6 @@ namespace OpenSim.Region.Interfaces { public interface IEventQueue { - bool Enqueue(LLSD o, UUID avatarID); + bool Enqueue(OSD o, UUID avatarID); } } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs index 9cdd006..7931cb2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs @@ -29,6 +29,9 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; +using System.Security; +using System.Security.Policy; +using System.Security.Permissions; using OpenSim.Region.ScriptEngine.Interfaces; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; @@ -132,9 +135,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; - AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + AppDomainNameCount, null, ads); + + PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); + AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); + PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); + PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet); + CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement); + sandboxPolicy.RootCodeGroup = sandboxCodeGroup; + AD.SetAppDomainPolicy(sandboxPolicy); + m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain Loading: " + AssemblyName.GetAssemblyName( diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e5dfb2b..5d5e975 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -30,6 +30,7 @@ using System.IO; using System.Threading; using System.Collections; using System.Collections.Generic; +using System.Security; using System.Security.Policy; using System.Reflection; using System.Globalization; @@ -536,11 +537,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; Evidence evidence = new Evidence(baseEvidence); - m_AppDomains[appDomain] = + AppDomain sandbox = AppDomain.CreateDomain( m_Scene.RegionInfo.RegionID.ToString(), evidence, appSetup); + PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); + AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); + PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); + PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet); + CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement); + sandboxPolicy.RootCodeGroup = sandboxCodeGroup; + sandbox.SetAppDomainPolicy(sandboxPolicy); + + m_AppDomains[appDomain] = sandbox; + m_AppDomains[appDomain].AssemblyResolve += new ResolveEventHandler( AssemblyResolver.OnAssemblyResolve); diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index c04e19e..fd20a1e 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs @@ -96,7 +96,7 @@ namespace OpenSim.TestSuite client.Self.Movement.AtPos = true; Thread.Sleep(somthing.Next(25, 75)); // Makes sure the bots keep walking for this time. } - client.Self.Jump(); + client.Self.Jump(true); string randomf = talkarray[somthing.Next(talkarray.Length)]; if (talkarray.Length > 1 && randomf.Length > 1) @@ -142,7 +142,7 @@ namespace OpenSim.TestSuite m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); m_action.Start(); OnConnected(this, EventType.CONNECTED); - client.Self.Jump(); + client.Self.Jump(true); } } else diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 84987b2..862b4e8 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -96,7 +96,7 @@ namespace pCampBot client.Self.Movement.AtPos = true; Thread.Sleep(somthing.Next(25, 75)); // Makes sure the bots keep walking for this time. } - client.Self.Jump(); + client.Self.Jump(true); string randomf = talkarray[somthing.Next(talkarray.Length)]; if (talkarray.Length > 1 && randomf.Length > 1) @@ -141,7 +141,7 @@ namespace pCampBot m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); m_action.Start(); OnConnected(this, EventType.CONNECTED); - client.Self.Jump(); + client.Self.Jump(true); } } else -- cgit v1.1