Added the login region's http to the login response.
parent
c268b71f4b
commit
c7d0e4ffc1
|
@ -70,8 +70,11 @@ namespace OpenSim.Framework.Communications
|
||||||
: base(userManager, libraryRootFolder, welcomeMess)
|
: base(userManager, libraryRootFolder, welcomeMess)
|
||||||
{
|
{
|
||||||
this.m_serversInfo = serversInfo;
|
this.m_serversInfo = serversInfo;
|
||||||
m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX;
|
if (m_serversInfo != null)
|
||||||
m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY;
|
{
|
||||||
|
m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX;
|
||||||
|
m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY;
|
||||||
|
}
|
||||||
m_authUsers = authenticate;
|
m_authUsers = authenticate;
|
||||||
|
|
||||||
m_interServiceInventoryService = interServiceInventoryService;
|
m_interServiceInventoryService = interServiceInventoryService;
|
||||||
|
@ -101,7 +104,6 @@ namespace OpenSim.Framework.Communications
|
||||||
uint uy = (uint)(y / Constants.RegionSize);
|
uint uy = (uint)(y / Constants.RegionSize);
|
||||||
ulong regionHandle = Util.UIntsToLong(ux, uy);
|
ulong regionHandle = Util.UIntsToLong(ux, uy);
|
||||||
responseData["region_handle"] = regionHandle.ToString();
|
responseData["region_handle"] = regionHandle.ToString();
|
||||||
responseData["http_port"] = (UInt32)m_serversInfo.HttpListenerPort;
|
|
||||||
|
|
||||||
// Let's remove the seed cap from the login
|
// Let's remove the seed cap from the login
|
||||||
//responseData.Remove("seed_capability");
|
//responseData.Remove("seed_capability");
|
||||||
|
@ -255,8 +257,7 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prepare a login to the given region. This involves both telling the region to expect a connection
|
/// Not really informing the region. Just filling out the response fields related to the region.
|
||||||
/// and appropriately customising the response to the user.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sim"></param>
|
/// <param name="sim"></param>
|
||||||
/// <param name="user"></param>
|
/// <param name="user"></param>
|
||||||
|
@ -269,6 +270,7 @@ namespace OpenSim.Framework.Communications
|
||||||
response.SimPort = (uint)endPoint.Port;
|
response.SimPort = (uint)endPoint.Port;
|
||||||
response.RegionX = regionInfo.RegionLocX;
|
response.RegionX = regionInfo.RegionLocX;
|
||||||
response.RegionY = regionInfo.RegionLocY;
|
response.RegionY = regionInfo.RegionLocY;
|
||||||
|
response.SimHttpPort = regionInfo.HttpPort;
|
||||||
|
|
||||||
string capsPath = CapsUtil.GetRandomCapsObjectPath();
|
string capsPath = CapsUtil.GetRandomCapsObjectPath();
|
||||||
string capsSeedPath = CapsUtil.GetCapsSeedPath(capsPath);
|
string capsSeedPath = CapsUtil.GetCapsSeedPath(capsPath);
|
||||||
|
@ -281,11 +283,11 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
if (m_serversInfo.HttpUsesSSL)
|
if (m_serversInfo.HttpUsesSSL)
|
||||||
{
|
{
|
||||||
seedcap = "https://" + m_serversInfo.HttpSSLCN + ":" + m_serversInfo.httpSSLPort + capsSeedPath;
|
seedcap = "https://" + m_serversInfo.HttpSSLCN + ":" + regionInfo.HttpPort + capsSeedPath;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
seedcap = "http://" + regionInfo.ExternalHostName + ":" + m_serversInfo.HttpListenerPort + capsSeedPath;
|
seedcap = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + capsSeedPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
response.SeedCapability = seedcap;
|
response.SeedCapability = seedcap;
|
||||||
|
@ -299,31 +301,7 @@ namespace OpenSim.Framework.Communications
|
||||||
user.CurrentAgent.Region = regionInfo.RegionID;
|
user.CurrentAgent.Region = regionInfo.RegionID;
|
||||||
user.CurrentAgent.Handle = regionInfo.RegionHandle;
|
user.CurrentAgent.Handle = regionInfo.RegionHandle;
|
||||||
|
|
||||||
AgentCircuitData agent = new AgentCircuitData();
|
return true;
|
||||||
agent.AgentID = user.ID;
|
|
||||||
agent.firstname = user.FirstName;
|
|
||||||
agent.lastname = user.SurName;
|
|
||||||
agent.SessionID = user.CurrentAgent.SessionID;
|
|
||||||
agent.SecureSessionID = user.CurrentAgent.SecureSessionID;
|
|
||||||
agent.circuitcode = Convert.ToUInt32(response.CircuitCode);
|
|
||||||
agent.BaseFolder = UUID.Zero;
|
|
||||||
agent.InventoryFolder = UUID.Zero;
|
|
||||||
agent.startpos = user.CurrentAgent.Position;
|
|
||||||
agent.CapsPath = capsPath;
|
|
||||||
agent.Appearance = m_userManager.GetUserAppearance(user.ID);
|
|
||||||
if (agent.Appearance == null)
|
|
||||||
{
|
|
||||||
m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname);
|
|
||||||
agent.Appearance = new AvatarAppearance();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_regionsConnector.RegionLoginsEnabled)
|
|
||||||
{
|
|
||||||
// m_log.Info("[LLStandaloneLoginModule] Informing region about user");
|
|
||||||
return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LogOffUser(UserProfileData theUser, string message)
|
public override void LogOffUser(UserProfileData theUser, string message)
|
||||||
|
|
|
@ -75,6 +75,7 @@ namespace OpenSim.Framework.Communications
|
||||||
private string everLoggedIn;
|
private string everLoggedIn;
|
||||||
private string login;
|
private string login;
|
||||||
private uint simPort;
|
private uint simPort;
|
||||||
|
private uint simHttpPort;
|
||||||
private string simAddress;
|
private string simAddress;
|
||||||
private string agentAccess;
|
private string agentAccess;
|
||||||
private Int32 circuitCode;
|
private Int32 circuitCode;
|
||||||
|
@ -354,6 +355,7 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
responseData["sim_port"] = (Int32) SimPort;
|
responseData["sim_port"] = (Int32) SimPort;
|
||||||
responseData["sim_ip"] = SimAddress;
|
responseData["sim_ip"] = SimAddress;
|
||||||
|
responseData["http_port"] = (Int32)SimHttpPort;
|
||||||
|
|
||||||
responseData["agent_id"] = AgentID.ToString();
|
responseData["agent_id"] = AgentID.ToString();
|
||||||
responseData["session_id"] = SessionID.ToString();
|
responseData["session_id"] = SessionID.ToString();
|
||||||
|
@ -579,6 +581,12 @@ namespace OpenSim.Framework.Communications
|
||||||
set { simPort = value; }
|
set { simPort = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint SimHttpPort
|
||||||
|
{
|
||||||
|
get { return simHttpPort; }
|
||||||
|
set { simHttpPort = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public string SimAddress
|
public string SimAddress
|
||||||
{
|
{
|
||||||
get { return simAddress; }
|
get { return simAddress; }
|
||||||
|
|
Loading…
Reference in New Issue