diff options
author | UbitUmarov | 2016-10-24 10:23:31 +0100 |
---|---|---|
committer | UbitUmarov | 2016-10-24 10:23:31 +0100 |
commit | d550b485f1409030149447c71b3de881232d4897 (patch) | |
tree | 2bd710e1e5dd0957f05860aa93cf1a52485c6334 /OpenSim/Framework | |
parent | ignore prims with shape type none on max size check for physics (diff) | |
download | opensim-SC-d550b485f1409030149447c71b3de881232d4897.zip opensim-SC-d550b485f1409030149447c71b3de881232d4897.tar.gz opensim-SC-d550b485f1409030149447c71b3de881232d4897.tar.bz2 opensim-SC-d550b485f1409030149447c71b3de881232d4897.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Constants.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 32 |
2 files changed, 37 insertions, 5 deletions
diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index 3ba264c..209c991 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs | |||
@@ -46,12 +46,20 @@ namespace OpenSim.Framework | |||
46 | 46 | ||
47 | public enum EstateAccessCodex : uint | 47 | public enum EstateAccessCodex : uint |
48 | { | 48 | { |
49 | AccessOptions = 1, | 49 | AllowedAccess = 1, |
50 | AllowedGroups = 2, | 50 | AllowedGroups = 2, |
51 | EstateBans = 4, | 51 | EstateBans = 4, |
52 | EstateManagers = 8 | 52 | EstateManagers = 8 |
53 | } | 53 | } |
54 | 54 | ||
55 | public enum EstateAccessLimits : int | ||
56 | { | ||
57 | AllowedAccess = 500, | ||
58 | AllowedGroups = 63, | ||
59 | EstateBans = 500, | ||
60 | EstateManagers = 10 | ||
61 | } | ||
62 | |||
55 | [Flags]public enum TeleportFlags : uint | 63 | [Flags]public enum TeleportFlags : uint |
56 | { | 64 | { |
57 | /// <summary>No flags set, or teleport failed</summary> | 65 | /// <summary>No flags set, or teleport failed</summary> |
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 | |||
305 | OnSave(this); | 305 | OnSave(this); |
306 | } | 306 | } |
307 | 307 | ||
308 | public int EstateUsersCount() | ||
309 | { | ||
310 | return l_EstateAccess.Count; | ||
311 | } | ||
312 | |||
308 | public void AddEstateUser(UUID avatarID) | 313 | public void AddEstateUser(UUID avatarID) |
309 | { | 314 | { |
310 | if (avatarID == UUID.Zero) | 315 | if (avatarID == UUID.Zero) |
311 | return; | 316 | return; |
312 | if (!l_EstateAccess.Contains(avatarID)) | 317 | if (!l_EstateAccess.Contains(avatarID) && |
318 | (l_EstateAccess.Count < (int)Constants.EstateAccessLimits.AllowedAccess)) | ||
313 | l_EstateAccess.Add(avatarID); | 319 | l_EstateAccess.Add(avatarID); |
314 | } | 320 | } |
315 | 321 | ||
@@ -319,11 +325,17 @@ namespace OpenSim.Framework | |||
319 | l_EstateAccess.Remove(avatarID); | 325 | l_EstateAccess.Remove(avatarID); |
320 | } | 326 | } |
321 | 327 | ||
328 | public int EstateGroupsCount() | ||
329 | { | ||
330 | return l_EstateGroups.Count; | ||
331 | } | ||
332 | |||
322 | public void AddEstateGroup(UUID avatarID) | 333 | public void AddEstateGroup(UUID avatarID) |
323 | { | 334 | { |
324 | if (avatarID == UUID.Zero) | 335 | if (avatarID == UUID.Zero) |
325 | return; | 336 | return; |
326 | if (!l_EstateGroups.Contains(avatarID)) | 337 | if (!l_EstateGroups.Contains(avatarID) && |
338 | (l_EstateGroups.Count < (int)Constants.EstateAccessLimits.AllowedGroups)) | ||
327 | l_EstateGroups.Add(avatarID); | 339 | l_EstateGroups.Add(avatarID); |
328 | } | 340 | } |
329 | 341 | ||
@@ -333,11 +345,17 @@ namespace OpenSim.Framework | |||
333 | l_EstateGroups.Remove(avatarID); | 345 | l_EstateGroups.Remove(avatarID); |
334 | } | 346 | } |
335 | 347 | ||
348 | public int EstateManagersCount() | ||
349 | { | ||
350 | return l_EstateManagers.Count; | ||
351 | } | ||
352 | |||
336 | public void AddEstateManager(UUID avatarID) | 353 | public void AddEstateManager(UUID avatarID) |
337 | { | 354 | { |
338 | if (avatarID == UUID.Zero) | 355 | if (avatarID == UUID.Zero) |
339 | return; | 356 | return; |
340 | if (!l_EstateManagers.Contains(avatarID)) | 357 | if (!l_EstateManagers.Contains(avatarID) && |
358 | (l_EstateManagers.Count < (int)Constants.EstateAccessLimits.EstateManagers)) | ||
341 | l_EstateManagers.Add(avatarID); | 359 | l_EstateManagers.Add(avatarID); |
342 | } | 360 | } |
343 | 361 | ||
@@ -403,11 +421,17 @@ namespace OpenSim.Framework | |||
403 | return false; | 421 | return false; |
404 | } | 422 | } |
405 | 423 | ||
424 | public int EstateBansCount() | ||
425 | { | ||
426 | return l_EstateBans.Count; | ||
427 | } | ||
428 | |||
406 | public void AddBan(EstateBan ban) | 429 | public void AddBan(EstateBan ban) |
407 | { | 430 | { |
408 | if (ban == null) | 431 | if (ban == null) |
409 | return; | 432 | return; |
410 | if (!IsBanned(ban.BannedUserID, 32)) //Ignore age-based bans | 433 | if (!IsBanned(ban.BannedUserID, 32) && |
434 | (l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans | ||
411 | l_EstateBans.Add(ban); | 435 | l_EstateBans.Add(ban); |
412 | } | 436 | } |
413 | 437 | ||