aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-17 02:35:08 +0000
committerJustin Clark-Casey (justincc)2011-12-17 02:35:08 +0000
commit684482352c2f580f2868704e2ba2236a751c5bc4 (patch)
treeea9ca612c23a2405ad47b5d3a0c84354f2c96013
parentFix bug where objects could not be set to a new group if the group had been c... (diff)
downloadopensim-SC_OLD-684482352c2f580f2868704e2ba2236a751c5bc4.zip
opensim-SC_OLD-684482352c2f580f2868704e2ba2236a751c5bc4.tar.gz
opensim-SC_OLD-684482352c2f580f2868704e2ba2236a751c5bc4.tar.bz2
opensim-SC_OLD-684482352c2f580f2868704e2ba2236a751c5bc4.tar.xz
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
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 9969a15..e959821 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -332,15 +332,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
332 private void HandleObjectGroupUpdate( 332 private void HandleObjectGroupUpdate(
333 IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage) 333 IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
334 { 334 {
335 GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId); 335 // XXX: Might be better to get rid of this special casing and have GetMembershipData return something
336 336 // reasonable for a UUID.Zero group.
337 if (gmd == null) 337 if (GroupID != UUID.Zero)
338 { 338 {
339// m_log.WarnFormat( 339 GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId);
340// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", 340
341// remoteClient.Name, GroupID, objectLocalID); 341 if (gmd == null)
342 342 {
343 return; 343// m_log.WarnFormat(
344// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group",
345// remoteClient.Name, GroupID, objectLocalID);
346
347 return;
348 }
344 } 349 }
345 350
346 SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID); 351 SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID);