From cc5e28c1c173ae5745d3f9378fe2eaefd7f3e4fb Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 17 Dec 2011 02:35:08 +0000 Subject: [PATCH] Fix bug where objects couldn't be set back to the "none" group. This is handled by treating UUID.Zero as a special case. Currently, asking for the "none" group returns nothing because XMLRPC groups, at least, is not properly handling this case. It may be better in the future to have GroupsModule return an appropriate GroupsData structure instead or require the underlying services to behave appropriately. This is a further component of http://opensimulator.org/mantis/view.php?id=5588 --- .../Avatar/XmlRpcGroups/GroupsModule.cs | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 6ef2c5b9c2..9f13fde218 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -339,15 +339,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private void HandleObjectGroupUpdate( IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage) { - GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId); - - if (gmd == null) + // XXX: Might be better to get rid of this special casing and have GetMembershipData return something + // reasonable for a UUID.Zero group. + if (GroupID != UUID.Zero) { -// m_log.WarnFormat( -// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", -// remoteClient.Name, GroupID, objectLocalID); - - return; + GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId); + + if (gmd == null) + { +// m_log.WarnFormat( +// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", +// remoteClient.Name, GroupID, objectLocalID); + + return; + } } SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID);