aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-09 08:03:25 +0300
committerOren Hurvitz2014-04-09 09:22:20 +0100
commit06e0528d0b9929cbd8d2b360b0baa00288340d13 (patch)
tree0ffd33e5eda96badff712bdd78794ce6debbb392 /OpenSim/Server/Handlers
parentLog when the presence service logs-out all the users in a region (diff)
downloadopensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.zip
opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.tar.gz
opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.tar.bz2
opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.tar.xz
In teleports, pass the source region to the destination (similar to an HTTP referrer)
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs5
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs5
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs23
3 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
index adc2fbc..95a0510 100644
--- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
@@ -61,9 +61,10 @@ namespace OpenSim.Server.Handlers.Hypergrid
61 m_Proxy = proxy; 61 m_Proxy = proxy;
62 } 62 }
63 63
64 protected override bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) 64 protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination,
65 AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
65 { 66 {
66 return m_GatekeeperService.LoginAgent(aCircuit, destination, out reason); 67 return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason);
67 } 68 }
68 } 69 }
69} 70}
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
index 04bb9e8..e787f7c 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
@@ -117,9 +117,10 @@ namespace OpenSim.Server.Handlers.Hypergrid
117 } 117 }
118 118
119 119
120 protected override bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) 120 protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination,
121 AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
121 { 122 {
122 return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, fromLogin, out reason); 123 return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason);
123 } 124 }
124 125
125 } 126 }
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index c495b60..0d7f259 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -307,13 +307,29 @@ namespace OpenSim.Server.Handlers.Simulation
307 return; 307 return;
308 } 308 }
309 309
310 GridRegion source = null;
311
312 if (args.ContainsKey("source_uuid"))
313 {
314 source = new GridRegion();
315 source.RegionLocX = Int32.Parse(args["source_x"].AsString());
316 source.RegionLocY = Int32.Parse(args["source_y"].AsString());
317 source.RegionName = args["source_name"].AsString();
318 source.RegionID = UUID.Parse(args["source_uuid"].AsString());
319
320 if (args.ContainsKey("source_server_uri"))
321 source.RawServerURI = args["source_server_uri"].AsString();
322 else
323 source.RawServerURI = null;
324 }
325
310 OSDMap resp = new OSDMap(2); 326 OSDMap resp = new OSDMap(2);
311 string reason = String.Empty; 327 string reason = String.Empty;
312 328
313 // This is the meaning of POST agent 329 // This is the meaning of POST agent
314 //m_regionClient.AdjustUserInformation(aCircuit); 330 //m_regionClient.AdjustUserInformation(aCircuit);
315 //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); 331 //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason);
316 bool result = CreateAgent(gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason); 332 bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason);
317 333
318 resp["reason"] = OSD.FromString(reason); 334 resp["reason"] = OSD.FromString(reason);
319 resp["success"] = OSD.FromBoolean(result); 335 resp["success"] = OSD.FromBoolean(result);
@@ -387,9 +403,10 @@ namespace OpenSim.Server.Handlers.Simulation
387 } 403 }
388 404
389 // subclasses can override this 405 // subclasses can override this
390 protected virtual bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) 406 protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination,
407 AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason)
391 { 408 {
392 return m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); 409 return m_SimulationService.CreateAgent(source, destination, aCircuit, teleportFlags, out reason);
393 } 410 }
394 } 411 }
395 412