From 1bd0b06ec1a0a5a7d6302d8017edcea7faf557e0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 16 Aug 2010 20:38:20 +0100
Subject: Implement Dynamic Attributes for SOP and PBS. Implement storage in
SQLite
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6720635..2a9b99e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -37,6 +37,7 @@ using System.Xml.Serialization;
using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
+using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes.Scripting;
@@ -124,6 +125,11 @@ namespace OpenSim.Region.Framework.Scenes
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ ///
+ /// Dynamic attributes can be created and deleted as required.
+ ///
+ public DynAttrsOSDMap DynAttrs { get; set; }
+
///
/// Is this a root part?
///
@@ -335,6 +341,7 @@ namespace OpenSim.Region.Framework.Scenes
m_particleSystem = Utils.EmptyBytes;
Rezzed = DateTime.UtcNow;
Description = String.Empty;
+ DynAttrs = new DynAttrsOSDMap();
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
@@ -4598,4 +4605,4 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From d3095e26493c15ce146e36fe38443722e86ac832 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 16 Aug 2010 21:31:36 +0100
Subject: Add DAExampleModule to demonstrate dynamic attributes
This module demonstrates that we can add an arbitrary persisted value to SOP without any changes to core code.
Every time the object is moved, the move record is updated and the users in the scene alerted
The number of moves is persisted over server restarts in sqlite
---
.../Framework/DynamicAttributes/DAExampleModule.cs | 98 ++++++++++++++++++++++
1 file changed, 98 insertions(+)
create mode 100644 OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
new file mode 100644
index 0000000..2aca93a
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using log4net;
+using Mono.Addins;
+using Nini.Config;
+using OpenMetaverse;
+using OpenMetaverse.Packets;
+using OpenMetaverse.StructuredData;
+using OpenSim.Framework;
+using OpenSim.Region.Framework;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+
+namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule
+{
+ [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DAExampleModule")]
+ public class DAExampleModule : INonSharedRegionModule
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ protected Scene m_scene;
+ protected IDialogModule m_dialogMod;
+
+ public string Name { get { return "DAExample Module"; } }
+ public Type ReplaceableInterface { get { return null; } }
+
+ public void Initialise(IConfigSource source) {}
+
+ public void AddRegion(Scene scene)
+ {
+ m_scene = scene;
+ m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
+ m_dialogMod = m_scene.RequestModuleInterface();
+ }
+
+ public void RemoveRegion(Scene scene)
+ {
+ m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
+ }
+
+ public void RegionLoaded(Scene scene) {}
+
+ public void Close()
+ {
+ RemoveRegion(m_scene);
+ }
+
+ protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
+ {
+ SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId);
+ OSDMap attrs = sop.DynAttrs;
+
+ lock (attrs)
+ {
+ OSDInteger newValue;
+
+ if (!attrs.ContainsKey("moves"))
+ newValue = new OSDInteger(1);
+ else
+ newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1);
+
+ attrs["moves"] = newValue;
+
+ m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue));
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
--
cgit v1.1
From a6d9c263650cc23d60f941718f87a64aa2f360b2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 16 Aug 2010 22:21:46 +0100
Subject: Encapsulate an OSDMap in DAMap (was DynAttrsOSDMap) rather than
inheriting from it
This is the easier way to give us control over locking, rather than asking that OSDMap IDictionary methods be virtual
---
.../Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs | 2 +-
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index 2aca93a..d6fb15b 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule
protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
{
SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId);
- OSDMap attrs = sop.DynAttrs;
+ DAMap attrs = sop.DynAttrs;
lock (attrs)
{
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 2a9b99e..27f3a4d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Framework.Scenes
///
/// Dynamic attributes can be created and deleted as required.
///
- public DynAttrsOSDMap DynAttrs { get; set; }
+ public DAMap DynAttrs { get; set; }
///
/// Is this a root part?
@@ -341,7 +341,7 @@ namespace OpenSim.Region.Framework.Scenes
m_particleSystem = Utils.EmptyBytes;
Rezzed = DateTime.UtcNow;
Description = String.Empty;
- DynAttrs = new DynAttrsOSDMap();
+ DynAttrs = new DAMap();
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
--
cgit v1.1
From 8b4441d940a55da90645580477ece33d15849078 Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Tue, 22 Jan 2013 08:41:32 +0200
Subject: Changed DAMap to be the container of "data stores", which are
OSDMaps. Store names must have at least 4 characters.
---
.../Framework/DynamicAttributes/DAExampleModule.cs | 25 +++++++++++-----------
1 file changed, 13 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index d6fb15b..084fb5f 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -75,22 +75,23 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule
protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
{
+ OSDMap attrs = null;
SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId);
- DAMap attrs = sop.DynAttrs;
+ if (!sop.DynAttrs.TryGetValue(Name, out attrs))
+ attrs = new OSDMap();
- lock (attrs)
- {
- OSDInteger newValue;
+ OSDInteger newValue;
- if (!attrs.ContainsKey("moves"))
- newValue = new OSDInteger(1);
- else
- newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1);
+ if (!attrs.ContainsKey("moves"))
+ newValue = new OSDInteger(1);
+ else
+ newValue = new OSDInteger(((OSDInteger)attrs["moves"]).AsInteger() + 1);
- attrs["moves"] = newValue;
-
- m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue));
- }
+ attrs["moves"] = newValue;
+
+ sop.DynAttrs[Name] = attrs;
+
+ m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue));
return true;
}
--
cgit v1.1
From af6a7cf95df76708d013932d8ef92c9bbeda0e5d Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Tue, 22 Jan 2013 11:59:20 +0200
Subject: Added DynAttrs to the serialized XML format of prims. When copying
prims, use deep copy for DynAttrs.
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 ++
.../Scenes/Serialization/SceneObjectSerializer.cs | 14 ++++++++++++++
2 files changed, 16 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 27f3a4d..189d298 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1625,6 +1625,8 @@ namespace OpenSim.Region.Framework.Scenes
Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
dupe.Shape.ExtraParams = extraP;
+ dupe.DynAttrs.CopyFrom(DynAttrs);
+
if (userExposed)
{
/*
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 2d4c60a..4a2a47e 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -359,6 +359,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound);
m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume);
m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
+ m_SOPXmlProcessors.Add("DynAttrs", ProcessDynAttrs);
m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation);
m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem);
m_SOPXmlProcessors.Add("PayPrice0", ProcessPayPrice0);
@@ -722,6 +723,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
}
+ private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader)
+ {
+ obj.DynAttrs.ReadXml(reader);
+ }
+
private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader)
{
obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty));
@@ -1235,6 +1241,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
if (sop.MediaUrl != null)
writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
+
+ if (sop.DynAttrs.Count > 0)
+ {
+ writer.WriteStartElement("DynAttrs");
+ sop.DynAttrs.WriteXml(writer);
+ writer.WriteEndElement();
+ }
+
WriteBytes(writer, "TextureAnimation", sop.TextureAnimation);
WriteBytes(writer, "ParticleSystem", sop.ParticleSystem);
writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString());
--
cgit v1.1
From 23f0610f0ce33a7308fc2c9190204b2d8882ce85 Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Tue, 22 Jan 2013 12:17:16 +0200
Subject: Disabled DAExampleModule
---
.../Framework/DynamicAttributes/DAExampleModule.cs | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index 084fb5f..d36f65a 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -45,7 +45,9 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule
public class DAExampleModule : INonSharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
+ private static readonly bool ENABLED = false; // enable for testing
+
protected Scene m_scene;
protected IDialogModule m_dialogMod;
@@ -56,14 +58,20 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DAExampleModule
public void AddRegion(Scene scene)
{
- m_scene = scene;
- m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
- m_dialogMod = m_scene.RequestModuleInterface();
+ if (ENABLED)
+ {
+ m_scene = scene;
+ m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
+ m_dialogMod = m_scene.RequestModuleInterface();
+ }
}
public void RemoveRegion(Scene scene)
{
- m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
+ if (ENABLED)
+ {
+ m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
+ }
}
public void RegionLoaded(Scene scene) {}
--
cgit v1.1
From 6daf559fb678435779d766cc4435b4ec141fb7df Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Tue, 22 Jan 2013 12:50:23 +0200
Subject: Added unit tests for Dynamic Attributes
---
.../World/Serialiser/Tests/SerialiserTests.cs | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
index bcb8e2f..b4348c9 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
@@ -35,6 +35,7 @@ using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization;
using OpenSim.Tests.Common;
+using OpenMetaverse.StructuredData;
namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
{
@@ -143,6 +144,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
None
00000000-0000-0000-0000-000000000000
0
+
@@ -331,6 +333,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
0
2147483647
None
+ MyStorelast wordsRosebud
00000000-0000-0000-0000-000000000000
@@ -359,6 +362,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
Assert.That(rootPart.UUID, Is.EqualTo(new UUID("e6a5a05e-e8cc-4816-8701-04165e335790")));
Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("a6dacf01-4636-4bb9-8a97-30609438af9d")));
Assert.That(rootPart.Name, Is.EqualTo("PrimMyRide"));
+ OSDMap store = rootPart.DynAttrs["MyStore"];
+ Assert.AreEqual(42, store["the answer"].AsInteger());
// TODO: Check other properties
}
@@ -409,6 +414,14 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
rp.CreatorID = rpCreatorId;
rp.Shape = shape;
+ string daStoreName = "MyStore";
+ string daKey = "foo";
+ string daValue = "bar";
+ OSDMap myStore = new OSDMap();
+ myStore.Add(daKey, daValue);
+ rp.DynAttrs = new DAMap();
+ rp.DynAttrs[daStoreName] = myStore;
+
SceneObjectGroup so = new SceneObjectGroup(rp);
// Need to add the object to the scene so that the request to get script state succeeds
@@ -424,6 +437,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
UUID uuid = UUID.Zero;
string name = null;
UUID creatorId = UUID.Zero;
+ DAMap daMap = null;
while (xtr.Read() && xtr.Name != "SceneObjectPart")
{
@@ -449,6 +463,10 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
creatorId = UUID.Parse(xtr.ReadElementString("UUID"));
xtr.ReadEndElement();
break;
+ case "DynAttrs":
+ daMap = new DAMap();
+ daMap.ReadXml(xtr);
+ break;
}
}
@@ -462,6 +480,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
Assert.That(uuid, Is.EqualTo(rpUuid));
Assert.That(name, Is.EqualTo(rpName));
Assert.That(creatorId, Is.EqualTo(rpCreatorId));
+ Assert.NotNull(daMap);
+ Assert.AreEqual(daValue, daMap[daStoreName][daKey].AsString());
}
[Test]
@@ -476,6 +496,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
Assert.That(rootPart.UUID, Is.EqualTo(new UUID("9be68fdd-f740-4a0f-9675-dfbbb536b946")));
Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("b46ef588-411e-4a8b-a284-d7dcfe8e74ef")));
Assert.That(rootPart.Name, Is.EqualTo("PrimFun"));
+ OSDMap store = rootPart.DynAttrs["MyStore"];
+ Assert.AreEqual("Rosebud", store["last words"].AsString());
// TODO: Check other properties
}
@@ -500,6 +522,14 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
rp.CreatorID = rpCreatorId;
rp.Shape = shape;
+ string daStoreName = "MyStore";
+ string daKey = "foo";
+ string daValue = "bar";
+ OSDMap myStore = new OSDMap();
+ myStore.Add(daKey, daValue);
+ rp.DynAttrs = new DAMap();
+ rp.DynAttrs[daStoreName] = myStore;
+
SceneObjectGroup so = new SceneObjectGroup(rp);
// Need to add the object to the scene so that the request to get script state succeeds
@@ -516,6 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
UUID uuid = UUID.Zero;
string name = null;
UUID creatorId = UUID.Zero;
+ DAMap daMap = null;
while (xtr.Read() && xtr.Name != "SceneObjectPart")
{
@@ -537,6 +568,10 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
creatorId = UUID.Parse(xtr.ReadElementString("Guid"));
xtr.ReadEndElement();
break;
+ case "DynAttrs":
+ daMap = new DAMap();
+ daMap.ReadXml(xtr);
+ break;
}
}
@@ -549,6 +584,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
Assert.That(uuid, Is.EqualTo(rpUuid));
Assert.That(name, Is.EqualTo(rpName));
Assert.That(creatorId, Is.EqualTo(rpCreatorId));
+ Assert.NotNull(daMap);
+ Assert.AreEqual(daValue, daMap[daStoreName][daKey].AsString());
}
}
}
\ No newline at end of file
--
cgit v1.1
From 1f1da230976451d30d920c237d53c699ba96b9d9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 5 Feb 2013 00:23:17 +0000
Subject: Bump version and assembly version numbers from 0.7.5 to 0.7.6
This is mostly Bluewall's work but I am also bumping the general version number
OpenSimulator 0.7.5 remains in the release candidate stage.
I'm doing this because master is significantly adding things that will not be in 0.7.5
This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names
and so the exact version match requirement is not in force.
---
OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Framework/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs | 2 +-
.../Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/Manager/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs | 2 +-
OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs | 2 +-
.../ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs | 2 +-
.../Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs | 2 +-
.../Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs | 2 +-
23 files changed, 23 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
index 060a61c..d29a001 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
index af2f6f8..8f9dad3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
index e72bd86..0b6ee2f 100644
--- a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
index 5a8c4a2..f6353f9 100644
--- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Addin("OpenSim.Region.CoreModules", "0.1")]
diff --git a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
index b926264..0f083c7 100644
--- a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
index 9b504c0..2a5828e 100644
--- a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
index 217b2d5..0065531 100644
--- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Addin("OpenSim.Region.OptionalModules", "0.1")]
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
index fb9cb66..6fd6f7e 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
-[assembly : AssemblyVersion("0.7.5.*")]
+[assembly : AssemblyVersion("0.7.6.*")]
diff --git a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
index 0d1db3b..d240c71 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
index 5ff945d..cafd7f4 100644
--- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
index 36b4235..5da3956 100644
--- a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
-[assembly : AssemblyVersion("0.7.5.*")]
+[assembly : AssemblyVersion("0.7.6.*")]
diff --git a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
index 4cc1731..bd70296 100644
--- a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
index 3c4f06a..f477ed1 100644
--- a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
-[assembly : AssemblyVersion("0.7.5.*")]
+[assembly : AssemblyVersion("0.7.6.*")]
diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
index d07df02..4289863 100644
--- a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
-[assembly : AssemblyVersion("0.7.5.*")]
+[assembly : AssemblyVersion("0.7.6.*")]
diff --git a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
index 085eb59..ca945b5 100644
--- a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
index d173db0..3c01eec 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
index 573a803..b1825ac 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
index f6d5d41..342dbff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
index c65caa8..fd37753 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
index 470e1a1..74747a2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
index e6e8777..d08b0a6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
index bd26a8b..a887171 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
index 100cf99..caa6d4e 100644
--- a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
--
cgit v1.1
From 562067eb16e2e6f4d097cae7795c5c86d4064db7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 5 Feb 2013 02:09:21 +0000
Subject: Fix bug where viewers would not see the "Module command functions not
enabled" error if these were disabled and a viewer attempted to call one.
This was not working because the shouter was wrongly signalled as an agent rather than a prim
---
.../Shared/Api/Implementation/MOD_Api.cs | 64 +++++++++++++++++++++-
1 file changed, 62 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 9045672..2fe6948 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -29,8 +29,10 @@ using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
+using System.Reflection;
using System.Runtime.Remoting.Lifetime;
using System.Threading;
+using log4net;
using OpenMetaverse;
using Nini.Config;
using OpenSim;
@@ -56,6 +58,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
[Serializable]
public class MOD_Api : MarshalByRefObject, IMOD_Api, IScriptApi
{
+// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
internal IScriptEngine m_ScriptEngine;
internal SceneObjectPart m_host;
internal TaskInventoryItem m_item;
@@ -109,8 +113,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (message.Length > 1023)
message = message.Substring(0, 1023);
- World.SimChat(Utils.StringToBytes(message),
- ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
+ World.SimChat(
+ Utils.StringToBytes(message),
+ ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL,
+ m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface();
wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message);
@@ -124,6 +130,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// string result of the invocation
public void modInvokeN(string fname, params object[] parms)
{
+// m_log.DebugFormat(
+// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
+// fname,
+// string.Join(",", Array.ConvertAll