From b1ab3ea5d96c664c387504ad5d4ba5d9464ae3f1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 17 Sep 2010 23:48:44 +0100 Subject: For all Flotasm group module XMLRPC calls, correct parameter requestingAgentID to RequestingAgentID This was stopping the get group member roles call from working, and may have affected other things --- .../XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index a88c5e2..5fabbb0 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -957,7 +957,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups CacheKey = sb.ToString(); m_memoryCache.TryGetValue(CacheKey, out resp); } - } if (resp == null) @@ -965,22 +964,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups string UserService; UUID SessionID; GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID); - param.Add("requestingAgentID", requestingAgentID.ToString()); + + param.Add("RequestingAgentID", requestingAgentID.ToString()); param.Add("RequestingAgentUserService", UserService); param.Add("RequestingSessionID", SessionID.ToString()); - - param.Add("ReadKey", m_groupReadKey); param.Add("WriteKey", m_groupWriteKey); - IList parameters = new ArrayList(); parameters.Add(param); ConfigurableKeepAliveXmlRpcRequest req; req = new ConfigurableKeepAliveXmlRpcRequest(function, parameters, m_disableKeepAlive); - try { resp = req.Send(m_groupsServerURI, 10000); @@ -989,7 +985,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { m_memoryCache.AddOrUpdate(CacheKey, resp, TimeSpan.FromSeconds(m_cacheTimeout)); } - } catch (Exception e) { @@ -1058,10 +1053,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0}", line); } - } } - /// /// Group Request Tokens are an attempt to allow the groups service to authenticate -- cgit v1.1 From 889923841c3d3500dfe12c281ffe2d6bb3898739 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 18 Sep 2010 01:43:22 +0100 Subject: Stop broadcasting non 0/DEBUG ChatTypeEnum.Region messages to all avatars This allows non public/debug region wide messages to be sent to scripts but not be broadast to avatars --- OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 02f0968..ef5efdd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -237,9 +237,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat public virtual void OnChatBroadcast(Object sender, OSChatMessage c) { - // unless the chat to be broadcast is of type Region, we - // drop it if its channel is neither 0 nor DEBUG_CHANNEL - if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL && c.Type != ChatTypeEnum.Region) return; + if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; ChatTypeEnum cType = c.Type; if (c.Channel == DEBUG_CHANNEL) -- cgit v1.1 From 7ee0a8d30e92dedb99c48ab439aa4bd2d0087f14 Mon Sep 17 00:00:00 2001 From: Marck Date: Sat, 11 Sep 2010 09:14:32 +0200 Subject: Clarify help text for use of file paths with console command "create region". --- OpenSim/Region/Application/OpenSim.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c85ff82..7a0142f 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -316,7 +316,7 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "create region", "create region [\"region name\"] ", "Create a new region.", - "The settings for \"region name\" are read from in your Regions directory." + "The settings for \"region name\" are read from . Paths specified with are relative to your Regions directory, unless an absolute path is given." + " If \"region name\" does not exist in , it will be added." + Environment.NewLine + "Without \"region name\", the first region found in will be created." + Environment.NewLine + "If does not exist, it will be created.", -- cgit v1.1 From a85779e477b01ce80fa5e25e28e4e129c1bb137c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 20 Sep 2010 18:35:19 +0100 Subject: If the uuid of a SceneObjectGroup (RootPart) is changed before adding to the scene, remove the old uuid reference from m_parts as well as adding the new one. The separate remove and set operations is SOG.set_UUID() are both locked under m_parts.SyncRoot since they are logically atomic (though this isn't such an issue if the SOG isn't part of a scene) Added unit test for this behaviour. Also changed the second m_parts.AddOrReplace() to m_parts.Add(). As the old reference is now removed we never end up replacing an identical uuid. And if we replace a uuid that's already there (from a child part) then this is an error. --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 8 +++-- .../Scenes/Tests/SceneObjectBasicTests.cs | 35 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 994b9e3..b655f39 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -330,8 +330,12 @@ namespace OpenSim.Region.Framework.Scenes get { return m_rootPart.UUID; } set { - m_rootPart.UUID = value; - m_parts.AddOrReplace(value, m_rootPart); + lock (m_parts.SyncRoot) + { + m_parts.Remove(m_rootPart.UUID); + m_rootPart.UUID = value; + m_parts.Add(value, m_rootPart); + } } } diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 54b3260..e6ff0c0 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs @@ -189,5 +189,40 @@ namespace OpenSim.Region.Framework.Scenes.Tests // SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); // Assert.That(retrievedPart, Is.Null); //} + + /// + /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not + /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by + /// OpenSim. + /// + [Test] + public void TestChangeSceneObjectUuid() + { + string rootPartName = "rootpart"; + UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); + string childPartName = "childPart"; + UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); + + SceneObjectPart rootPart + = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) + { Name = rootPartName, UUID = rootPartUuid }; + SceneObjectPart linkPart + = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) + { Name = childPartName, UUID = childPartUuid }; + + SceneObjectGroup sog = new SceneObjectGroup(rootPart); + sog.AddPart(linkPart); + + Assert.That(sog.UUID, Is.EqualTo(rootPartUuid)); + Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid)); + Assert.That(sog.Parts.Length, Is.EqualTo(2)); + + UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002"); + sog.UUID = newRootPartUuid; + + Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid)); + Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid)); + Assert.That(sog.Parts.Length, Is.EqualTo(2)); + } } } -- cgit v1.1