mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user