mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Finally moved HG agent transfers to use agent fatpacks.
This commit is contained in:
@@ -79,11 +79,27 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
return "agent/";
|
||||
}
|
||||
|
||||
protected virtual void PackData(OSDMap args, AgentCircuitData aCircuit, GridRegion destination, uint flags)
|
||||
{
|
||||
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
||||
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
||||
args["destination_name"] = OSD.FromString(destination.RegionName);
|
||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||
args["teleport_flags"] = OSD.FromString(flags.ToString());
|
||||
}
|
||||
|
||||
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
|
||||
{
|
||||
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CreateAgent start");
|
||||
|
||||
string tmp = String.Empty;
|
||||
return CreateAgent(destination, aCircuit, flags, out tmp, out reason);
|
||||
}
|
||||
|
||||
public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason)
|
||||
{
|
||||
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI);
|
||||
reason = String.Empty;
|
||||
myipaddress = String.Empty;
|
||||
|
||||
if (destination == null)
|
||||
{
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null");
|
||||
@@ -95,12 +111,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
try
|
||||
{
|
||||
OSDMap args = aCircuit.PackAgentCircuitData();
|
||||
|
||||
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
||||
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
|
||||
args["destination_name"] = OSD.FromString(destination.RegionName);
|
||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||
args["teleport_flags"] = OSD.FromString(flags.ToString());
|
||||
PackData(args, aCircuit, destination, flags);
|
||||
|
||||
OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000);
|
||||
bool success = result["success"].AsBoolean();
|
||||
@@ -110,6 +121,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
|
||||
reason = data["reason"].AsString();
|
||||
success = data["success"].AsBoolean();
|
||||
myipaddress = data["your_ip"].AsString();
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -124,6 +136,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
|
||||
reason = data["reason"].AsString();
|
||||
success = data["success"].AsBoolean();
|
||||
myipaddress = data["your_ip"].AsString();
|
||||
m_log.WarnFormat(
|
||||
"[REMOTE SIMULATION CONNECTOR]: Remote simulator {0} did not accept compressed transfer, suggest updating it.", destination.RegionName);
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user