replace no thread safe code
parent
092d4fb9ff
commit
7e751d5010
|
@ -278,10 +278,12 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
||||||
{
|
{
|
||||||
|
GridRegion rinfo = null;
|
||||||
ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y);
|
ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y);
|
||||||
|
|
||||||
if (m_regionCache.Contains(regionHandle))
|
// this cache includes NULL regions
|
||||||
return (GridRegion)m_regionCache[regionHandle];
|
if (m_regionCache.TryGetValue(regionHandle, out rinfo))
|
||||||
|
return rinfo;
|
||||||
|
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -304,7 +306,6 @@ namespace OpenSim.Services.Connectors
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
GridRegion rinfo = null;
|
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||||
|
|
Loading…
Reference in New Issue