diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 98686f8..a5520c4 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -79,22 +79,32 @@ namespace OpenSim.Services.Connectors.Simulation | |||
79 | return "agent/"; | 79 | return "agent/"; |
80 | } | 80 | } |
81 | 81 | ||
82 | protected virtual void PackData(OSDMap args, AgentCircuitData aCircuit, GridRegion destination, uint flags) | 82 | protected virtual void PackData(OSDMap args, GridRegion source, AgentCircuitData aCircuit, GridRegion destination, uint flags) |
83 | { | 83 | { |
84 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | 84 | if (source != null) |
85 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | 85 | { |
86 | args["destination_name"] = OSD.FromString(destination.RegionName); | 86 | args["source_x"] = OSD.FromString(source.RegionLocX.ToString()); |
87 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 87 | args["source_y"] = OSD.FromString(source.RegionLocY.ToString()); |
88 | args["teleport_flags"] = OSD.FromString(flags.ToString()); | 88 | args["source_name"] = OSD.FromString(source.RegionName); |
89 | args["source_uuid"] = OSD.FromString(source.RegionID.ToString()); | ||
90 | if (!String.IsNullOrEmpty(source.RawServerURI)) | ||
91 | args["source_server_uri"] = OSD.FromString(source.RawServerURI); | ||
92 | } | ||
93 | |||
94 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | ||
95 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | ||
96 | args["destination_name"] = OSD.FromString(destination.RegionName); | ||
97 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | ||
98 | args["teleport_flags"] = OSD.FromString(flags.ToString()); | ||
89 | } | 99 | } |
90 | 100 | ||
91 | public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) | 101 | public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) |
92 | { | 102 | { |
93 | string tmp = String.Empty; | 103 | string tmp = String.Empty; |
94 | return CreateAgent(destination, aCircuit, flags, out tmp, out reason); | 104 | return CreateAgent(source, destination, aCircuit, flags, out tmp, out reason); |
95 | } | 105 | } |
96 | 106 | ||
97 | public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason) | 107 | public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason) |
98 | { | 108 | { |
99 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); | 109 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); |
100 | reason = String.Empty; | 110 | reason = String.Empty; |
@@ -111,7 +121,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
111 | try | 121 | try |
112 | { | 122 | { |
113 | OSDMap args = aCircuit.PackAgentCircuitData(); | 123 | OSDMap args = aCircuit.PackAgentCircuitData(); |
114 | PackData(args, aCircuit, destination, flags); | 124 | PackData(args, source, aCircuit, destination, flags); |
115 | 125 | ||
116 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); | 126 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); |
117 | bool success = result["success"].AsBoolean(); | 127 | bool success = result["success"].AsBoolean(); |