aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/UserProfiles
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-06 00:11:13 +0000
committerJustin Clark-Casey (justincc)2014-03-06 00:11:13 +0000
commit14569992e149b4c6ee097d88e3f5034edd653645 (patch)
tree458e4fb3f08567b29bec0ad141e05a3cf71e20d7 /OpenSim/Region/CoreModules/Avatar/UserProfiles
parentAdd UUID and ready status (whether region has finished starting up) to "show ... (diff)
downloadopensim-SC-14569992e149b4c6ee097d88e3f5034edd653645.zip
opensim-SC-14569992e149b4c6ee097d88e3f5034edd653645.tar.gz
opensim-SC-14569992e149b4c6ee097d88e3f5034edd653645.tar.bz2
opensim-SC-14569992e149b4c6ee097d88e3f5034edd653645.tar.xz
Prevent adding a land object if it overlaps any existing objects that have not had their bitmaps adjusted.
This is to prevent an immediate problem in http://opensimulator.org/mantis/view.php?id=7035 where a development code bug occasionally overlays all the existing parcels with a blank parcel owned by the estate manager and to gather more data. My guess is that this parcel is being created by the new code in LandManagementModule.GetLandObject(), probably some race between threads since this only happens occasionally. Adds regression tests for this case and for parcel subdivide.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/UserProfiles')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs32
1 files changed, 21 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index f3e757a..bb2a258 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -657,9 +657,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
657 /// Enabled. 657 /// Enabled.
658 /// </param> 658 /// </param>
659 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) 659 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled)
660 { 660 {
661
662 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); 661 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString());
662
663 UserProfilePick pick = new UserProfilePick(); 663 UserProfilePick pick = new UserProfilePick();
664 string serverURI = string.Empty; 664 string serverURI = string.Empty;
665 GetUserProfileServerURI(remoteClient.AgentId, out serverURI); 665 GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
@@ -672,19 +672,29 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
672 avaPos.Z); 672 avaPos.Z);
673 673
674 string landOwnerName = string.Empty; 674 string landOwnerName = string.Empty;
675 ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y); 675 ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y);
676 if(land.LandData.IsGroupOwned) 676
677 if (land != null)
677 { 678 {
678 IGroupsModule groupMod = p.Scene.RequestModuleInterface<IGroupsModule>(); 679 if (land.LandData.IsGroupOwned)
679 UUID groupId = land.LandData.GroupID; 680 {
680 GroupRecord groupRecord = groupMod.GetGroupRecord(groupId); 681 IGroupsModule groupMod = p.Scene.RequestModuleInterface<IGroupsModule>();
681 landOwnerName = groupRecord.GroupName; 682 UUID groupId = land.LandData.GroupID;
683 GroupRecord groupRecord = groupMod.GetGroupRecord(groupId);
684 landOwnerName = groupRecord.GroupName;
685 }
686 else
687 {
688 IUserAccountService accounts = p.Scene.RequestModuleInterface<IUserAccountService>();
689 UserAccount user = accounts.GetUserAccount(p.Scene.RegionInfo.ScopeID, land.LandData.OwnerID);
690 landOwnerName = user.Name;
691 }
682 } 692 }
683 else 693 else
684 { 694 {
685 IUserAccountService accounts = p.Scene.RequestModuleInterface<IUserAccountService>(); 695 m_log.WarnFormat(
686 UserAccount user = accounts.GetUserAccount(p.Scene.RegionInfo.ScopeID, land.LandData.OwnerID); 696 "[PROFILES]: PickInfoUpdate found no parcel info at {0},{1} in {2}",
687 landOwnerName = user.Name; 697 avaPos.X, avaPos.Y, p.Scene.Name);
688 } 698 }
689 699
690 pick.PickId = pickID; 700 pick.PickId = pickID;