* refactor refactor refactor ServerURI 4 lyfe

This commit is contained in:
Jonathan Freedman
2010-10-02 19:17:02 -04:00
parent 6fc1ceb2ee
commit 32ccc7a9d9
14 changed files with 72 additions and 94 deletions

View File

@@ -145,13 +145,13 @@ namespace OpenSim.Services.HypergridService
region.RegionLocY = finalDestination.RegionLocY;
// Generate a new service session
agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random();
agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
//bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
bool success = false;
string myExternalIP = string.Empty;
string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort;
string gridName = gatekeeper.ServerURI;
if (m_GridName == gridName)
success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
else
@@ -160,7 +160,7 @@ namespace OpenSim.Services.HypergridService
if (!success)
{
m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}",
agentCircuit.firstname, agentCircuit.lastname, region.ExternalHostName + ":" + region.HttpPort, reason);
agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
// restore the old travel info
lock (m_TravelingAgents)
@@ -206,7 +206,7 @@ namespace OpenSim.Services.HypergridService
m_TravelingAgents[agentCircuit.SessionID] = travel;
}
travel.UserID = agentCircuit.AgentID;
travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort;
travel.GridExternalName = region.ServerURI;
travel.ServiceToken = agentCircuit.ServiceSessionID;
if (old != null)
travel.ClientIPAddress = old.ClientIPAddress;