From 25fea820490603227432639dde1305957555abb2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 13 May 2013 07:29:17 -0700 Subject: Fixes mantis #6636 -- Groups --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index f670272..7e0b112 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -186,7 +186,6 @@ namespace OpenSim.Groups public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID, out string reason) { - m_log.DebugFormat("[Groups]: Creating group {0}", name); reason = string.Empty; if (m_UserManagement.IsLocalGridUser(RequestingAgentID)) return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID, -- cgit v1.1 From d00770d56bf00640f23f462d8ab51f851530234c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 8 Jun 2013 11:00:22 -0700 Subject: Groups V2 -- fix mantis #6666 --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index 7e0b112..cff7adf 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -684,6 +684,9 @@ namespace OpenSim.Groups { serviceLocation = string.Empty; name = string.Empty; + if (groupID.Equals(UUID.Zero)) + return true; + ExtendedGroupRecord group = m_LocalGroupsConnector.GetGroupRecord(UUID.Zero.ToString(), groupID, string.Empty); if (group == null) { -- cgit v1.1 From e19defde36ddbd5ff90d8304c6fe3b57110f8078 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 8 Jul 2013 22:03:07 +0100 Subject: Add "show caps stats by user" and "show caps stats by cap" console commands to print various counts of capability invocation by user and by cap This currently prints caps requests received and handled, so that overload of received compared to handled or deadlock can be detected. This involves making BaseStreamHandler and BaseOutputStream record the ints, which means inheritors should subclass ProcessRequest() instead of Handle() However, existing inheriting classes overriding Handle() will still work, albeit without stats recording. "show caps" becomes "show caps list" to disambiguate between show caps commands --- OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs index 3584f78..67750f5 100644 --- a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs @@ -113,7 +113,7 @@ namespace OpenSim.Groups m_GroupsService = service; } - public override byte[] Handle(string path, Stream requestData, + protected override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { StreamReader sr = new StreamReader(requestData); -- cgit v1.1 From 83da14008f9a8a4ad0cf0dd5487327e4a319fd5d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 8 Jul 2013 23:57:05 +0100 Subject: minor: remove some mono compiler warnings in new groups code --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 1 - OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs | 2 -- 2 files changed, 3 deletions(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index cff7adf..c3c759e 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -543,7 +543,6 @@ namespace OpenSim.Groups List urls = new List(); foreach (GroupMembersData m in members) { - UUID userID = UUID.Zero; if (!m_UserManagement.IsLocalGridUser(m.AgentID)) { string gURL = m_UserManagement.GetUserServerURL(m.AgentID, "GroupsServerURI"); diff --git a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs index 67750f5..d2bcba5 100644 --- a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs @@ -47,7 +47,6 @@ namespace OpenSim.Groups private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private HGGroupsService m_GroupsService; - private string m_HomeURI = string.Empty; private string m_ConfigName = "Groups"; // Called by Robust shell @@ -209,7 +208,6 @@ namespace OpenSim.Groups UUID groupID = new UUID(request["GroupID"].ToString()); string agentID = request["AgentID"].ToString(); string token = request["AccessToken"].ToString(); - string reason = string.Empty; m_GroupsService.RemoveAgentFromGroup(agentID, agentID, groupID, token); } -- cgit v1.1 From 69975763d2a735eb2696d2e27e5796a472a208ea Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 27 Jul 2013 15:38:56 -0700 Subject: Several major improvements to group (V2) chat. Specifically: handle join/drop appropriately, invitechatboxes. The major departure from flotsam is to send only one message per destination region, as opposed to one message per group member. This reduces messaging considerably in large groups that have clusters of members in certain regions. --- .../Hypergrid/GroupsServiceHGConnectorModule.cs | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index c3c759e..daa0728 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -590,28 +590,6 @@ namespace OpenSim.Groups return m_LocalGroupsConnector.GetGroupNotices(AgentUUI(RequestingAgentID), GroupID); } - public void ResetAgentGroupChatSessions(string agentID) - { - } - - public bool hasAgentBeenInvitedToGroupChatSession(string agentID, UUID groupID) - { - return false; - } - - public bool hasAgentDroppedGroupChatSession(string agentID, UUID groupID) - { - return false; - } - - public void AgentDroppedFromGroupChatSession(string agentID, UUID groupID) - { - } - - public void AgentInvitedToGroupChatSession(string agentID, UUID groupID) - { - } - #endregion #region hypergrid groups -- cgit v1.1 From 33b54807a1646a9457a7a718f767ccec1c0cb39f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Jul 2013 18:08:50 -0700 Subject: Changing the visibility test in groups service to be UUID.Zero.ToString() instead of "all" because some paths in the code assume there's a UUI in the RequestingAgent string. --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index daa0728..5e53981 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -254,7 +254,10 @@ namespace OpenSim.Groups { string url = string.Empty, gname = string.Empty; if (IsLocal(GroupID, out url, out gname)) - return m_LocalGroupsConnector.GetGroupMembers(AgentUUI(RequestingAgentID), GroupID); + { + string agentID = AgentUUI(RequestingAgentID); + return m_LocalGroupsConnector.GetGroupMembers(agentID, GroupID); + } else if (!string.IsNullOrEmpty(url)) { ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID); -- cgit v1.1 From 7eee9eb312e9f947d201e0ef3e2f34bceec4568d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Jul 2013 20:47:15 -0700 Subject: Groups: Better warning messages to the user. --- .../Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index 5e53981..c33168c 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -399,17 +399,21 @@ namespace OpenSim.Groups if (success) { + // Here we always return true. The user has been added to the local group, + // independent of whether the remote operation succeeds or not url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI"); if (url == string.Empty) { - reason = "User doesn't have a groups server"; - return false; + reason = "You don't have have an accessible groups server in your home world. You membership to this group in only within this grid."; + return true; } GroupsServiceHGConnector c = GetConnector(url); if (c != null) - return c.CreateProxy(AgentUUI(RequestingAgentID), AgentID, token, GroupID, m_LocalGroupsServiceLocation, name, out reason); + c.CreateProxy(AgentUUI(RequestingAgentID), AgentID, token, GroupID, m_LocalGroupsServiceLocation, name, out reason); + return true; } + return false; } } else if (m_UserManagement.IsLocalGridUser(uid)) // local user -- cgit v1.1 From e311f902ffeb0c1f36d6d4288e65d965d13a9fbe Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 13 Aug 2013 20:13:12 +0100 Subject: minor: Eliminate one of the duplicate 'have's in the HG message telling the user if no GroupsServerURI has been given in user data by the home grid --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index c33168c..4642b2a 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -404,7 +404,7 @@ namespace OpenSim.Groups url = m_UserManagement.GetUserServerURL(uid, "GroupsServerURI"); if (url == string.Empty) { - reason = "You don't have have an accessible groups server in your home world. You membership to this group in only within this grid."; + reason = "You don't have an accessible groups server in your home world. You membership to this group in only within this grid."; return true; } -- cgit v1.1 From 04619a9b139ac67c92b5b8be9607544be2621d7e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 5 Sep 2013 07:44:27 -0700 Subject: Restore group membership check for HG users in QueryAccess. --- .../Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index 4642b2a..7d48516 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -623,10 +623,13 @@ namespace OpenSim.Groups if (agent != null) break; } - if (agent == null) // oops - return AgentID.ToString(); + if (agent != null) + return Util.ProduceUserUniversalIdentifier(agent); + + // we don't know anything about this foreign user + // try asking the user management module, which may know more + return m_UserManagement.GetUserUUI(AgentID); - return Util.ProduceUserUniversalIdentifier(agent); } private string AgentUUIForOutside(string AgentIDStr) -- cgit v1.1 From 7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Nov 2013 21:45:08 +0000 Subject: refactor: replace verbose checks with String.IsNullOrEmpty where applicable. Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845 --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Addons/Groups/Hypergrid') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs index 59fec6f..653dbac 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs @@ -101,7 +101,7 @@ namespace OpenSim.Groups Dictionary sendData = new Dictionary(); if (GroupID != UUID.Zero) sendData["GroupID"] = GroupID.ToString(); - if (GroupName != null && GroupName != string.Empty) + if (!string.IsNullOrEmpty(GroupName)) sendData["Name"] = GroupsDataUtils.Sanitize(GroupName); sendData["RequestingAgentID"] = RequestingAgentID; @@ -275,7 +275,7 @@ namespace OpenSim.Groups //m_log.DebugFormat("[XXX]: reply was {0}", reply); - if (reply == string.Empty || reply == null) + if (string.IsNullOrEmpty(reply)) return null; Dictionary replyData = ServerUtils.ParseXmlResponse( -- cgit v1.1