Plumb the rest of the context stuff. Well, what I see so far anyway
parent
3da0a318b3
commit
f88e4a1ec9
|
@ -62,7 +62,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
}
|
||||
|
||||
protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination,
|
||||
AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
|
||||
AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason)
|
||||
{
|
||||
return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason);
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
|
||||
|
||||
protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination,
|
||||
AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
|
||||
AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason)
|
||||
{
|
||||
return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,8 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
protected virtual void DoQueryAccess(Hashtable request, Hashtable responsedata, UUID agentID, UUID regionID)
|
||||
{
|
||||
EntityTransferContext ctx = new EntityTransferContext();
|
||||
|
||||
if (m_SimulationService == null)
|
||||
{
|
||||
m_log.Debug("[AGENT HANDLER]: Agent QUERY called. Harmless but useless.");
|
||||
|
@ -155,6 +157,9 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
theirVersion = float.Parse(parts[1]);
|
||||
}
|
||||
|
||||
if (args.ContainsKey("context"))
|
||||
ctx.Unpack((OSDMap)args["context"]);
|
||||
|
||||
// Decode the new versioning data
|
||||
float minVersionRequired = 0f;
|
||||
float maxVersionRequired = 0f;
|
||||
|
@ -245,7 +250,6 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
string reason;
|
||||
// We're sending the version numbers down to the local connector to do the varregion check.
|
||||
EntityTransferContext ctx = new EntityTransferContext();
|
||||
ctx.InboundVersion = inboundVersion;
|
||||
ctx.OutboundVersion = outboundVersion;
|
||||
if (minVersionProvided == 0f)
|
||||
|
@ -406,6 +410,8 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
protected void DoAgentPost(Hashtable request, Hashtable responsedata, UUID id)
|
||||
{
|
||||
EntityTransferContext ctx = new EntityTransferContext();
|
||||
|
||||
OSDMap args = Utils.GetOSDMap((string)request["body"]);
|
||||
if (args == null)
|
||||
{
|
||||
|
@ -414,6 +420,9 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.ContainsKey("context"))
|
||||
ctx.Unpack((OSDMap)args["context"]);
|
||||
|
||||
AgentDestinationData data = CreateAgentDestinationData();
|
||||
UnpackData(args, data, request);
|
||||
|
||||
|
@ -461,7 +470,7 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
//m_regionClient.AdjustUserInformation(aCircuit);
|
||||
//bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason);
|
||||
|
||||
bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason);
|
||||
bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out reason);
|
||||
|
||||
resp["reason"] = OSD.FromString(reason);
|
||||
resp["success"] = OSD.FromBoolean(result);
|
||||
|
@ -536,12 +545,11 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
// subclasses can override this
|
||||
protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination,
|
||||
AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
|
||||
AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason)
|
||||
{
|
||||
reason = String.Empty;
|
||||
// The data and protocols are already defined so this is just a dummy to satisfy the interface
|
||||
// TODO: make this end-to-end
|
||||
EntityTransferContext ctx = new EntityTransferContext();
|
||||
if ((teleportFlags & (uint)TeleportFlags.ViaLogin) == 0)
|
||||
{
|
||||
Util.FireAndForget(x =>
|
||||
|
@ -683,6 +691,8 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
UUID.TryParse(args["destination_uuid"].AsString(), out uuid);
|
||||
if (args.ContainsKey("destination_name") && args["destination_name"] != null)
|
||||
regionname = args["destination_name"].ToString();
|
||||
if (args.ContainsKey("context"))
|
||||
ctx.Unpack((OSDMap)args["context"]);
|
||||
|
||||
GridRegion destination = new GridRegion();
|
||||
destination.RegionID = uuid;
|
||||
|
|
|
@ -122,6 +122,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
try
|
||||
{
|
||||
OSDMap args = aCircuit.PackAgentCircuitData(ctx);
|
||||
args["context"] = ctx.Pack();
|
||||
PackData(args, source, aCircuit, destination, flags);
|
||||
|
||||
OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000);
|
||||
|
@ -266,6 +267,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
||||
args["destination_name"] = OSD.FromString(destination.RegionName);
|
||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||
args["context"] = ctx.Pack();
|
||||
|
||||
OSDMap result = WebUtil.PutToServiceCompressed(uri, args, timeout);
|
||||
if (result["Success"].AsBoolean())
|
||||
|
@ -308,6 +310,8 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin));
|
||||
request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax));
|
||||
|
||||
request.Add("context", ctx.Pack());
|
||||
|
||||
OSDArray features = new OSDArray();
|
||||
foreach (UUID feature in featuresAvailable)
|
||||
features.Add(OSD.FromString(feature.ToString()));
|
||||
|
|
Loading…
Reference in New Issue