mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
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
This commit is contained in:
@@ -46,12 +46,20 @@ namespace OpenSim.Framework
|
||||
|
||||
public enum EstateAccessCodex : uint
|
||||
{
|
||||
AccessOptions = 1,
|
||||
AllowedAccess = 1,
|
||||
AllowedGroups = 2,
|
||||
EstateBans = 4,
|
||||
EstateManagers = 8
|
||||
}
|
||||
|
||||
public enum EstateAccessLimits : int
|
||||
{
|
||||
AllowedAccess = 500,
|
||||
AllowedGroups = 63,
|
||||
EstateBans = 500,
|
||||
EstateManagers = 10
|
||||
}
|
||||
|
||||
[Flags]public enum TeleportFlags : uint
|
||||
{
|
||||
/// <summary>No flags set, or teleport failed</summary>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user