diff options
author | lbsa71 | 2007-03-27 20:45:04 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-27 20:45:04 +0000 |
commit | 7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8 (patch) | |
tree | d8dc563b7fef4ce9dcc34fbcc31c3fcc7d99d49f /OpenSim.RegionServer/UserServer | |
parent | * Config should be loaded before login server startup... (diff) | |
download | opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.zip opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.gz opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.bz2 opensim-SC_OLD-7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8.tar.xz |
* Reverting todays work. It was worth a try.
Diffstat (limited to 'OpenSim.RegionServer/UserServer')
-rw-r--r-- | OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs | 18 | ||||
-rw-r--r-- | OpenSim.RegionServer/UserServer/LoginServer.cs | 20 |
2 files changed, 15 insertions, 23 deletions
diff --git a/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs b/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs index eee1c3a..83e340b 100644 --- a/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs +++ b/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs | |||
@@ -12,15 +12,11 @@ namespace OpenSim.UserServer | |||
12 | { | 12 | { |
13 | class LocalUserProfileManager : UserProfileManager | 13 | class LocalUserProfileManager : UserProfileManager |
14 | { | 14 | { |
15 | private IGridServer m_gridServer; | 15 | private IGridServer _gridServer; |
16 | private int m_port; | ||
17 | private string m_ipAddr; | ||
18 | 16 | ||
19 | public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr) | 17 | public LocalUserProfileManager(IGridServer gridServer) |
20 | { | 18 | { |
21 | m_gridServer = gridServer; | 19 | _gridServer = gridServer; |
22 | m_port = simPort; | ||
23 | m_ipAddr = ipAddr; | ||
24 | } | 20 | } |
25 | 21 | ||
26 | public override void InitUserProfiles() | 22 | public override void InitUserProfiles() |
@@ -33,8 +29,8 @@ namespace OpenSim.UserServer | |||
33 | uint circode = (uint)response["circuit_code"]; | 29 | uint circode = (uint)response["circuit_code"]; |
34 | theUser.AddSimCircuit(circode, LLUUID.Random()); | 30 | theUser.AddSimCircuit(circode, LLUUID.Random()); |
35 | response["home"] = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}"; | 31 | response["home"] = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}"; |
36 | response["sim_port"] = m_port; | 32 | response["sim_port"] = OpenSimRoot.Instance.Cfg.IPListenPort; |
37 | response["sim_ip"] = m_ipAddr; | 33 | response["sim_ip"] = OpenSimRoot.Instance.Cfg.IPListenAddr; |
38 | response["region_y"] = (Int32)996 * 256; | 34 | response["region_y"] = (Int32)996 * 256; |
39 | response["region_x"] = (Int32)997* 256; | 35 | response["region_x"] = (Int32)997* 256; |
40 | 36 | ||
@@ -71,9 +67,9 @@ namespace OpenSim.UserServer | |||
71 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); | 67 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); |
72 | 68 | ||
73 | //working on local computer if so lets add to the gridserver's list of sessions? | 69 | //working on local computer if so lets add to the gridserver's list of sessions? |
74 | if (m_gridServer.GetName() == "Local") | 70 | if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Local") |
75 | { | 71 | { |
76 | ((LocalGridBase)this.m_gridServer).AddNewSession(_login); | 72 | ((LocalGridBase)this._gridServer).AddNewSession(_login); |
77 | } | 73 | } |
78 | } | 74 | } |
79 | } | 75 | } |
diff --git a/OpenSim.RegionServer/UserServer/LoginServer.cs b/OpenSim.RegionServer/UserServer/LoginServer.cs index 47af8a8..86b098a 100644 --- a/OpenSim.RegionServer/UserServer/LoginServer.cs +++ b/OpenSim.RegionServer/UserServer/LoginServer.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.UserServer | |||
52 | /// </summary> | 52 | /// </summary> |
53 | public class LoginServer : LoginService , IUserServer | 53 | public class LoginServer : LoginService , IUserServer |
54 | { | 54 | { |
55 | private IGridServer m_gridServer; | 55 | private IGridServer _gridServer; |
56 | private ushort _loginPort = 8080; | 56 | private ushort _loginPort = 8080; |
57 | public IPAddress clientAddress = IPAddress.Loopback; | 57 | public IPAddress clientAddress = IPAddress.Loopback; |
58 | public IPAddress remoteAddress = IPAddress.Any; | 58 | public IPAddress remoteAddress = IPAddress.Any; |
@@ -63,14 +63,10 @@ namespace OpenSim.UserServer | |||
63 | private string _mpasswd; | 63 | private string _mpasswd; |
64 | private bool _needPasswd = false; | 64 | private bool _needPasswd = false; |
65 | private LocalUserProfileManager userManager; | 65 | private LocalUserProfileManager userManager; |
66 | private int m_simPort; | ||
67 | private string m_simAddr; | ||
68 | 66 | ||
69 | public LoginServer(IGridServer gridServer, string simAddr, int simPort) | 67 | public LoginServer(IGridServer gridServer) |
70 | { | 68 | { |
71 | m_gridServer = gridServer; | 69 | _gridServer = gridServer; |
72 | m_simPort = simPort; | ||
73 | m_simAddr = simAddr; | ||
74 | } | 70 | } |
75 | 71 | ||
76 | // InitializeLogin: initialize the login | 72 | // InitializeLogin: initialize the login |
@@ -93,7 +89,7 @@ namespace OpenSim.UserServer | |||
93 | SR.Close(); | 89 | SR.Close(); |
94 | this._mpasswd = EncodePassword("testpass"); | 90 | this._mpasswd = EncodePassword("testpass"); |
95 | 91 | ||
96 | userManager = new LocalUserProfileManager(this.m_gridServer, m_simPort, m_simAddr ); | 92 | userManager = new LocalUserProfileManager(this._gridServer); |
97 | userManager.InitUserProfiles(); | 93 | userManager.InitUserProfiles(); |
98 | userManager.SetKeys("", "", "", "Welcome to OpenSim"); | 94 | userManager.SetKeys("", "", "", "Welcome to OpenSim"); |
99 | 95 | ||
@@ -293,8 +289,8 @@ namespace OpenSim.UserServer | |||
293 | XmlRpcResponse response = (XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); | 289 | XmlRpcResponse response = (XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); |
294 | Hashtable responseData = (Hashtable)response.Value; | 290 | Hashtable responseData = (Hashtable)response.Value; |
295 | 291 | ||
296 | responseData["sim_port"] = m_simPort; | 292 | responseData["sim_port"] = OpenSimRoot.Instance.Cfg.IPListenPort; |
297 | responseData["sim_ip"] = m_simAddr; | 293 | responseData["sim_ip"] = OpenSimRoot.Instance.Cfg.IPListenAddr; |
298 | responseData["agent_id"] = Agent.ToStringHyphenated(); | 294 | responseData["agent_id"] = Agent.ToStringHyphenated(); |
299 | responseData["session_id"] = Session.ToStringHyphenated(); | 295 | responseData["session_id"] = Session.ToStringHyphenated(); |
300 | responseData["secure_session_id"]= secureSess.ToStringHyphenated(); | 296 | responseData["secure_session_id"]= secureSess.ToStringHyphenated(); |
@@ -331,9 +327,9 @@ namespace OpenSim.UserServer | |||
331 | _login.InventoryFolder = InventoryFolderID; | 327 | _login.InventoryFolder = InventoryFolderID; |
332 | 328 | ||
333 | //working on local computer if so lets add to the gridserver's list of sessions? | 329 | //working on local computer if so lets add to the gridserver's list of sessions? |
334 | if (m_gridServer.GetName() == "Local") | 330 | if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Local") |
335 | { | 331 | { |
336 | ((LocalGridBase)m_gridServer).AddNewSession(_login); | 332 | ((LocalGridBase)this._gridServer).AddNewSession(_login); |
337 | } | 333 | } |
338 | 334 | ||
339 | // forward the XML-RPC response to the client | 335 | // forward the XML-RPC response to the client |