diff options
author | UbitUmarov | 2017-05-14 07:52:50 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-14 07:52:50 +0100 |
commit | eea247fcc5f29c767dc1e3b7f9a5616843256e8d (patch) | |
tree | ec27d1c12890efa30a2a04edb32c4190e265ba54 /OpenSim/Framework | |
parent | Merge branch 'master' into httptests (diff) | |
parent | clear land object on delete (diff) | |
download | opensim-SC-eea247fcc5f29c767dc1e3b7f9a5616843256e8d.zip opensim-SC-eea247fcc5f29c767dc1e3b7f9a5616843256e8d.tar.gz opensim-SC-eea247fcc5f29c767dc1e3b7f9a5616843256e8d.tar.bz2 opensim-SC-eea247fcc5f29c767dc1e3b7f9a5616843256e8d.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs | 64 | ||||
-rw-r--r-- | OpenSim/Framework/ILandChannel.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/ILandObject.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/LandData.cs | 12 |
4 files changed, 46 insertions, 34 deletions
diff --git a/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs b/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs index 55ec13e..816523b 100644 --- a/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs +++ b/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs | |||
@@ -74,21 +74,19 @@ namespace OpenSim.Framework | |||
74 | { | 74 | { |
75 | rwLock.EnterWriteLock(); | 75 | rwLock.EnterWriteLock(); |
76 | gotLock = true; | 76 | gotLock = true; |
77 | if (Dictionary1.ContainsKey(key1)) | ||
78 | { | ||
79 | if (!Dictionary2.ContainsKey(key2)) | ||
80 | throw new ArgumentException("key1 exists in the dictionary but not key2"); | ||
81 | } | ||
82 | else if (Dictionary2.ContainsKey(key2)) | ||
83 | { | ||
84 | if (!Dictionary1.ContainsKey(key1)) | ||
85 | throw new ArgumentException("key2 exists in the dictionary but not key1"); | ||
86 | } | ||
87 | Dictionary1[key1] = value; | ||
88 | Dictionary2[key2] = value; | ||
77 | } | 89 | } |
78 | |||
79 | if (Dictionary1.ContainsKey(key1)) | ||
80 | { | ||
81 | if (!Dictionary2.ContainsKey(key2)) | ||
82 | throw new ArgumentException("key1 exists in the dictionary but not key2"); | ||
83 | } | ||
84 | else if (Dictionary2.ContainsKey(key2)) | ||
85 | { | ||
86 | if (!Dictionary1.ContainsKey(key1)) | ||
87 | throw new ArgumentException("key2 exists in the dictionary but not key1"); | ||
88 | } | ||
89 | |||
90 | Dictionary1[key1] = value; | ||
91 | Dictionary2[key2] = value; | ||
92 | } | 90 | } |
93 | finally | 91 | finally |
94 | { | 92 | { |
@@ -112,10 +110,9 @@ namespace OpenSim.Framework | |||
112 | { | 110 | { |
113 | rwLock.EnterWriteLock(); | 111 | rwLock.EnterWriteLock(); |
114 | gotLock = true; | 112 | gotLock = true; |
113 | Dictionary1.Remove(key1); | ||
114 | success = Dictionary2.Remove(key2); | ||
115 | } | 115 | } |
116 | |||
117 | Dictionary1.Remove(key1); | ||
118 | success = Dictionary2.Remove(key2); | ||
119 | } | 116 | } |
120 | finally | 117 | finally |
121 | { | 118 | { |
@@ -151,8 +148,12 @@ namespace OpenSim.Framework | |||
151 | { | 148 | { |
152 | if (kvp.Value.Equals(value)) | 149 | if (kvp.Value.Equals(value)) |
153 | { | 150 | { |
154 | Dictionary1.Remove(key1); | 151 | try { } |
155 | Dictionary2.Remove(kvp.Key); | 152 | finally |
153 | { | ||
154 | Dictionary1.Remove(key1); | ||
155 | Dictionary2.Remove(kvp.Key); | ||
156 | } | ||
156 | found = true; | 157 | found = true; |
157 | break; | 158 | break; |
158 | } | 159 | } |
@@ -193,8 +194,12 @@ namespace OpenSim.Framework | |||
193 | { | 194 | { |
194 | if (kvp.Value.Equals(value)) | 195 | if (kvp.Value.Equals(value)) |
195 | { | 196 | { |
196 | Dictionary2.Remove(key2); | 197 | try { } |
197 | Dictionary1.Remove(kvp.Key); | 198 | finally |
199 | { | ||
200 | Dictionary2.Remove(key2); | ||
201 | Dictionary1.Remove(kvp.Key); | ||
202 | } | ||
198 | found = true; | 203 | found = true; |
199 | break; | 204 | break; |
200 | } | 205 | } |
@@ -224,10 +229,9 @@ namespace OpenSim.Framework | |||
224 | { | 229 | { |
225 | rwLock.EnterWriteLock(); | 230 | rwLock.EnterWriteLock(); |
226 | gotLock = true; | 231 | gotLock = true; |
232 | Dictionary1.Clear(); | ||
233 | Dictionary2.Clear(); | ||
227 | } | 234 | } |
228 | |||
229 | Dictionary1.Clear(); | ||
230 | Dictionary2.Clear(); | ||
231 | } | 235 | } |
232 | finally | 236 | finally |
233 | { | 237 | { |
@@ -485,15 +489,15 @@ namespace OpenSim.Framework | |||
485 | try {} | 489 | try {} |
486 | finally | 490 | finally |
487 | { | 491 | { |
488 | rwLock.EnterUpgradeableReadLock(); | 492 | rwLock.EnterWriteLock(); |
489 | gotWriteLock = true; | 493 | gotWriteLock = true; |
490 | } | ||
491 | 494 | ||
492 | for (int i = 0; i < list.Count; i++) | 495 | for (int i = 0; i < list.Count; i++) |
493 | Dictionary1.Remove(list[i]); | 496 | Dictionary1.Remove(list[i]); |
494 | 497 | ||
495 | for (int i = 0; i < list2.Count; i++) | 498 | for (int i = 0; i < list2.Count; i++) |
496 | Dictionary2.Remove(list2[i]); | 499 | Dictionary2.Remove(list2[i]); |
500 | } | ||
497 | } | 501 | } |
498 | finally | 502 | finally |
499 | { | 503 | { |
diff --git a/OpenSim/Framework/ILandChannel.cs b/OpenSim/Framework/ILandChannel.cs index 44a24b9..12a8228 100644 --- a/OpenSim/Framework/ILandChannel.cs +++ b/OpenSim/Framework/ILandChannel.cs | |||
@@ -76,6 +76,8 @@ namespace OpenSim.Region.Framework.Interfaces | |||
76 | /// <returns></returns> | 76 | /// <returns></returns> |
77 | ILandObject GetLandObject(int localID); | 77 | ILandObject GetLandObject(int localID); |
78 | 78 | ||
79 | ILandObject GetLandObject(UUID GlobalID); | ||
80 | |||
79 | /// <summary> | 81 | /// <summary> |
80 | /// Clear the land channel of all parcels. | 82 | /// Clear the land channel of all parcels. |
81 | /// </summary> | 83 | /// </summary> |
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs index f3b850d..a783256 100644 --- a/OpenSim/Framework/ILandObject.cs +++ b/OpenSim/Framework/ILandObject.cs | |||
@@ -189,5 +189,7 @@ namespace OpenSim.Framework | |||
189 | /// </summary> | 189 | /// </summary> |
190 | /// <returns>The music url.</returns> | 190 | /// <returns>The music url.</returns> |
191 | string GetMusicUrl(); | 191 | string GetMusicUrl(); |
192 | |||
193 | void Clear(); | ||
192 | } | 194 | } |
193 | } | 195 | } |
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 13d2977..13b58be 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs | |||
@@ -97,7 +97,9 @@ namespace OpenSim.Framework | |||
97 | private bool _mediaLoop = false; | 97 | private bool _mediaLoop = false; |
98 | private bool _obscureMusic = false; | 98 | private bool _obscureMusic = false; |
99 | private bool _obscureMedia = false; | 99 | private bool _obscureMedia = false; |
100 | private float _dwell = 0; | 100 | |
101 | private float m_dwell = 0; | ||
102 | public double LastDwellTimeMS; | ||
101 | 103 | ||
102 | public bool SeeAVs { get; set; } | 104 | public bool SeeAVs { get; set; } |
103 | public bool AnyAVSounds { get; set; } | 105 | public bool AnyAVSounds { get; set; } |
@@ -111,11 +113,12 @@ namespace OpenSim.Framework | |||
111 | { | 113 | { |
112 | get | 114 | get |
113 | { | 115 | { |
114 | return _dwell; | 116 | return m_dwell; |
115 | } | 117 | } |
116 | set | 118 | set |
117 | { | 119 | { |
118 | _dwell = value; | 120 | m_dwell = value; |
121 | LastDwellTimeMS = Util.GetTimeStampMS(); | ||
119 | } | 122 | } |
120 | } | 123 | } |
121 | 124 | ||
@@ -735,6 +738,7 @@ namespace OpenSim.Framework | |||
735 | SeeAVs = true; | 738 | SeeAVs = true; |
736 | AnyAVSounds = true; | 739 | AnyAVSounds = true; |
737 | GroupAVSounds = true; | 740 | GroupAVSounds = true; |
741 | LastDwellTimeMS = Util.GetTimeStampMS(); | ||
738 | } | 742 | } |
739 | 743 | ||
740 | /// <summary> | 744 | /// <summary> |
@@ -784,7 +788,7 @@ namespace OpenSim.Framework | |||
784 | landData._obscureMedia = _obscureMedia; | 788 | landData._obscureMedia = _obscureMedia; |
785 | landData._simwideArea = _simwideArea; | 789 | landData._simwideArea = _simwideArea; |
786 | landData._simwidePrims = _simwidePrims; | 790 | landData._simwidePrims = _simwidePrims; |
787 | landData._dwell = _dwell; | 791 | landData.m_dwell = m_dwell; |
788 | landData.SeeAVs = SeeAVs; | 792 | landData.SeeAVs = SeeAVs; |
789 | landData.AnyAVSounds = AnyAVSounds; | 793 | landData.AnyAVSounds = AnyAVSounds; |
790 | landData.GroupAVSounds = GroupAVSounds; | 794 | landData.GroupAVSounds = GroupAVSounds; |