make CreateAgent sync for logins, async for other cases

avinationmerge
UbitUmarov 2014-09-24 20:57:23 +01:00
parent c9079360b9
commit df773ee8c3
1 changed files with 17 additions and 12 deletions

View File

@ -387,20 +387,25 @@ namespace OpenSim.Server.Handlers.Simulation
protected virtual bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) protected virtual bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
{ {
reason = String.Empty; reason = String.Empty;
/* if ((teleportFlags & (uint)TeleportFlags.ViaLogin) == 0)
Util.FireAndForget(x =>
{ {
string r; Util.FireAndForget(x =>
m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out r); {
string r;
m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out r);
m_log.DebugFormat("[AGENT HANDLER]: ASYNC CreateAgent {0} {1}", r);
});
return true;
}
else
{
bool ret = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason);
m_log.DebugFormat("[AGENT HANDLER]: SYNC CreateAgent {0} {1}", ret.ToString(), reason);
return ret;
}
});
return true;
*/
bool ret = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason);
m_log.DebugFormat("[AGENT HANDLER]: CreateAgent {0} {1}", ret.ToString(),reason);
return ret;
} }
} }