aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs58
1 files changed, 36 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 0ef7f26..d9fefb4 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -688,34 +688,48 @@ namespace OpenSim.Region.ClientStack.LindenUDP
688 m_scene.AddNewClient(this, true); 688 m_scene.AddNewClient(this, true);
689 } 689 }
690 690
691 /// <summary>
692 /// Authorize an incoming user session. This method lies at the base of the entire client thread.
693 /// </summary>
691 protected virtual void AuthUser() 694 protected virtual void AuthUser()
692 { 695 {
693 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(m_cirpack.m_circuitCode.m_sessionId, m_cirpack.m_circuitCode.ID, m_cirpack.m_circuitCode.Code); 696 try
694 AuthenticateResponse sessionInfo =
695 m_authenticateSessionsHandler.AuthenticateSession(m_sessionId, m_agentId,
696 m_circuitCode);
697 if (!sessionInfo.Authorised)
698 {
699 //session/circuit not authorised
700 m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString());
701 m_packetQueue.Close();
702 m_clientThread.Abort();
703 }
704 else
705 { 697 {
706 m_log.Info("[CLIENT]: Got authenticated connection from " + m_userEndPoint.ToString()); 698 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(m_cirpack.m_circuitCode.m_sessionId, m_cirpack.m_circuitCode.ID, m_cirpack.m_circuitCode.Code);
707 //session is authorised 699 AuthenticateResponse sessionInfo =
708 m_firstName = sessionInfo.LoginInfo.First; 700 m_authenticateSessionsHandler.AuthenticateSession(m_sessionId, m_agentId,
709 m_lastName = sessionInfo.LoginInfo.Last; 701 m_circuitCode);
710 702 if (!sessionInfo.Authorised)
711 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero)
712 { 703 {
713 m_secureSessionId = sessionInfo.LoginInfo.SecureSession; 704 //session/circuit not authorised
705 m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString());
706 m_packetQueue.Close();
707 m_clientThread.Abort();
714 } 708 }
715 // This sets up all the timers 709 else
716 InitNewClient(); 710 {
711 m_log.Info("[CLIENT]: Got authenticated connection from " + m_userEndPoint.ToString());
712 //session is authorised
713 m_firstName = sessionInfo.LoginInfo.First;
714 m_lastName = sessionInfo.LoginInfo.Last;
715
716 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero)
717 {
718 m_secureSessionId = sessionInfo.LoginInfo.SecureSession;
719 }
720 // This sets up all the timers
721 InitNewClient();
717 722
718 ClientLoop(); 723 ClientLoop();
724 }
725 }
726 catch (Exception e)
727 {
728 // Don't let a failure in an individual client thread crash the whole sim.
729 // FIXME: possibly more sophisticated cleanup since leaving client resources around will
730 // probably cause long term instability. I think this is still better than bring down the whole
731 // region
732 m_log.ErrorFormat("[CLIENT]: Client thread for {0} {1} crashed. Exception {2}", Name, AgentId, e);
719 } 733 }
720 } 734 }
721 735