Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service.

This commit is contained in:
Diva Canto
2011-04-28 20:19:54 -07:00
parent 35f190cc92
commit 9892e115cc
13 changed files with 157 additions and 156 deletions

View File

@@ -50,6 +50,7 @@ namespace OpenSim.Server.Handlers.Simulation
public class AgentHandler
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private ISimulationService m_SimulationService;
protected bool m_Proxy = false;
@@ -275,7 +276,7 @@ namespace OpenSim.Server.Handlers.Simulation
AgentData agent = new AgentData();
try
{
agent.Unpack(args);
agent.Unpack(args, m_SimulationService.GetScene(destination.RegionHandle));
}
catch (Exception ex)
{
@@ -295,7 +296,7 @@ namespace OpenSim.Server.Handlers.Simulation
AgentPosition agent = new AgentPosition();
try
{
agent.Unpack(args);
agent.Unpack(args, m_SimulationService.GetScene(destination.RegionHandle));
}
catch (Exception ex)
{
@@ -342,7 +343,8 @@ namespace OpenSim.Server.Handlers.Simulation
destination.RegionID = regionID;
string reason;
bool result = m_SimulationService.QueryAccess(destination, id, position, out reason);
string version;
bool result = m_SimulationService.QueryAccess(destination, id, position, out version, out reason);
responsedata["int_response_code"] = HttpStatusCode.OK;
@@ -350,6 +352,7 @@ namespace OpenSim.Server.Handlers.Simulation
resp["success"] = OSD.FromBoolean(result);
resp["reason"] = OSD.FromString(reason);
resp["version"] = OSD.FromString(version);
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp);
}