diff options
author | lbsa71 | 2007-03-27 21:42:14 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-27 21:42:14 +0000 |
commit | f42d1fc825b7b9d22ae05836992531d9abd2a26d (patch) | |
tree | c316d0d2ec56a34c6c7f2099977bcc6f14e5eb24 /OpenSim.RegionServer/UserServer | |
parent | * Reverting todays work. It was worth a try. (diff) | |
download | opensim-SC-f42d1fc825b7b9d22ae05836992531d9abd2a26d.zip opensim-SC-f42d1fc825b7b9d22ae05836992531d9abd2a26d.tar.gz opensim-SC-f42d1fc825b7b9d22ae05836992531d9abd2a26d.tar.bz2 opensim-SC-f42d1fc825b7b9d22ae05836992531d9abd2a26d.tar.xz |
* revert the revert - begin the beguine
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, 23 insertions, 15 deletions
diff --git a/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs b/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs index 83e340b..eee1c3a 100644 --- a/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs +++ b/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs | |||
@@ -12,11 +12,15 @@ namespace OpenSim.UserServer | |||
12 | { | 12 | { |
13 | class LocalUserProfileManager : UserProfileManager | 13 | class LocalUserProfileManager : UserProfileManager |
14 | { | 14 | { |
15 | private IGridServer _gridServer; | 15 | private IGridServer m_gridServer; |
16 | private int m_port; | ||
17 | private string m_ipAddr; | ||
16 | 18 | ||
17 | public LocalUserProfileManager(IGridServer gridServer) | 19 | public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr) |
18 | { | 20 | { |
19 | _gridServer = gridServer; | 21 | m_gridServer = gridServer; |
22 | m_port = simPort; | ||
23 | m_ipAddr = ipAddr; | ||
20 | } | 24 | } |
21 | 25 | ||
22 | public override void InitUserProfiles() | 26 | public override void InitUserProfiles() |
@@ -29,8 +33,8 @@ namespace OpenSim.UserServer | |||
29 | uint circode = (uint)response["circuit_code"]; | 33 | uint circode = (uint)response["circuit_code"]; |
30 | theUser.AddSimCircuit(circode, LLUUID.Random()); | 34 | theUser.AddSimCircuit(circode, LLUUID.Random()); |
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() + "]}"; | 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() + "]}"; |
32 | response["sim_port"] = OpenSimRoot.Instance.Cfg.IPListenPort; | 36 | response["sim_port"] = m_port; |
33 | response["sim_ip"] = OpenSimRoot.Instance.Cfg.IPListenAddr; | 37 | response["sim_ip"] = m_ipAddr; |
34 | response["region_y"] = (Int32)996 * 256; | 38 | response["region_y"] = (Int32)996 * 256; |
35 | response["region_x"] = (Int32)997* 256; | 39 | response["region_x"] = (Int32)997* 256; |
36 | 40 | ||
@@ -67,9 +71,9 @@ namespace OpenSim.UserServer | |||
67 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); | 71 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); |
68 | 72 | ||
69 | //working on local computer if so lets add to the gridserver's list of sessions? | 73 | //working on local computer if so lets add to the gridserver's list of sessions? |
70 | if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Local") | 74 | if (m_gridServer.GetName() == "Local") |
71 | { | 75 | { |
72 | ((LocalGridBase)this._gridServer).AddNewSession(_login); | 76 | ((LocalGridBase)this.m_gridServer).AddNewSession(_login); |
73 | } | 77 | } |
74 | } | 78 | } |
75 | } | 79 | } |
diff --git a/OpenSim.RegionServer/UserServer/LoginServer.cs b/OpenSim.RegionServer/UserServer/LoginServer.cs index 86b098a..47af8a8 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 _gridServer; | 55 | private IGridServer m_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,10 +63,14 @@ 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; | ||
66 | 68 | ||
67 | public LoginServer(IGridServer gridServer) | 69 | public LoginServer(IGridServer gridServer, string simAddr, int simPort) |
68 | { | 70 | { |
69 | _gridServer = gridServer; | 71 | m_gridServer = gridServer; |
72 | m_simPort = simPort; | ||
73 | m_simAddr = simAddr; | ||
70 | } | 74 | } |
71 | 75 | ||
72 | // InitializeLogin: initialize the login | 76 | // InitializeLogin: initialize the login |
@@ -89,7 +93,7 @@ namespace OpenSim.UserServer | |||
89 | SR.Close(); | 93 | SR.Close(); |
90 | this._mpasswd = EncodePassword("testpass"); | 94 | this._mpasswd = EncodePassword("testpass"); |
91 | 95 | ||
92 | userManager = new LocalUserProfileManager(this._gridServer); | 96 | userManager = new LocalUserProfileManager(this.m_gridServer, m_simPort, m_simAddr ); |
93 | userManager.InitUserProfiles(); | 97 | userManager.InitUserProfiles(); |
94 | userManager.SetKeys("", "", "", "Welcome to OpenSim"); | 98 | userManager.SetKeys("", "", "", "Welcome to OpenSim"); |
95 | 99 | ||
@@ -289,8 +293,8 @@ namespace OpenSim.UserServer | |||
289 | XmlRpcResponse response = (XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); | 293 | XmlRpcResponse response = (XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); |
290 | Hashtable responseData = (Hashtable)response.Value; | 294 | Hashtable responseData = (Hashtable)response.Value; |
291 | 295 | ||
292 | responseData["sim_port"] = OpenSimRoot.Instance.Cfg.IPListenPort; | 296 | responseData["sim_port"] = m_simPort; |
293 | responseData["sim_ip"] = OpenSimRoot.Instance.Cfg.IPListenAddr; | 297 | responseData["sim_ip"] = m_simAddr; |
294 | responseData["agent_id"] = Agent.ToStringHyphenated(); | 298 | responseData["agent_id"] = Agent.ToStringHyphenated(); |
295 | responseData["session_id"] = Session.ToStringHyphenated(); | 299 | responseData["session_id"] = Session.ToStringHyphenated(); |
296 | responseData["secure_session_id"]= secureSess.ToStringHyphenated(); | 300 | responseData["secure_session_id"]= secureSess.ToStringHyphenated(); |
@@ -327,9 +331,9 @@ namespace OpenSim.UserServer | |||
327 | _login.InventoryFolder = InventoryFolderID; | 331 | _login.InventoryFolder = InventoryFolderID; |
328 | 332 | ||
329 | //working on local computer if so lets add to the gridserver's list of sessions? | 333 | //working on local computer if so lets add to the gridserver's list of sessions? |
330 | if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Local") | 334 | if (m_gridServer.GetName() == "Local") |
331 | { | 335 | { |
332 | ((LocalGridBase)this._gridServer).AddNewSession(_login); | 336 | ((LocalGridBase)m_gridServer).AddNewSession(_login); |
333 | } | 337 | } |
334 | 338 | ||
335 | // forward the XML-RPC response to the client | 339 | // forward the XML-RPC response to the client |