From 7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 27 Mar 2007 20:45:04 +0000 Subject: * Reverting todays work. It was worth a try. --- .../UserServer/LocalUserProfileManager.cs | 18 +++++++----------- OpenSim.RegionServer/UserServer/LoginServer.cs | 20 ++++++++------------ 2 files changed, 15 insertions(+), 23 deletions(-) (limited to 'OpenSim.RegionServer/UserServer') 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 { class LocalUserProfileManager : UserProfileManager { - private IGridServer m_gridServer; - private int m_port; - private string m_ipAddr; + private IGridServer _gridServer; - public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr) + public LocalUserProfileManager(IGridServer gridServer) { - m_gridServer = gridServer; - m_port = simPort; - m_ipAddr = ipAddr; + _gridServer = gridServer; } public override void InitUserProfiles() @@ -33,8 +29,8 @@ namespace OpenSim.UserServer uint circode = (uint)response["circuit_code"]; theUser.AddSimCircuit(circode, LLUUID.Random()); 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() + "]}"; - response["sim_port"] = m_port; - response["sim_ip"] = m_ipAddr; + response["sim_port"] = OpenSimRoot.Instance.Cfg.IPListenPort; + response["sim_ip"] = OpenSimRoot.Instance.Cfg.IPListenAddr; response["region_y"] = (Int32)996 * 256; response["region_x"] = (Int32)997* 256; @@ -71,9 +67,9 @@ namespace OpenSim.UserServer _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); //working on local computer if so lets add to the gridserver's list of sessions? - if (m_gridServer.GetName() == "Local") + if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Local") { - ((LocalGridBase)this.m_gridServer).AddNewSession(_login); + ((LocalGridBase)this._gridServer).AddNewSession(_login); } } } 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 /// public class LoginServer : LoginService , IUserServer { - private IGridServer m_gridServer; + private IGridServer _gridServer; private ushort _loginPort = 8080; public IPAddress clientAddress = IPAddress.Loopback; public IPAddress remoteAddress = IPAddress.Any; @@ -63,14 +63,10 @@ namespace OpenSim.UserServer private string _mpasswd; private bool _needPasswd = false; private LocalUserProfileManager userManager; - private int m_simPort; - private string m_simAddr; - public LoginServer(IGridServer gridServer, string simAddr, int simPort) + public LoginServer(IGridServer gridServer) { - m_gridServer = gridServer; - m_simPort = simPort; - m_simAddr = simAddr; + _gridServer = gridServer; } // InitializeLogin: initialize the login @@ -93,7 +89,7 @@ namespace OpenSim.UserServer SR.Close(); this._mpasswd = EncodePassword("testpass"); - userManager = new LocalUserProfileManager(this.m_gridServer, m_simPort, m_simAddr ); + userManager = new LocalUserProfileManager(this._gridServer); userManager.InitUserProfiles(); userManager.SetKeys("", "", "", "Welcome to OpenSim"); @@ -293,8 +289,8 @@ namespace OpenSim.UserServer XmlRpcResponse response = (XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); Hashtable responseData = (Hashtable)response.Value; - responseData["sim_port"] = m_simPort; - responseData["sim_ip"] = m_simAddr; + responseData["sim_port"] = OpenSimRoot.Instance.Cfg.IPListenPort; + responseData["sim_ip"] = OpenSimRoot.Instance.Cfg.IPListenAddr; responseData["agent_id"] = Agent.ToStringHyphenated(); responseData["session_id"] = Session.ToStringHyphenated(); responseData["secure_session_id"]= secureSess.ToStringHyphenated(); @@ -331,9 +327,9 @@ namespace OpenSim.UserServer _login.InventoryFolder = InventoryFolderID; //working on local computer if so lets add to the gridserver's list of sessions? - if (m_gridServer.GetName() == "Local") + if (OpenSimRoot.Instance.GridServers.GridServer.GetName() == "Local") { - ((LocalGridBase)m_gridServer).AddNewSession(_login); + ((LocalGridBase)this._gridServer).AddNewSession(_login); } // forward the XML-RPC response to the client -- cgit v1.1