* Bug fix in HG: preserve the home region coordinates across multiple HG TPs.

* Removed unnecessary debug messages.
mysql-performance
Diva Canto 2009-12-19 10:16:07 -08:00
parent 9485f17bf9
commit 26e3a8ee4b
3 changed files with 16 additions and 5 deletions

View File

@ -405,6 +405,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
if (parts.Length >= 2) if (parts.Length >= 2)
{ {
portstr = parts[1]; portstr = parts[1];
//m_log.Debug("-- port = " + portstr);
if (!UInt32.TryParse(portstr, out port)) if (!UInt32.TryParse(portstr, out port))
regionName = parts[1]; regionName = parts[1];
} }
@ -620,8 +621,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
clonedRegion.RegionLocX = (int)x; clonedRegion.RegionLocX = (int)x;
clonedRegion.RegionLocY = (int)y; clonedRegion.RegionLocY = (int)y;
// Get the user's home region information // Get the user's home region information and adapt the region handle
GridRegion home = m_aScene.GridService.GetRegionByUUID(m_aScene.RegionInfo.ScopeID, uinfo.UserProfile.HomeRegionID); GridRegion home = GetRegionByUUID(m_aScene.RegionInfo.ScopeID, uinfo.UserProfile.HomeRegionID);
if (m_HyperlinkHandles.ContainsKey(uinfo.UserProfile.HomeRegionID))
{
ulong realHandle = m_HyperlinkHandles[uinfo.UserProfile.HomeRegionID];
Utils.LongToUInts(realHandle, out x, out y);
m_log.DebugFormat("[HGrid]: Foreign user is going elsewhere. Adjusting home handle from {0}-{1} to {2}-{3}", home.RegionLocX, home.RegionLocY, x, y);
home.RegionLocX = (int)x;
home.RegionLocY = (int)y;
}
// Get the user's service URLs // Get the user's service URLs
string serverURI = ""; string serverURI = "";

View File

@ -157,7 +157,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
} }
// m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle); // m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle);
reason = "Did not find region."; uint x = 0, y = 0;
Utils.LongToUInts(regionHandle, out x, out y);
reason = "Did not find region " + x + "-" + y;
return false; return false;
} }

View File

@ -92,12 +92,12 @@ namespace OpenSim.Services.Connectors.Grid
try try
{ {
UUID.TryParse((string)hash["uuid"], out uuid); UUID.TryParse((string)hash["uuid"], out uuid);
m_log.Debug(">> HERE, uuid: " + uuid); //m_log.Debug(">> HERE, uuid: " + uuid);
info.RegionID = uuid; info.RegionID = uuid;
if ((string)hash["handle"] != null) if ((string)hash["handle"] != null)
{ {
realHandle = Convert.ToUInt64((string)hash["handle"]); realHandle = Convert.ToUInt64((string)hash["handle"]);
m_log.Debug(">> HERE, realHandle: " + realHandle); //m_log.Debug(">> HERE, realHandle: " + realHandle);
} }
//if (hash["region_image"] != null) //if (hash["region_image"] != null)
//{ //{