mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
replace no thread safe code
This commit is contained in:
@@ -278,10 +278,12 @@ namespace OpenSim.Services.Connectors
|
||||
|
||||
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
||||
{
|
||||
GridRegion rinfo = null;
|
||||
ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y);
|
||||
|
||||
if (m_regionCache.Contains(regionHandle))
|
||||
return (GridRegion)m_regionCache[regionHandle];
|
||||
// this cache includes NULL regions
|
||||
if (m_regionCache.TryGetValue(regionHandle, out rinfo))
|
||||
return rinfo;
|
||||
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
|
||||
@@ -304,7 +306,6 @@ namespace OpenSim.Services.Connectors
|
||||
return null;
|
||||
}
|
||||
|
||||
GridRegion rinfo = null;
|
||||
if (reply != string.Empty)
|
||||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
Reference in New Issue
Block a user