diff options
Added the login region's http to the login response.
Diffstat (limited to 'OpenSim/Framework/Communications/HGLoginAuthService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/HGLoginAuthService.cs | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/OpenSim/Framework/Communications/HGLoginAuthService.cs b/OpenSim/Framework/Communications/HGLoginAuthService.cs index 21d34f8..49977b7 100644 --- a/OpenSim/Framework/Communications/HGLoginAuthService.cs +++ b/OpenSim/Framework/Communications/HGLoginAuthService.cs | |||
@@ -70,8 +70,11 @@ namespace OpenSim.Framework.Communications | |||
70 | : base(userManager, libraryRootFolder, welcomeMess) | 70 | : base(userManager, libraryRootFolder, welcomeMess) |
71 | { | 71 | { |
72 | this.m_serversInfo = serversInfo; | 72 | this.m_serversInfo = serversInfo; |
73 | m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX; | 73 | if (m_serversInfo != null) |
74 | m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY; | 74 | { |
75 | m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX; | ||
76 | m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY; | ||
77 | } | ||
75 | m_authUsers = authenticate; | 78 | m_authUsers = authenticate; |
76 | 79 | ||
77 | m_interServiceInventoryService = interServiceInventoryService; | 80 | m_interServiceInventoryService = interServiceInventoryService; |
@@ -101,7 +104,6 @@ namespace OpenSim.Framework.Communications | |||
101 | uint uy = (uint)(y / Constants.RegionSize); | 104 | uint uy = (uint)(y / Constants.RegionSize); |
102 | ulong regionHandle = Util.UIntsToLong(ux, uy); | 105 | ulong regionHandle = Util.UIntsToLong(ux, uy); |
103 | responseData["region_handle"] = regionHandle.ToString(); | 106 | responseData["region_handle"] = regionHandle.ToString(); |
104 | responseData["http_port"] = (UInt32)m_serversInfo.HttpListenerPort; | ||
105 | 107 | ||
106 | // Let's remove the seed cap from the login | 108 | // Let's remove the seed cap from the login |
107 | //responseData.Remove("seed_capability"); | 109 | //responseData.Remove("seed_capability"); |
@@ -255,8 +257,7 @@ namespace OpenSim.Framework.Communications | |||
255 | 257 | ||
256 | 258 | ||
257 | /// <summary> | 259 | /// <summary> |
258 | /// Prepare a login to the given region. This involves both telling the region to expect a connection | 260 | /// Not really informing the region. Just filling out the response fields related to the region. |
259 | /// and appropriately customising the response to the user. | ||
260 | /// </summary> | 261 | /// </summary> |
261 | /// <param name="sim"></param> | 262 | /// <param name="sim"></param> |
262 | /// <param name="user"></param> | 263 | /// <param name="user"></param> |
@@ -269,6 +270,7 @@ namespace OpenSim.Framework.Communications | |||
269 | response.SimPort = (uint)endPoint.Port; | 270 | response.SimPort = (uint)endPoint.Port; |
270 | response.RegionX = regionInfo.RegionLocX; | 271 | response.RegionX = regionInfo.RegionLocX; |
271 | response.RegionY = regionInfo.RegionLocY; | 272 | response.RegionY = regionInfo.RegionLocY; |
273 | response.SimHttpPort = regionInfo.HttpPort; | ||
272 | 274 | ||
273 | string capsPath = CapsUtil.GetRandomCapsObjectPath(); | 275 | string capsPath = CapsUtil.GetRandomCapsObjectPath(); |
274 | string capsSeedPath = CapsUtil.GetCapsSeedPath(capsPath); | 276 | string capsSeedPath = CapsUtil.GetCapsSeedPath(capsPath); |
@@ -281,11 +283,11 @@ namespace OpenSim.Framework.Communications | |||
281 | 283 | ||
282 | if (m_serversInfo.HttpUsesSSL) | 284 | if (m_serversInfo.HttpUsesSSL) |
283 | { | 285 | { |
284 | seedcap = "https://" + m_serversInfo.HttpSSLCN + ":" + m_serversInfo.httpSSLPort + capsSeedPath; | 286 | seedcap = "https://" + m_serversInfo.HttpSSLCN + ":" + regionInfo.HttpPort + capsSeedPath; |
285 | } | 287 | } |
286 | else | 288 | else |
287 | { | 289 | { |
288 | seedcap = "http://" + regionInfo.ExternalHostName + ":" + m_serversInfo.HttpListenerPort + capsSeedPath; | 290 | seedcap = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + capsSeedPath; |
289 | } | 291 | } |
290 | 292 | ||
291 | response.SeedCapability = seedcap; | 293 | response.SeedCapability = seedcap; |
@@ -299,31 +301,7 @@ namespace OpenSim.Framework.Communications | |||
299 | user.CurrentAgent.Region = regionInfo.RegionID; | 301 | user.CurrentAgent.Region = regionInfo.RegionID; |
300 | user.CurrentAgent.Handle = regionInfo.RegionHandle; | 302 | user.CurrentAgent.Handle = regionInfo.RegionHandle; |
301 | 303 | ||
302 | AgentCircuitData agent = new AgentCircuitData(); | 304 | return true; |
303 | agent.AgentID = user.ID; | ||
304 | agent.firstname = user.FirstName; | ||
305 | agent.lastname = user.SurName; | ||
306 | agent.SessionID = user.CurrentAgent.SessionID; | ||
307 | agent.SecureSessionID = user.CurrentAgent.SecureSessionID; | ||
308 | agent.circuitcode = Convert.ToUInt32(response.CircuitCode); | ||
309 | agent.BaseFolder = UUID.Zero; | ||
310 | agent.InventoryFolder = UUID.Zero; | ||
311 | agent.startpos = user.CurrentAgent.Position; | ||
312 | agent.CapsPath = capsPath; | ||
313 | agent.Appearance = m_userManager.GetUserAppearance(user.ID); | ||
314 | if (agent.Appearance == null) | ||
315 | { | ||
316 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); | ||
317 | agent.Appearance = new AvatarAppearance(); | ||
318 | } | ||
319 | |||
320 | if (m_regionsConnector.RegionLoginsEnabled) | ||
321 | { | ||
322 | // m_log.Info("[LLStandaloneLoginModule] Informing region about user"); | ||
323 | return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent); | ||
324 | } | ||
325 | |||
326 | return false; | ||
327 | } | 305 | } |
328 | 306 | ||
329 | public override void LogOffUser(UserProfileData theUser, string message) | 307 | public override void LogOffUser(UserProfileData theUser, string message) |