diff options
author | UbitUmarov | 2016-09-19 12:39:22 +0100 |
---|---|---|
committer | UbitUmarov | 2016-09-19 12:39:22 +0100 |
commit | 7e751d5010f56daefe1a5f50d0ccfd9a6732288d (patch) | |
tree | 55436aaab2bd15aa5871a011b69e693446198b12 /OpenSim | |
parent | fix typo in table name, thx tglion (diff) | |
download | opensim-SC_OLD-7e751d5010f56daefe1a5f50d0ccfd9a6732288d.zip opensim-SC_OLD-7e751d5010f56daefe1a5f50d0ccfd9a6732288d.tar.gz opensim-SC_OLD-7e751d5010f56daefe1a5f50d0ccfd9a6732288d.tar.bz2 opensim-SC_OLD-7e751d5010f56daefe1a5f50d0ccfd9a6732288d.tar.xz |
replace no thread safe code
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index 6c6ccf9..ceb2146 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | |||
@@ -278,10 +278,12 @@ namespace OpenSim.Services.Connectors | |||
278 | 278 | ||
279 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) | 279 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) |
280 | { | 280 | { |
281 | GridRegion rinfo = null; | ||
281 | ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y); | 282 | ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y); |
282 | 283 | ||
283 | if (m_regionCache.Contains(regionHandle)) | 284 | // this cache includes NULL regions |
284 | return (GridRegion)m_regionCache[regionHandle]; | 285 | if (m_regionCache.TryGetValue(regionHandle, out rinfo)) |
286 | return rinfo; | ||
285 | 287 | ||
286 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 288 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
287 | 289 | ||
@@ -304,7 +306,6 @@ namespace OpenSim.Services.Connectors | |||
304 | return null; | 306 | return null; |
305 | } | 307 | } |
306 | 308 | ||
307 | GridRegion rinfo = null; | ||
308 | if (reply != string.Empty) | 309 | if (reply != string.Empty) |
309 | { | 310 | { |
310 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 311 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |