MapImageService: changed the event at which the map tiles are uploaded, because they were being uploaded before the region was registered with the grid

This commit is contained in:
Diva Canto
2012-04-27 11:05:40 -07:00
parent a9dbe39319
commit 9bc94c502a
2 changed files with 14 additions and 5 deletions

View File

@@ -129,10 +129,10 @@ namespace OpenSim.Server.Handlers.MapImage
if (m_GridService != null)
{
System.Net.IPAddress ipAddr = GetCallerIP(httpRequest);
GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, x * (int)Constants.RegionSize, y * (int)Constants.RegionSize);
if (r != null)
{
System.Net.IPAddress ipAddr = GetCallerIP(httpRequest);
if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString())
{
m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be trying to impersonate region in IP {1}", ipAddr, r.ExternalEndPoint.Address);
@@ -143,7 +143,7 @@ namespace OpenSim.Server.Handlers.MapImage
else
{
m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
httpRequest.RemoteIPEndPoint.Address, x, y);
ipAddr, x, y);
return FailureResult("Region not found at given coordinates");
}
}