From 06e0528d0b9929cbd8d2b360b0baa00288340d13 Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Wed, 9 Apr 2014 08:03:25 +0300
Subject: In teleports, pass the source region to the destination (similar to
an HTTP referrer)
---
OpenSim/Services/Interfaces/IGridService.cs | 14 ++++++++++++--
OpenSim/Services/Interfaces/IHypergridServices.cs | 5 +++--
OpenSim/Services/Interfaces/ISimulationService.cs | 4 +++-
3 files changed, 18 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Services/Interfaces')
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 8e6279e..bbf95ad 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Services.Interfaces
public string ServerURI
{
get {
- if ( m_serverURI != string.Empty ) {
+ if (!String.IsNullOrEmpty(m_serverURI)) {
return m_serverURI;
} else {
if (m_httpPort == 0)
@@ -152,7 +152,7 @@ namespace OpenSim.Services.Interfaces
}
}
set {
- if ( value.EndsWith("/") ) {
+ if (value.EndsWith("/")) {
m_serverURI = value;
} else {
m_serverURI = value + '/';
@@ -161,6 +161,16 @@ namespace OpenSim.Services.Interfaces
}
protected string m_serverURI;
+ ///
+ /// Provides direct access to the 'm_serverURI' field, without returning a generated URL if m_serverURI is missing.
+ ///
+ public string RawServerURI
+ {
+ get { return m_serverURI; }
+ set { m_serverURI = value; }
+ }
+
+
public string RegionName
{
get { return m_regionName; }
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index 30f27ee..5e012fb 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -52,13 +52,14 @@ namespace OpenSim.Services.Interfaces
/// The region the visitor should enter, or null if no region can be found / is allowed
GridRegion GetHyperlinkRegion(UUID regionID, UUID agentID, string agentHomeURI, out string message);
- bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason);
+ bool LoginAgent(GridRegion source, AgentCircuitData aCircuit, GridRegion destination, out string reason);
}
public interface IUserAgentService
{
- bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason);
+ bool LoginAgentToGrid(GridRegion source, AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason);
+
void LogoutAgent(UUID userID, UUID sessionID);
///
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index d359056..375a35c 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -53,11 +53,13 @@ namespace OpenSim.Services.Interfaces
///
/// Ask the simulator hosting the destination to create an agent on that region.
///
+ /// The region that the user is coming from. Will be null if the user
+ /// logged-in directly, or arrived from a simulator that doesn't send this parameter.
///
///
///
/// Reason message in the event of a failure.
- bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason);
+ bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason);
///
/// Full child agent update.
--
cgit v1.1