Added ExternalName config on Gatekeeper.
parent
b1b9ac2e74
commit
7c00469cd2
|
@ -96,6 +96,12 @@ namespace OpenSim.Framework
|
|||
/// </summary>
|
||||
public UUID SessionID;
|
||||
|
||||
/// <summary>
|
||||
/// Hypergrid service token; generated by the user domain, consumed by the receiving grid.
|
||||
/// There is one such unique token for each grid visited.
|
||||
/// </summary>
|
||||
public string ServiceSessionID = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Position the Agent's Avatar starts in the region
|
||||
/// </summary>
|
||||
|
@ -156,6 +162,7 @@ namespace OpenSim.Framework
|
|||
args["inventory_folder"] = OSD.FromUUID(InventoryFolder);
|
||||
args["secure_session_id"] = OSD.FromUUID(SecureSessionID);
|
||||
args["session_id"] = OSD.FromUUID(SessionID);
|
||||
args["service_session_id"] = OSD.FromString(ServiceSessionID);
|
||||
args["start_pos"] = OSD.FromString(startpos.ToString());
|
||||
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
|
||||
|
||||
|
@ -253,6 +260,8 @@ namespace OpenSim.Framework
|
|||
SecureSessionID = args["secure_session_id"].AsUUID();
|
||||
if (args["session_id"] != null)
|
||||
SessionID = args["session_id"].AsUUID();
|
||||
if (args["service_session_id"] != null)
|
||||
ServiceSessionID = args["service_session_id"].AsString();
|
||||
if (args["start_pos"] != null)
|
||||
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
|
||||
|
||||
|
|
|
@ -157,6 +157,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
if (security != null)
|
||||
security.SetEndPoint(sp.ControllingClient.SessionId, sp.ControllingClient.RemoteEndPoint);
|
||||
|
||||
//string token = sp.Scene.AuthenticationService.MakeToken(sp.UUID, reg.ExternalHostName + ":" + reg.HttpPort, 30);
|
||||
// Log them out of this grid
|
||||
sp.Scene.PresenceService.LogoutAgent(agentCircuit.SessionID, sp.AbsolutePosition, sp.Lookat);
|
||||
|
||||
|
|
|
@ -63,17 +63,19 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
|||
string name = (string)requestData["region_name"];
|
||||
|
||||
UUID regionID = UUID.Zero;
|
||||
string externalName = string.Empty;
|
||||
string imageURL = string.Empty;
|
||||
ulong regionHandle = 0;
|
||||
string reason = string.Empty;
|
||||
|
||||
bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out imageURL, out reason);
|
||||
bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason);
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
hash["result"] = success.ToString();
|
||||
hash["uuid"] = regionID.ToString();
|
||||
hash["handle"] = regionHandle.ToString();
|
||||
hash["region_image"] = imageURL;
|
||||
hash["external_name"] = externalName;
|
||||
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
response.Value = hash;
|
||||
|
|
|
@ -45,11 +45,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
|||
return "/foreignobject/";
|
||||
}
|
||||
|
||||
public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string imageURL, out string reason)
|
||||
public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason)
|
||||
{
|
||||
regionID = UUID.Zero;
|
||||
imageURL = string.Empty;
|
||||
realHandle = 0;
|
||||
externalName = string.Empty;
|
||||
reason = string.Empty;
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
|
@ -97,9 +98,9 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
|||
//m_log.Debug(">> HERE, realHandle: " + realHandle);
|
||||
}
|
||||
if (hash["region_image"] != null)
|
||||
{
|
||||
imageURL = (string)hash["region_image"];
|
||||
}
|
||||
if (hash["external_name"] != null)
|
||||
externalName = (string)hash["external_name"];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -214,8 +214,9 @@ namespace OpenSim.Services.GridService
|
|||
// Finally, link it
|
||||
ulong handle = 0;
|
||||
UUID regionID = UUID.Zero;
|
||||
string externalName = string.Empty;
|
||||
string imageURL = string.Empty;
|
||||
if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out imageURL, out reason))
|
||||
if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out externalName, out imageURL, out reason))
|
||||
return false;
|
||||
|
||||
if (regionID != UUID.Zero)
|
||||
|
@ -229,11 +230,22 @@ namespace OpenSim.Services.GridService
|
|||
}
|
||||
|
||||
regInfo.RegionID = regionID;
|
||||
Uri uri = null;
|
||||
try
|
||||
{
|
||||
uri = new Uri(externalName);
|
||||
regInfo.ExternalHostName = uri.Host;
|
||||
regInfo.HttpPort = (uint)uri.Port;
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName);
|
||||
}
|
||||
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort + ":" + regInfo.RegionName;
|
||||
// Try get the map image
|
||||
regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
||||
// I need a texture that works for this... the one I tried doesn't seem to be working
|
||||
//regInfo.TerrainImage = m_HGMapImage;
|
||||
regInfo.TerrainImage = m_HGMapImage;
|
||||
|
||||
AddHyperlinkRegion(regInfo, handle);
|
||||
m_log.Info("[HYPERGRID LINKER]: Successfully linked to region_uuid " + regInfo.RegionID);
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace OpenSim.Services.HypergridService
|
|||
|
||||
UUID m_ScopeID;
|
||||
bool m_AllowTeleportsToAnyRegion;
|
||||
string m_ExternalName;
|
||||
GridRegion m_DefaultGatewayRegion;
|
||||
|
||||
public GatekeeperService(IConfigSource config, ISimulationService simService)
|
||||
|
@ -83,6 +84,7 @@ namespace OpenSim.Services.HypergridService
|
|||
UUID.TryParse(scope, out m_ScopeID);
|
||||
//m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
|
||||
m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
|
||||
m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
|
||||
|
||||
Object[] args = new Object[] { config };
|
||||
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
|
||||
|
@ -109,10 +111,11 @@ namespace OpenSim.Services.HypergridService
|
|||
{
|
||||
}
|
||||
|
||||
public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason)
|
||||
public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason)
|
||||
{
|
||||
regionID = UUID.Zero;
|
||||
regionHandle = 0;
|
||||
externalName = m_ExternalName;
|
||||
imageURL = string.Empty;
|
||||
reason = string.Empty;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace OpenSim.Services.Interfaces
|
|||
{
|
||||
public interface IGatekeeperService
|
||||
{
|
||||
bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason);
|
||||
bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason);
|
||||
GridRegion GetHyperlinkRegion(UUID regionID);
|
||||
|
||||
bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason);
|
||||
|
|
|
@ -83,6 +83,8 @@
|
|||
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
|
||||
GridService = "OpenSim.Services.GridService.dll:GridService"
|
||||
AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector"
|
||||
; how does the outside world reach me? This acts as public key too.
|
||||
ExternalName = "http://127.0.0.1:9000"
|
||||
|
||||
[HGEntityTransferModule]
|
||||
HomeUsersSecurityService = "OpenSim.Services.HypergridService.dll:HomeUsersSecurityService"
|
||||
|
|
Loading…
Reference in New Issue