aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Simulation
diff options
context:
space:
mode:
authorDiva Canto2013-06-21 20:52:46 -0700
committerDiva Canto2013-06-21 20:52:46 -0700
commit4778d67005c3364ee3f75bdd6640f03ff945d885 (patch)
treeb77a75fe01a7e7b5aa0114d655edca7683b8c51d /OpenSim/Services/Connectors/Simulation
parentBulletSim: Implementation of Linear Deflection, it is a partial help for the ... (diff)
downloadopensim-SC_OLD-4778d67005c3364ee3f75bdd6640f03ff945d885.zip
opensim-SC_OLD-4778d67005c3364ee3f75bdd6640f03ff945d885.tar.gz
opensim-SC_OLD-4778d67005c3364ee3f75bdd6640f03ff945d885.tar.bz2
opensim-SC_OLD-4778d67005c3364ee3f75bdd6640f03ff945d885.tar.xz
Finally moved HG agent transfers to use agent fatpacks.
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs29
1 files changed, 21 insertions, 8 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 57f2ffa..e247008 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -79,11 +79,27 @@ 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)
83 {
84 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
85 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
86 args["destination_name"] = OSD.FromString(destination.RegionName);
87 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
88 args["teleport_flags"] = OSD.FromString(flags.ToString());
89 }
90
82 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) 91 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
83 { 92 {
84 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CreateAgent start"); 93 string tmp = String.Empty;
85 94 return CreateAgent(destination, aCircuit, flags, out tmp, out reason);
95 }
96
97 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason)
98 {
99 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI);
86 reason = String.Empty; 100 reason = String.Empty;
101 myipaddress = String.Empty;
102
87 if (destination == null) 103 if (destination == null)
88 { 104 {
89 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); 105 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null");
@@ -95,12 +111,7 @@ namespace OpenSim.Services.Connectors.Simulation
95 try 111 try
96 { 112 {
97 OSDMap args = aCircuit.PackAgentCircuitData(); 113 OSDMap args = aCircuit.PackAgentCircuitData();
98 114 PackData(args, aCircuit, destination, flags);
99 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
100 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
101 args["destination_name"] = OSD.FromString(destination.RegionName);
102 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
103 args["teleport_flags"] = OSD.FromString(flags.ToString());
104 115
105 OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); 116 OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000);
106 bool success = result["success"].AsBoolean(); 117 bool success = result["success"].AsBoolean();
@@ -110,6 +121,7 @@ namespace OpenSim.Services.Connectors.Simulation
110 121
111 reason = data["reason"].AsString(); 122 reason = data["reason"].AsString();
112 success = data["success"].AsBoolean(); 123 success = data["success"].AsBoolean();
124 myipaddress = data["your_ip"].AsString();
113 return success; 125 return success;
114 } 126 }
115 127
@@ -124,6 +136,7 @@ namespace OpenSim.Services.Connectors.Simulation
124 136
125 reason = data["reason"].AsString(); 137 reason = data["reason"].AsString();
126 success = data["success"].AsBoolean(); 138 success = data["success"].AsBoolean();
139 myipaddress = data["your_ip"].AsString();
127 m_log.WarnFormat( 140 m_log.WarnFormat(
128 "[REMOTE SIMULATION CONNECTOR]: Remote simulator {0} did not accept compressed transfer, suggest updating it.", destination.RegionName); 141 "[REMOTE SIMULATION CONNECTOR]: Remote simulator {0} did not accept compressed transfer, suggest updating it.", destination.RegionName);
129 return success; 142 return success;