diff options
author | UbitUmarov | 2019-01-29 21:16:28 +0000 |
---|---|---|
committer | UbitUmarov | 2019-01-29 21:16:28 +0000 |
commit | dc633ee768635799d5b0bf5e2ada79e692a7144e (patch) | |
tree | c768eedb925f5c85954468b0876f43560e27031e /OpenSim | |
parent | change encoding few event cap messages (diff) | |
download | opensim-SC-dc633ee768635799d5b0bf5e2ada79e692a7144e.zip opensim-SC-dc633ee768635799d5b0bf5e2ada79e692a7144e.tar.gz opensim-SC-dc633ee768635799d5b0bf5e2ada79e692a7144e.tar.bz2 opensim-SC-dc633ee768635799d5b0bf5e2ada79e692a7144e.tar.xz |
cosmetics
Diffstat (limited to '')
3 files changed, 34 insertions, 22 deletions
diff --git a/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs b/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs index 73d0d20..ec26b43 100644 --- a/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs +++ b/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs | |||
@@ -477,30 +477,48 @@ namespace OpenSim.Framework | |||
477 | 477 | ||
478 | public TValue[] GetArray() | 478 | public TValue[] GetArray() |
479 | { | 479 | { |
480 | TValue[] ret = new TValue[0]; | 480 | bool gotupLock = false; |
481 | bool gotLock = false; | ||
482 | try | 481 | try |
483 | { | 482 | { |
484 | try { } | 483 | try { } |
485 | finally | 484 | finally |
486 | { | 485 | { |
487 | rwLock.EnterWriteLock(); | 486 | rwLock.EnterUpgradeableReadLock(); |
488 | gotLock = true; | 487 | gotupLock = true; |
488 | } | ||
489 | 489 | ||
490 | if (m_array == null) | 490 | if (m_array == null) |
491 | { | ||
492 | bool gotwritelock = false; | ||
493 | try | ||
491 | { | 494 | { |
495 | try { } | ||
496 | finally | ||
497 | { | ||
498 | rwLock.EnterWriteLock(); | ||
499 | gotwritelock = true; | ||
500 | } | ||
501 | |||
492 | m_array = new TValue[Dictionary1.Count]; | 502 | m_array = new TValue[Dictionary1.Count]; |
493 | Dictionary1.Values.CopyTo(m_array, 0); | 503 | Dictionary1.Values.CopyTo(m_array, 0); |
494 | } | 504 | } |
495 | ret = m_array; | 505 | finally |
506 | { | ||
507 | if (gotwritelock) | ||
508 | rwLock.ExitWriteLock(); | ||
509 | } | ||
496 | } | 510 | } |
511 | return m_array; | ||
512 | } | ||
513 | catch | ||
514 | { | ||
515 | return new TValue[0]; | ||
497 | } | 516 | } |
498 | finally | 517 | finally |
499 | { | 518 | { |
500 | if (gotLock) | 519 | if (gotupLock) |
501 | rwLock.ExitWriteLock(); | 520 | rwLock.ExitUpgradeableReadLock(); |
502 | } | 521 | } |
503 | return ret; | ||
504 | } | 522 | } |
505 | } | 523 | } |
506 | } \ No newline at end of file | 524 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ae7885b..8c327d8 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1939,7 +1939,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1939 | m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to find parcelID {0}", parcelID); | 1939 | m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to find parcelID {0}", parcelID); |
1940 | } | 1940 | } |
1941 | 1941 | ||
1942 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1942 | return LLSDxmlEncode.LLSDEmpty; |
1943 | } | 1943 | } |
1944 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the | 1944 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the |
1945 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. | 1945 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 88ca0c6..26500ab 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -1145,9 +1145,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1145 | public bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add) | 1145 | public bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add) |
1146 | { | 1146 | { |
1147 | if (bitmap_base.GetLength(0) != bitmap_add.GetLength(0) | 1147 | if (bitmap_base.GetLength(0) != bitmap_add.GetLength(0) |
1148 | || bitmap_base.GetLength(1) != bitmap_add.GetLength(1) | 1148 | || bitmap_base.GetLength(1) != bitmap_add.GetLength(1)) |
1149 | || bitmap_add.Rank != 2 | ||
1150 | || bitmap_base.Rank != 2) | ||
1151 | { | 1149 | { |
1152 | throw new Exception( | 1150 | throw new Exception( |
1153 | String.Format("{0} MergeLandBitmaps. merging maps not same size. baseSizeXY=<{1},{2}>, addSizeXY=<{3},{4}>", | 1151 | String.Format("{0} MergeLandBitmaps. merging maps not same size. baseSizeXY=<{1},{2}>, addSizeXY=<{3},{4}>", |
@@ -1155,15 +1153,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1155 | ); | 1153 | ); |
1156 | } | 1154 | } |
1157 | 1155 | ||
1158 | int x, y; | 1156 | for (int x = 0; x < bitmap_add.GetLength(0); x++) |
1159 | for (y = 0; y < bitmap_base.GetLength(1); y++) | ||
1160 | { | 1157 | { |
1161 | for (x = 0; x < bitmap_add.GetLength(0); x++) | 1158 | for (int y = 0; y < bitmap_base.GetLength(1); y++) |
1162 | { | 1159 | { |
1163 | if (bitmap_add[x, y]) | 1160 | bitmap_base[x, y] |= bitmap_add[x, y]; |
1164 | { | ||
1165 | bitmap_base[x, y] = true; | ||
1166 | } | ||
1167 | } | 1161 | } |
1168 | } | 1162 | } |
1169 | return bitmap_base; | 1163 | return bitmap_base; |
@@ -1357,9 +1351,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1357 | int maxX = 0; | 1351 | int maxX = 0; |
1358 | int maxY = 0; | 1352 | int maxY = 0; |
1359 | 1353 | ||
1360 | for (int y = 0; y < baseY; y++) | 1354 | for (int x = 0; x < baseX; x++) |
1361 | { | 1355 | { |
1362 | for (int x = 0; x < baseX; x++) | 1356 | for (int y = 0; y < baseY; y++) |
1363 | { | 1357 | { |
1364 | if (bitmap_new[x, y]) bitmap_base[x, y] = false; | 1358 | if (bitmap_new[x, y]) bitmap_base[x, y] = false; |
1365 | if (bitmap_base[x, y]) | 1359 | if (bitmap_base[x, y]) |