From d550b485f1409030149447c71b3de881232d4897 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 24 Oct 2016 10:23:31 +0100 Subject: viewer crash bug fix: fis the udp packets split of SendEstateList() large lists; Enforce size limits on the estate lists since currently required for viewers compatibily; improve handling of changes with large selected items. This is still bad, users may need to close and reopen the region/estate information to get correct Allowed and Banned lists after a change. This happens because of viewer resent/outOfOrder packets that completly break this lists updates protocol --- OpenSim/Framework/EstateSettings.cs | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/EstateSettings.cs') diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 4c9f6e9..844230b 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -305,11 +305,17 @@ namespace OpenSim.Framework OnSave(this); } + public int EstateUsersCount() + { + return l_EstateAccess.Count; + } + public void AddEstateUser(UUID avatarID) { if (avatarID == UUID.Zero) return; - if (!l_EstateAccess.Contains(avatarID)) + if (!l_EstateAccess.Contains(avatarID) && + (l_EstateAccess.Count < (int)Constants.EstateAccessLimits.AllowedAccess)) l_EstateAccess.Add(avatarID); } @@ -319,11 +325,17 @@ namespace OpenSim.Framework l_EstateAccess.Remove(avatarID); } + public int EstateGroupsCount() + { + return l_EstateGroups.Count; + } + public void AddEstateGroup(UUID avatarID) { if (avatarID == UUID.Zero) return; - if (!l_EstateGroups.Contains(avatarID)) + if (!l_EstateGroups.Contains(avatarID) && + (l_EstateGroups.Count < (int)Constants.EstateAccessLimits.AllowedGroups)) l_EstateGroups.Add(avatarID); } @@ -333,11 +345,17 @@ namespace OpenSim.Framework l_EstateGroups.Remove(avatarID); } + public int EstateManagersCount() + { + return l_EstateManagers.Count; + } + public void AddEstateManager(UUID avatarID) { if (avatarID == UUID.Zero) return; - if (!l_EstateManagers.Contains(avatarID)) + if (!l_EstateManagers.Contains(avatarID) && + (l_EstateManagers.Count < (int)Constants.EstateAccessLimits.EstateManagers)) l_EstateManagers.Add(avatarID); } @@ -403,11 +421,17 @@ namespace OpenSim.Framework return false; } + public int EstateBansCount() + { + return l_EstateBans.Count; + } + public void AddBan(EstateBan ban) { if (ban == null) return; - if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans + if (!IsBanned(ban.BannedUserID, 32) && + (l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans l_EstateBans.Add(ban); } -- cgit v1.1