From 3bf699ad36081c9c53ee6845a5c85a3a1856b923 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Dec 2011 08:59:33 -0800 Subject: No functional changes. Changed the prefix of that log message [CONNECTION BEGIN] to [SCENE] because that's where the message happens. Also changed the instantiation of a vector object to be done only once instead of every time we receive a position update. --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4ab6fe4..b43b227 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2512,7 +2512,7 @@ namespace OpenSim.Region.Framework.Scenes if (sp == null) { m_log.DebugFormat( - "[SCENE]: Adding new child scene presence {0} to scene {1}", client.Name, RegionInfo.RegionName); + "[SCENE]: Adding new child scene presence {0} to scene {1} at pos {2}", client.Name, RegionInfo.RegionName, client.StartPos); m_clientManager.Add(client); SubscribeToClientEvents(client); @@ -3249,9 +3249,9 @@ namespace OpenSim.Region.Framework.Scenes // Don't disable this log message - it's too helpful m_log.DebugFormat( - "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})", + "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6}, position {7})", RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, - agent.AgentID, agent.circuitcode, teleportFlags); + agent.AgentID, agent.circuitcode, teleportFlags, agent.startpos); if (LoginsDisabled) { @@ -3294,7 +3294,7 @@ namespace OpenSim.Region.Framework.Scenes catch (Exception e) { m_log.ErrorFormat( - "[CONNECTION BEGIN]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); + "[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); return false; } } @@ -3307,12 +3307,12 @@ namespace OpenSim.Region.Framework.Scenes catch (Exception e) { m_log.ErrorFormat( - "[CONNECTION BEGIN]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); + "[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); return false; } m_log.InfoFormat( - "[CONNECTION BEGIN]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})", + "[SCENE]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})", RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); -- cgit v1.1 From f9137c923bcdc952efe37c7dd328c2d0d8323317 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 17 Dec 2011 02:23:24 +0000 Subject: Fix bug where objects could not be set to a new group if the group had been created in that client session, or if no other action has been performed on the object. There were two problems here: 1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service. This fails to groups created newly in that session 2) On object group update, we weren't setting the HasGroupChanged flag. This meant that the change was not persisted unless some other action set this flag. This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588 This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b43b227..4914d65 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2776,7 +2776,6 @@ namespace OpenSim.Region.Framework.Scenes public virtual void SubscribeToClientParcelEvents(IClientAPI client) { - client.OnObjectGroupRequest += m_sceneGraph.HandleObjectGroupUpdate; client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel; client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime; client.OnParcelBuy += ProcessParcelBuy; @@ -2903,7 +2902,6 @@ namespace OpenSim.Region.Framework.Scenes public virtual void UnSubscribeToClientParcelEvents(IClientAPI client) { - client.OnObjectGroupRequest -= m_sceneGraph.HandleObjectGroupUpdate; client.OnParcelReturnObjectsRequest -= LandChannel.ReturnObjectsInParcel; client.OnParcelSetOtherCleanTime -= LandChannel.SetParcelOtherCleanTime; client.OnParcelBuy -= ProcessParcelBuy; @@ -4287,7 +4285,7 @@ namespace OpenSim.Region.Framework.Scenes /// Get a scene object group that contains the prim with the given local id /// /// - /// null if no scene object group containing that prim is found + /// null if no scene object group containing that prim is found public SceneObjectGroup GetGroupByPrim(uint localID) { return m_sceneGraph.GetGroupByPrim(localID); -- cgit v1.1 From 87a2d8d51b66db12a487014deb8447fb2432e2a3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 19 Dec 2011 23:03:45 +0000 Subject: Move HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs as this is updating SOG/SOP.GroupID, which is arguably generic. --- OpenSim/Region/Framework/Scenes/Scene.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4914d65..6666328 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -139,6 +139,7 @@ namespace OpenSim.Region.Framework.Scenes protected IDialogModule m_dialogModule; protected IEntityTransferModule m_teleportModule; protected ICapabilitiesModule m_capsModule; + protected IGroupsModule m_groupsModule; /// /// Current scene frame number @@ -1164,6 +1165,7 @@ namespace OpenSim.Region.Framework.Scenes m_dialogModule = RequestModuleInterface(); m_capsModule = RequestModuleInterface(); m_teleportModule = RequestModuleInterface(); + m_groupsModule = RequestModuleInterface(); } #endregion @@ -2733,6 +2735,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnObjectDescription += m_sceneGraph.PrimDescription; client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; client.OnObjectOwner += ObjectOwner; + client.OnObjectGroupRequest += HandleObjectGroupUpdate; } public virtual void SubscribeToClientPrimRezEvents(IClientAPI client) @@ -3520,15 +3523,11 @@ namespace OpenSim.Region.Framework.Scenes m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); } - IGroupsModule groupsModule = - RequestModuleInterface(); - List agentGroups = new List(); - if (groupsModule != null) + if (m_groupsModule != null) { - GroupMembershipData[] GroupMembership = - groupsModule.GetMembershipData(agent.AgentID); + GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID); if (GroupMembership != null) { -- cgit v1.1