aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordiva2009-03-24 18:56:32 +0000
committerdiva2009-03-24 18:56:32 +0000
commitc7d0e4ffc151818702375fdb786189fd1f8c7c94 (patch)
tree000f701957c29643605c76ecd82b59d4e04aaa7c
parentThank you, dslake, for a patch that speeds up the Delete Old Files option (diff)
downloadopensim-SC_OLD-c7d0e4ffc151818702375fdb786189fd1f8c7c94.zip
opensim-SC_OLD-c7d0e4ffc151818702375fdb786189fd1f8c7c94.tar.gz
opensim-SC_OLD-c7d0e4ffc151818702375fdb786189fd1f8c7c94.tar.bz2
opensim-SC_OLD-c7d0e4ffc151818702375fdb786189fd1f8c7c94.tar.xz
Added the login region's http to the login response.
-rw-r--r--OpenSim/Framework/Communications/HGLoginAuthService.cs42
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs8
2 files changed, 18 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)
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index d1b9258..6986369 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Communications
75 private string everLoggedIn; 75 private string everLoggedIn;
76 private string login; 76 private string login;
77 private uint simPort; 77 private uint simPort;
78 private uint simHttpPort;
78 private string simAddress; 79 private string simAddress;
79 private string agentAccess; 80 private string agentAccess;
80 private Int32 circuitCode; 81 private Int32 circuitCode;
@@ -354,6 +355,7 @@ namespace OpenSim.Framework.Communications
354 355
355 responseData["sim_port"] = (Int32) SimPort; 356 responseData["sim_port"] = (Int32) SimPort;
356 responseData["sim_ip"] = SimAddress; 357 responseData["sim_ip"] = SimAddress;
358 responseData["http_port"] = (Int32)SimHttpPort;
357 359
358 responseData["agent_id"] = AgentID.ToString(); 360 responseData["agent_id"] = AgentID.ToString();
359 responseData["session_id"] = SessionID.ToString(); 361 responseData["session_id"] = SessionID.ToString();
@@ -579,6 +581,12 @@ namespace OpenSim.Framework.Communications
579 set { simPort = value; } 581 set { simPort = value; }
580 } 582 }
581 583
584 public uint SimHttpPort
585 {
586 get { return simHttpPort; }
587 set { simHttpPort = value; }
588 }
589
582 public string SimAddress 590 public string SimAddress
583 { 591 {
584 get { return simAddress; } 592 get { return simAddress; }