* Re-aligned CustomiseResponse function for imminent up-pulling

0.6.5-rc1
lbsa71 2009-03-10 11:47:34 +00:00
parent 1956930e0d
commit 1917238cd3
3 changed files with 21 additions and 18 deletions

View File

@ -48,10 +48,8 @@ namespace OpenSim.Client.Linden
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected NetworkServersInfo serversInfo; protected NetworkServersInfo m_serversInfo;
protected uint defaultHomeX; protected bool m_authUsers = false;
protected uint defaultHomeY;
protected bool authUsers = false;
/// <summary> /// <summary>
/// Used by the login service to make requests to the inventory service. /// Used by the login service to make requests to the inventory service.
@ -71,10 +69,10 @@ namespace OpenSim.Client.Linden
bool authenticate, LibraryRootFolder libraryRootFolder, ILoginServiceToRegionsConnector regionsConnector) bool authenticate, LibraryRootFolder libraryRootFolder, ILoginServiceToRegionsConnector regionsConnector)
: base(userManager, libraryRootFolder, welcomeMess) : base(userManager, libraryRootFolder, welcomeMess)
{ {
this.serversInfo = serversInfo; this.m_serversInfo = serversInfo;
defaultHomeX = this.serversInfo.DefaultHomeLocX; m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX;
defaultHomeY = this.serversInfo.DefaultHomeLocY; m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY;
authUsers = authenticate; m_authUsers = authenticate;
m_interServiceInventoryService = interServiceInventoryService; m_interServiceInventoryService = interServiceInventoryService;
m_regionsConnector = regionsConnector; m_regionsConnector = regionsConnector;
@ -88,12 +86,12 @@ namespace OpenSim.Client.Linden
return profile; return profile;
} }
if (!authUsers) if (!m_authUsers)
{ {
//no current user account so make one //no current user account so make one
m_log.Info("[LOGIN]: No user account found so creating a new one."); m_log.Info("[LOGIN]: No user account found so creating a new one.");
m_userManager.AddUser(firstname, lastname, "test", "", defaultHomeX, defaultHomeY); m_userManager.AddUser(firstname, lastname, "test", "", m_defaultHomeX, m_defaultHomeY);
return m_userManager.GetUserProfile(firstname, lastname); return m_userManager.GetUserProfile(firstname, lastname);
} }
@ -103,7 +101,7 @@ namespace OpenSim.Client.Linden
public override bool AuthenticateUser(UserProfileData profile, string password) public override bool AuthenticateUser(UserProfileData profile, string password)
{ {
if (!authUsers) if (!m_authUsers)
{ {
//for now we will accept any password in sandbox mode //for now we will accept any password in sandbox mode
m_log.Info("[LOGIN]: Authorising user (no actual password check)"); m_log.Info("[LOGIN]: Authorising user (no actual password check)");
@ -235,8 +233,8 @@ namespace OpenSim.Client.Linden
//m_log.InfoFormat("[LOGIN]: StartLocation not available sending to region {0}", regionInfo.regionName); //m_log.InfoFormat("[LOGIN]: StartLocation not available sending to region {0}", regionInfo.regionName);
// Send him to default region instead // Send him to default region instead
ulong defaultHandle = (((ulong)defaultHomeX * Constants.RegionSize) << 32) | ulong defaultHandle = (((ulong)m_defaultHomeX * Constants.RegionSize) << 32) |
((ulong)defaultHomeY * Constants.RegionSize); ((ulong)m_defaultHomeY * Constants.RegionSize);
if ((regionInfo != null) && (defaultHandle == regionInfo.RegionHandle)) if ((regionInfo != null) && (defaultHandle == regionInfo.RegionHandle))
{ {
@ -328,13 +326,13 @@ namespace OpenSim.Client.Linden
string seedcap = "http://"; string seedcap = "http://";
if (serversInfo.HttpUsesSSL) if (m_serversInfo.HttpUsesSSL)
{ {
seedcap = "https://" + serversInfo.HttpSSLCN + ":" + serversInfo.httpSSLPort + capsSeedPath; seedcap = "https://" + m_serversInfo.HttpSSLCN + ":" + m_serversInfo.httpSSLPort + capsSeedPath;
} }
else else
{ {
seedcap = "http://" + regionInfo.ExternalHostName + ":" + serversInfo.HttpListenerPort + capsSeedPath; seedcap = "http://" + regionInfo.ExternalHostName + ":" + m_serversInfo.HttpListenerPort + capsSeedPath;
} }
response.SeedCapability = seedcap; response.SeedCapability = seedcap;

View File

@ -56,6 +56,9 @@ namespace OpenSim.Framework.Communications
/// </summary> /// </summary>
protected LibraryRootFolder m_libraryRootFolder; protected LibraryRootFolder m_libraryRootFolder;
protected uint m_defaultHomeX;
protected uint m_defaultHomeY;
/// <summary> /// <summary>
/// Constructor /// Constructor
/// </summary> /// </summary>

View File

@ -71,6 +71,8 @@ namespace OpenSim.Grid.UserServer.Modules
: base(userManager, libraryRootFolder, welcomeMess) : base(userManager, libraryRootFolder, welcomeMess)
{ {
m_config = config; m_config = config;
m_defaultHomeX = m_config.DefaultX;
m_defaultHomeY = m_config.DefaultY;
m_inventoryService = inventoryService; m_inventoryService = inventoryService;
m_regionProfileService = regionProfileService; m_regionProfileService = regionProfileService;
} }
@ -302,8 +304,8 @@ namespace OpenSim.Grid.UserServer.Modules
// Send him to default region instead // Send him to default region instead
// Load information from the gridserver // Load information from the gridserver
ulong defaultHandle = (((ulong) m_config.DefaultX * Constants.RegionSize) << 32) | ulong defaultHandle = (((ulong) m_defaultHomeX * Constants.RegionSize) << 32) |
((ulong) m_config.DefaultY * Constants.RegionSize); ((ulong) m_defaultHomeY * Constants.RegionSize);
if ((regionInfo != null) && (defaultHandle == regionInfo.regionHandle)) if ((regionInfo != null) && (defaultHandle == regionInfo.regionHandle))
{ {