diff options
author | MW | 2007-05-16 17:35:27 +0000 |
---|---|---|
committer | MW | 2007-05-16 17:35:27 +0000 |
commit | 1e9a0220e69a62dd45b53753537fb4563e50412c (patch) | |
tree | bfe79152761b164dbd437b60dc025aa1f0c8c3fc /OpenSim.Servers/LoginServer.cs | |
parent | * removed unused new-login.dat (diff) | |
download | opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.zip opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.tar.gz opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.tar.bz2 opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.tar.xz |
Quite big change to how Sessions/circuits are Authenticated. Seems to work okay but needs a lot more testing.
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Servers/LoginServer.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim.Servers/LoginServer.cs b/OpenSim.Servers/LoginServer.cs index 393237b..6fd174b 100644 --- a/OpenSim.Servers/LoginServer.cs +++ b/OpenSim.Servers/LoginServer.cs | |||
@@ -47,6 +47,7 @@ using OpenSim.Framework.Types; | |||
47 | 47 | ||
48 | namespace OpenSim.UserServer | 48 | namespace OpenSim.UserServer |
49 | { | 49 | { |
50 | public delegate void AddNewSessionHandler(Login loginData); | ||
50 | /// <summary> | 51 | /// <summary> |
51 | /// When running in local (default) mode , handles client logins. | 52 | /// When running in local (default) mode , handles client logins. |
52 | /// </summary> | 53 | /// </summary> |
@@ -64,6 +65,7 @@ namespace OpenSim.UserServer | |||
64 | private string m_simAddr; | 65 | private string m_simAddr; |
65 | private uint regionX; | 66 | private uint regionX; |
66 | private uint regionY; | 67 | private uint regionY; |
68 | private AddNewSessionHandler AddSession; | ||
67 | 69 | ||
68 | public LocalUserProfileManager LocalUserManager | 70 | public LocalUserProfileManager LocalUserManager |
69 | { | 71 | { |
@@ -73,9 +75,8 @@ namespace OpenSim.UserServer | |||
73 | } | 75 | } |
74 | } | 76 | } |
75 | 77 | ||
76 | public LoginServer(IGridServer gridServer, string simAddr, int simPort, uint regX, uint regY, bool useAccounts) | 78 | public LoginServer( string simAddr, int simPort, uint regX, uint regY, bool useAccounts) |
77 | { | 79 | { |
78 | m_gridServer = gridServer; | ||
79 | m_simPort = simPort; | 80 | m_simPort = simPort; |
80 | m_simAddr = simAddr; | 81 | m_simAddr = simAddr; |
81 | regionX = regX; | 82 | regionX = regX; |
@@ -83,6 +84,12 @@ namespace OpenSim.UserServer | |||
83 | this.userAccounts = useAccounts; | 84 | this.userAccounts = useAccounts; |
84 | } | 85 | } |
85 | 86 | ||
87 | public void SetSessionHandler(AddNewSessionHandler sessionHandler) | ||
88 | { | ||
89 | this.AddSession = sessionHandler; | ||
90 | this.userManager.SetSessionHandler(sessionHandler); | ||
91 | } | ||
92 | |||
86 | public void Startup() | 93 | public void Startup() |
87 | { | 94 | { |
88 | this._needPasswd = false; | 95 | this._needPasswd = false; |
@@ -180,15 +187,16 @@ namespace OpenSim.UserServer | |||
180 | _login.Agent = loginResponse.AgentID; | 187 | _login.Agent = loginResponse.AgentID; |
181 | _login.Session = loginResponse.SessionID; | 188 | _login.Session = loginResponse.SessionID; |
182 | _login.SecureSession = loginResponse.SecureSessionID; | 189 | _login.SecureSession = loginResponse.SecureSessionID; |
183 | 190 | _login.CircuitCode = (uint) loginResponse.CircuitCode; | |
184 | _login.BaseFolder = loginResponse.BaseFolderID; | 191 | _login.BaseFolder = loginResponse.BaseFolderID; |
185 | _login.InventoryFolder = loginResponse.InventoryFolderID; | 192 | _login.InventoryFolder = loginResponse.InventoryFolderID; |
186 | 193 | ||
187 | //working on local computer if so lets add to the gridserver's list of sessions? | 194 | //working on local computer if so lets add to the gridserver's list of sessions? |
188 | if (m_gridServer.GetName() == "Local") | 195 | /* if (m_gridServer.GetName() == "Local") |
189 | { | 196 | { |
190 | ((LocalGridBase)m_gridServer).AddNewSession(_login); | 197 | ((LocalGridBase)m_gridServer).AddNewSession(_login); |
191 | } | 198 | }*/ |
199 | AddSession(_login); | ||
192 | 200 | ||
193 | return response; | 201 | return response; |
194 | } | 202 | } |