Change the auth token to be the user's sessionid.

cpu-performance
Diva Canto 2013-07-14 07:28:40 -07:00
parent fcb0349d56
commit f3b3e21dea
4 changed files with 10 additions and 7 deletions

View File

@ -817,7 +817,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
"[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.",
sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
Fail(sp, finalDestination, logout, Util.Md5Hash(currentAgentCircuit.Id0), "Connection between viewer and destination region could not be established."); Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
return; return;
} }
@ -829,7 +829,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
"[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request",
sp.Name, finalDestination.RegionName, sp.Scene.Name); sp.Name, finalDestination.RegionName, sp.Scene.Name);
CleanupFailedInterRegionTeleport(sp, Util.Md5Hash(currentAgentCircuit.Id0), finalDestination); CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination);
return; return;
} }
@ -873,7 +873,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
"[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.",
sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
Fail(sp, finalDestination, logout, Util.Md5Hash(currentAgentCircuit.Id0), "Destination region did not signal teleport completion."); Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion.");
return; return;
} }

View File

@ -3452,7 +3452,7 @@ namespace OpenSim.Region.Framework.Scenes
regions.Remove(RegionInfo.RegionHandle); regions.Remove(RegionInfo.RegionHandle);
// This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
m_sceneGridService.SendCloseChildAgentConnections(agentID, acd.Id0 != null ? Util.Md5Hash(acd.Id0) : string.Empty, regions); m_sceneGridService.SendCloseChildAgentConnections(agentID, acd.SessionID.ToString(), regions);
} }
m_eventManager.TriggerClientClosed(agentID, this); m_eventManager.TriggerClientClosed(agentID, this);
@ -4290,7 +4290,7 @@ namespace OpenSim.Region.Framework.Scenes
// Check that the auth_token is valid // Check that the auth_token is valid
AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID);
if (acd != null && Util.Md5Hash(acd.Id0) == auth_token) if (acd != null && acd.SessionID.ToString() == auth_token)
return IncomingCloseAgent(agentID, force); return IncomingCloseAgent(agentID, force);
else else
m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token);

View File

@ -3168,7 +3168,7 @@ namespace OpenSim.Region.Framework.Scenes
AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID); AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID);
string auth = string.Empty; string auth = string.Empty;
if (acd != null) if (acd != null)
auth = Util.Md5Hash(acd.Id0); auth = acd.SessionID.ToString();
m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions); m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions);
} }

View File

@ -159,7 +159,10 @@ namespace OpenSim.Server.Handlers.Simulation
protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID, string auth_token) protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID, string auth_token)
{ {
m_log.DebugFormat("[AGENT HANDLER]: >>> DELETE action: {0}; RegionID: {1}; from: {2}; auth_code: {3}", action, regionID, Util.GetCallerIP(request), auth_token); if (string.IsNullOrEmpty(action))
m_log.DebugFormat("[AGENT HANDLER]: >>> DELETE <<< RegionID: {0}; from: {1}; auth_code: {2}", regionID, Util.GetCallerIP(request), auth_token);
else
m_log.DebugFormat("[AGENT HANDLER]: Release {0} to RegionID: {1}", id, regionID);
GridRegion destination = new GridRegion(); GridRegion destination = new GridRegion();
destination.RegionID = regionID; destination.RegionID = regionID;