From d9dffc4a9a1e561921013aa076eee70faa9b7b92 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 9 May 2008 17:23:27 +0000 Subject: From: Michael Osias Stop .net generating ambiguous operator errors when two integers are compared for equality in LSL --- .../Framework/Communications/Capabilities/Caps.cs | 20 ++++++++++++++++++++ OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 12 ++++++++++++ 2 files changed, 32 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index ad3d79d..d794db3 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -208,7 +208,15 @@ namespace OpenSim.Framework.Communications.Capabilities // FIXME: these all should probably go into the respective region // modules + + /// + /// Processes a fetch inventory request and sends the reply + /// + /// + /// + /// + /// // Request is like: // // folders @@ -255,8 +263,10 @@ namespace OpenSim.Framework.Communications.Capabilities inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); inventoryitemstr = inventoryitemstr.Replace("folders", ""); inventoryitemstr = inventoryitemstr.Replace("", ""); + response += inventoryitemstr; } + if (response.Length == 0) { // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. @@ -276,6 +286,11 @@ namespace OpenSim.Framework.Communications.Capabilities return response; } + /// + /// Construct an LLSD reply packet to a CAPS inventory request + /// + /// + /// private LLSDInventoryDescendents FetchInventoryReply(LLSDFetchInventoryDescendents invFetch) { LLSDInventoryDescendents reply = new LLSDInventoryDescendents(); @@ -333,6 +348,11 @@ namespace OpenSim.Framework.Communications.Capabilities return reply; } + /// + /// Convert an internal inventory item object into an LLSD object. + /// + /// + /// private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem) { LLSDInventoryItem llsdItem = new LLSDInventoryItem(); diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 09ab5d4..c904b1d 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -1249,6 +1249,18 @@ namespace OpenSim.Region.ScriptEngine.Common return new LSLInteger(d); } + static public bool operator ==(LSLInteger i1, LSLInteger i2) + { + bool ret = i1.value == i2.value; + return ret; + } + + static public bool operator !=(LSLInteger i1, LSLInteger i2) + { + bool ret = i1.value != i2.value; + return ret; + } + static public LSLInteger operator &(LSLInteger i1, LSLInteger i2) { int ret = i1.value & i2.value; -- cgit v1.1