Add log messages on teleport failure to better pin down the cause.

0.7.1-dev
Justin Clark-Casey (justincc) 2011-03-09 22:03:12 +00:00
parent 3e5b1a1de5
commit 20aeace8d7
3 changed files with 19 additions and 6 deletions

View File

@ -399,6 +399,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (!UpdateAgent(reg, finalDestination, agent)) if (!UpdateAgent(reg, finalDestination, agent))
{ {
// Region doesn't take it // Region doesn't take it
m_log.WarnFormat(
"[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Returning avatar to source region.",
sp.Name, finalDestination.RegionName);
Fail(sp, finalDestination); Fail(sp, finalDestination);
return; return;
} }
@ -425,16 +429,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// that the client contacted the destination before we send the attachments and close things here. // that the client contacted the destination before we send the attachments and close things here.
if (!WaitForCallback(sp.UUID)) if (!WaitForCallback(sp.UUID))
{ {
m_log.WarnFormat(
"[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} failed due to no callback from destination region. Returning avatar to source region.",
sp.Name, finalDestination.RegionName);
Fail(sp, finalDestination); Fail(sp, finalDestination);
return; return;
} }
// CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it
CrossAttachmentsIntoNewRegion(finalDestination, sp, true); CrossAttachmentsIntoNewRegion(finalDestination, sp, true);
// Well, this is it. The agent is over there. // Well, this is it. The agent is over there.
KillEntity(sp.Scene, sp.LocalId); KillEntity(sp.Scene, sp.LocalId);
// May need to logout or other cleanup // May need to logout or other cleanup

View File

@ -79,9 +79,6 @@ namespace OpenSim.Services.Connectors.Simulation
return "agent/"; return "agent/";
} }
/// <summary>
///
/// </summary>
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
{ {
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CreateAgent start"); // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CreateAgent start");
@ -109,6 +106,9 @@ namespace OpenSim.Services.Connectors.Simulation
if (result["Success"].AsBoolean()) if (result["Success"].AsBoolean())
return true; return true;
m_log.WarnFormat(
"[REMOTE SIMULATION CONNECTOR]: Failed to create agent {0} {1} at remote simulator {1}",
aCircuit.firstname, aCircuit.lastname, destination.RegionName);
reason = result["Message"] != null ? result["Message"].AsString() : "error"; reason = result["Message"] != null ? result["Message"].AsString() : "error";
return false; return false;
} }

View File

@ -40,6 +40,13 @@ namespace OpenSim.Services.Interfaces
#region Agents #region Agents
/// <summary>
/// Ask the simulator hosting the destination to create an agent on that region.
/// </summary>
/// <param name="destination"></param>
/// <param name="aCircuit"></param>
/// <param name="flags"></param>
/// <param name="reason">Reason message in the event of a failure.</param>
bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason); bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason);
/// <summary> /// <summary>