From 1e9a0220e69a62dd45b53753537fb4563e50412c Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 16 May 2007 17:35:27 +0000 Subject: Quite big change to how Sessions/circuits are Authenticated. Seems to work okay but needs a lot more testing. --- OpenSim.Framework/Types/AgentCiruitData.cs | 6 +- OpenSim.Framework/Types/Login.cs | 2 + OpenSim.GridInterfaces/Remote/RemoteGridServer.cs | 49 ++++++++-------- OpenSim.RegionServer/AuthenticateSessionsBase.cs | 67 ++++++++++++++++++++++ OpenSim.RegionServer/AuthenticateSessionsLocal.cs | 30 ++++++++++ OpenSim.RegionServer/AuthenticateSessionsRemote.cs | 44 ++++++++++++++ OpenSim.RegionServer/OpenSim.RegionServer.csproj | 61 +++++++++++++------- .../OpenSim.RegionServer.dll.build | 2 + OpenSim.RegionServer/OpenSimMain.cs | 52 ++++++----------- OpenSim.RegionServer/SimClient.cs | 6 +- OpenSim.RegionServer/UDPServer.cs | 7 ++- OpenSim.Servers/LocalUserProfileManager.cs | 13 ++++- OpenSim.Servers/LoginServer.cs | 18 ++++-- OpenSim.sln | 2 +- 14 files changed, 264 insertions(+), 95 deletions(-) create mode 100644 OpenSim.RegionServer/AuthenticateSessionsBase.cs create mode 100644 OpenSim.RegionServer/AuthenticateSessionsLocal.cs create mode 100644 OpenSim.RegionServer/AuthenticateSessionsRemote.cs diff --git a/OpenSim.Framework/Types/AgentCiruitData.cs b/OpenSim.Framework/Types/AgentCiruitData.cs index 555b3b9..7314586 100644 --- a/OpenSim.Framework/Types/AgentCiruitData.cs +++ b/OpenSim.Framework/Types/AgentCiruitData.cs @@ -11,10 +11,12 @@ namespace OpenSim.Framework.Types public LLUUID AgentID; public LLUUID SessionID; public LLUUID SecureSessionID; - public LLVector3 startpos; + public LLVector3 startpos; public string firstname; public string lastname; public uint circuitcode; - public bool child; + public bool child; + public LLUUID InventoryFolder; + public LLUUID BaseFolder; } } diff --git a/OpenSim.Framework/Types/Login.cs b/OpenSim.Framework/Types/Login.cs index ed77a46..71f9de3 100644 --- a/OpenSim.Framework/Types/Login.cs +++ b/OpenSim.Framework/Types/Login.cs @@ -14,6 +14,8 @@ namespace OpenSim.Framework.Types public LLUUID SecureSession = LLUUID.Zero; public LLUUID InventoryFolder; public LLUUID BaseFolder; + public uint CircuitCode; + public Login() { diff --git a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs index 56aa002..6a4484f 100644 --- a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs +++ b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs @@ -44,8 +44,8 @@ namespace OpenSim.GridInterfaces.Remote private string GridSendKey; private string GridRecvKey; private Dictionary AgentCircuits = new Dictionary(); - private ArrayList simneighbours = new ArrayList(); - private Hashtable griddatahash; + private ArrayList simneighbours = new ArrayList(); + private Hashtable griddatahash; public override Dictionary agentcircuits { @@ -59,7 +59,7 @@ namespace OpenSim.GridInterfaces.Remote set { simneighbours = value; } } - public override Hashtable GridData + public override Hashtable GridData { get { return griddatahash; } set { griddatahash = value; } @@ -68,34 +68,35 @@ namespace OpenSim.GridInterfaces.Remote public RemoteGridServer() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Remote Grid Server class created"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Remote Grid Server class created"); } public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) { - Hashtable GridParams = new Hashtable(); - GridParams["authkey"]=GridSendKey; - GridParams["UUID"]=SimUUID.ToString(); - GridParams["sim_ip"]=sim_ip; - GridParams["sim_port"]=sim_port.ToString(); - ArrayList SendParams = new ArrayList(); + Hashtable GridParams = new Hashtable(); + GridParams["authkey"] = GridSendKey; + GridParams["UUID"] = SimUUID.ToString(); + GridParams["sim_ip"] = sim_ip; + GridParams["sim_port"] = sim_port.ToString(); + ArrayList SendParams = new ArrayList(); SendParams.Add(GridParams); XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000); - Hashtable GridRespData = (Hashtable)GridResp.Value; - this.griddatahash=GridRespData; - - if(GridRespData.ContainsKey("error")) { - string errorstring = (string)GridRespData["error"]; - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Error connecting to grid:"); - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,errorstring); - return false; - } - this.neighbours = (ArrayList)GridRespData["neighbours"]; - Console.WriteLine(simneighbours.Count); - return true; - } + Hashtable GridRespData = (Hashtable)GridResp.Value; + this.griddatahash = GridRespData; + + if (GridRespData.ContainsKey("error")) + { + string errorstring = (string)GridRespData["error"]; + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Error connecting to grid:"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, errorstring); + return false; + } + this.neighbours = (ArrayList)GridRespData["neighbours"]; + Console.WriteLine(simneighbours.Count); + return true; + } public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) { @@ -120,7 +121,7 @@ namespace OpenSim.GridInterfaces.Remote user.LoginInfo.Agent = agentID; user.LoginInfo.Session = sessionID; user.LoginInfo.SecureSession = validcircuit.SecureSessionID; - user.LoginInfo.First = validcircuit.firstname; + user.LoginInfo.First = validcircuit.firstname; user.LoginInfo.Last = validcircuit.lastname; } else diff --git a/OpenSim.RegionServer/AuthenticateSessionsBase.cs b/OpenSim.RegionServer/AuthenticateSessionsBase.cs new file mode 100644 index 0000000..019fcc2 --- /dev/null +++ b/OpenSim.RegionServer/AuthenticateSessionsBase.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; + +namespace OpenSim +{ + public class AuthenticateSessionsBase + { + private Dictionary AgentCircuits = new Dictionary(); + + public AuthenticateSessionsBase() + { + + } + + public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) + { + AgentCircuitData validcircuit = null; + if (this.AgentCircuits.ContainsKey(circuitcode)) + { + validcircuit = this.AgentCircuits[circuitcode]; + } + AuthenticateResponse user = new AuthenticateResponse(); + if (validcircuit == null) + { + //don't have this circuit code in our list + user.Authorised = false; + return (user); + } + + if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID)) + { + user.Authorised = true; + user.LoginInfo = new Login(); + user.LoginInfo.Agent = agentID; + user.LoginInfo.Session = sessionID; + user.LoginInfo.SecureSession = validcircuit.SecureSessionID; + user.LoginInfo.First = validcircuit.firstname; + user.LoginInfo.Last = validcircuit.lastname; + user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder; + user.LoginInfo.BaseFolder = validcircuit.BaseFolder; + } + else + { + // Invalid + user.Authorised = false; + } + + return (user); + } + + public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) + { + if (this.AgentCircuits.ContainsKey(circuitCode)) + { + this.AgentCircuits[circuitCode] = agentData; + } + else + { + this.AgentCircuits.Add(circuitCode, agentData); + } + } + } +} diff --git a/OpenSim.RegionServer/AuthenticateSessionsLocal.cs b/OpenSim.RegionServer/AuthenticateSessionsLocal.cs new file mode 100644 index 0000000..ca46355 --- /dev/null +++ b/OpenSim.RegionServer/AuthenticateSessionsLocal.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Framework.Types; + +namespace OpenSim +{ + public class AuthenticateSessionsLocal : AuthenticateSessionsBase + { + public AuthenticateSessionsLocal() + { + + } + + public void AddNewSession(Login loginData) + { + AgentCircuitData agent = new AgentCircuitData(); + agent.AgentID = loginData.Agent; + agent.firstname = loginData.First; + agent.lastname = loginData.Last; + agent.SessionID = loginData.Session; + agent.SecureSessionID = loginData.SecureSession; + agent.circuitcode = loginData.CircuitCode; + agent.BaseFolder = loginData.BaseFolder; + agent.InventoryFolder = loginData.InventoryFolder; + + this.AddNewCircuit(agent.circuitcode, agent); + } + } +} diff --git a/OpenSim.RegionServer/AuthenticateSessionsRemote.cs b/OpenSim.RegionServer/AuthenticateSessionsRemote.cs new file mode 100644 index 0000000..57c98e4 --- /dev/null +++ b/OpenSim.RegionServer/AuthenticateSessionsRemote.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using libsecondlife; +using OpenSim.Framework.Types; +using Nwc.XmlRpc; + +namespace OpenSim +{ + public class AuthenticateSessionsRemote : AuthenticateSessionsBase + { + public AuthenticateSessionsRemote() + { + + } + + public XmlRpcResponse ExpectUser(XmlRpcRequest request) + { + Hashtable requestData = (Hashtable)request.Params[0]; + AgentCircuitData agentData = new AgentCircuitData(); + agentData.SessionID = new LLUUID((string)requestData["session_id"]); + agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); + agentData.firstname = (string)requestData["firstname"]; + agentData.lastname = (string)requestData["lastname"]; + agentData.AgentID = new LLUUID((string)requestData["agent_id"]); + agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); + if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) + { + agentData.child = true; + } + else + { + agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); + agentData.child = false; + } + + this.AddNewCircuit(agentData.circuitcode, agentData); + + return new XmlRpcResponse(); + } + } +} diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim.RegionServer/OpenSim.RegionServer.csproj index b4868bd..b5db7db 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.csproj +++ b/OpenSim.RegionServer/OpenSim.RegionServer.csproj @@ -1,4 +1,4 @@ - + Local 8.0.50727 @@ -6,7 +6,8 @@ {632E1BFD-0000-0000-0000-000000000000} Debug AnyCPU - + + OpenSim.RegionServer @@ -15,9 +16,11 @@ IE50 false Library - + + OpenSim.RegionServer - + + @@ -28,7 +31,8 @@ TRACE;DEBUG - + + True 4096 False @@ -37,7 +41,8 @@ False False 4 - + + False @@ -46,7 +51,8 @@ TRACE - + + False 4096 True @@ -55,26 +61,28 @@ False False 4 - + + - + System.dll False - + + System.Xml.dll False - + ..\bin\libsecondlife.dll False - + ..\bin\Axiom.MathLib.dll False - + ..\bin\Db4objects.Db4o.dll False @@ -84,49 +92,52 @@ OpenSim.Terrain.BasicTerrain {2270B8FE-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Framework {8ACA2445-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Framework.Console {A7CD0630-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.GenericConfig.Xml {E88EF749-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Physics.Manager {8BE16150-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Servers {8BB20F0A-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False XMLRPC {8E81D43C-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False Code + + + Code @@ -150,12 +161,16 @@ Code + SimClient.cs Code + SimClient.cs Code + SimClient.cs + Code Code @@ -183,12 +198,14 @@ Code + Avatar.cs Code Code + Avatar.cs Code @@ -210,9 +227,11 @@ Code + World.cs Code + World.cs Code @@ -240,4 +259,4 @@ - + \ No newline at end of file diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build index 25f4b60..cff8711 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build +++ b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build @@ -12,6 +12,8 @@ + + diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 6b89bfe..55dab3b 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -77,6 +77,7 @@ namespace OpenSim private UDPServer m_udpServer; protected BaseHttpServer httpServer; + private AuthenticateSessionsBase AuthenticateSessionsHandler; protected ConsoleBase m_console; @@ -144,8 +145,19 @@ namespace OpenSim Environment.Exit(1); } - //PacketServer packetServer = new PacketServer(this); - m_udpServer = new UDPServer(this.regionData.IPListenPort, this.GridServers, this.AssetCache, this.InventoryCache, this.regionData, this.m_sandbox, this.user_accounts, this.m_console); + //Authenticate Session Handler + if (m_sandbox) + { + AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal(); + this.AuthenticateSessionsHandler = authen; + } + else + { + AuthenticateSessionsRemote authen = new AuthenticateSessionsRemote(); + this.AuthenticateSessionsHandler = authen; + } + + m_udpServer = new UDPServer(this.regionData.IPListenPort, this.GridServers, this.AssetCache, this.InventoryCache, this.regionData, this.m_sandbox, this.user_accounts, this.m_console, this.AuthenticateSessionsHandler); //should be passing a IGenericConfig object to these so they can read the config data they want from it GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey); @@ -174,8 +186,9 @@ namespace OpenSim bool sandBoxWithLoginServer = m_loginserver && m_sandbox; if (sandBoxWithLoginServer) { - loginServer = new LoginServer(gridServer, regionData.IPListenAddr, regionData.IPListenPort, regionData.RegionLocX, regionData.RegionLocY, this.user_accounts); + loginServer = new LoginServer( regionData.IPListenAddr, regionData.IPListenPort, regionData.RegionLocX, regionData.RegionLocY, this.user_accounts); loginServer.Startup(); + loginServer.SetSessionHandler(((AuthenticateSessionsLocal) this.AuthenticateSessionsHandler).AddNewSession); if (user_accounts) { @@ -285,38 +298,7 @@ namespace OpenSim { // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server - httpServer.AddXmlRPCHandler("expect_user", - delegate(XmlRpcRequest request) - { - Hashtable requestData = (Hashtable)request.Params[0]; - AgentCircuitData agent_data = new AgentCircuitData(); - agent_data.SessionID = new LLUUID((string)requestData["session_id"]); - agent_data.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); - agent_data.firstname = (string)requestData["firstname"]; - agent_data.lastname = (string)requestData["lastname"]; - agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); - agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); - if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) - { - agent_data.child = true; - } - else - { - agent_data.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); - agent_data.child = false; - } - - if (((RemoteGridBase)this.GridServers.GridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode)) - { - ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[(uint)agent_data.circuitcode] = agent_data; - } - else - { - ((RemoteGridBase)this.GridServers.GridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); - } - - return new XmlRpcResponse(); - }); + httpServer.AddXmlRPCHandler("expect_user", ((AuthenticateSessionsRemote)this.AuthenticateSessionsHandler).ExpectUser ); httpServer.AddXmlRPCHandler("agent_crossing", delegate(XmlRpcRequest request) diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 5bd098b..4cf2813 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -113,14 +113,14 @@ namespace OpenSim OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs - Started up new client thread to handle incoming request"); cirpack = initialcirpack; userEP = remoteEP; - if (m_gridServer.GetName() == "Remote") + /* if (m_gridServer.GetName() == "Remote") { this.startpos = ((RemoteGridBase)m_gridServer).agentcircuits[initialcirpack.CircuitCode.Code].startpos; } else - { + {*/ this.startpos = new LLVector3(128, 128, m_world.Terrain[(int)128, (int)128] + 15.0f); // new LLVector3(128.0f, 128.0f, 60f); - } + //} PacketQueue = new BlockingQueue(); this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); diff --git a/OpenSim.RegionServer/UDPServer.cs b/OpenSim.RegionServer/UDPServer.cs index 0fd3cdb..e4ac042 100644 --- a/OpenSim.RegionServer/UDPServer.cs +++ b/OpenSim.RegionServer/UDPServer.cs @@ -47,6 +47,8 @@ namespace OpenSim private bool m_sandbox = false; private bool user_accounts = false; private ConsoleBase m_console; + private AuthenticateSessionsBase m_authenticateSessionsClass; + public AuthenticateSessionHandler AuthenticateHandler; public PacketServer PacketServer @@ -70,7 +72,7 @@ namespace OpenSim } } - public UDPServer(int port, Grid gridServers, AssetCache assetCache, InventoryCache inventoryCache, RegionInfo _regionData, bool sandbox, bool accounts, ConsoleBase console) + public UDPServer(int port, Grid gridServers, AssetCache assetCache, InventoryCache inventoryCache, RegionInfo _regionData, bool sandbox, bool accounts, ConsoleBase console , AuthenticateSessionsBase authenticateClass) { listenPort = port; this.m_gridServers = gridServers; @@ -80,10 +82,11 @@ namespace OpenSim this.m_sandbox = sandbox; this.user_accounts = accounts; this.m_console = console; + this.m_authenticateSessionsClass = authenticateClass; PacketServer packetServer = new PacketServer(this); //set up delegate for authenticate sessions - this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_gridServers.GridServer.AuthenticateSession); + this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_authenticateSessionsClass.AuthenticateSession); } protected virtual void OnReceivedData(IAsyncResult result) diff --git a/OpenSim.Servers/LocalUserProfileManager.cs b/OpenSim.Servers/LocalUserProfileManager.cs index 2a119c5..a8b5f1f 100644 --- a/OpenSim.Servers/LocalUserProfileManager.cs +++ b/OpenSim.Servers/LocalUserProfileManager.cs @@ -45,6 +45,7 @@ namespace OpenSim.UserServer private string m_ipAddr; private uint regionX; private uint regionY; + private AddNewSessionHandler AddSession; public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr , uint regX, uint regY) { @@ -55,6 +56,11 @@ namespace OpenSim.UserServer regionY = regY; } + public void SetSessionHandler(AddNewSessionHandler sessionHandler) + { + this.AddSession = sessionHandler; + } + public override void InitUserProfiles() { // TODO: need to load from database @@ -100,15 +106,18 @@ namespace OpenSim.UserServer _login.Agent = new LLUUID((string)response["agent_id"]) ; _login.Session = new LLUUID((string)response["session_id"]); _login.SecureSession = new LLUUID((string)response["secure_session_id"]); + _login.CircuitCode =(uint) circode; _login.BaseFolder = null; _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 (m_gridServer.GetName() == "Local") { Console.WriteLine("adding login data to gridserver"); ((LocalGridBase)this.m_gridServer).AddNewSession(_login); - } + }*/ + + this.AddSession(_login); } } } 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; namespace OpenSim.UserServer { + public delegate void AddNewSessionHandler(Login loginData); /// /// When running in local (default) mode , handles client logins. /// @@ -64,6 +65,7 @@ namespace OpenSim.UserServer private string m_simAddr; private uint regionX; private uint regionY; + private AddNewSessionHandler AddSession; public LocalUserProfileManager LocalUserManager { @@ -73,9 +75,8 @@ namespace OpenSim.UserServer } } - public LoginServer(IGridServer gridServer, string simAddr, int simPort, uint regX, uint regY, bool useAccounts) + public LoginServer( string simAddr, int simPort, uint regX, uint regY, bool useAccounts) { - m_gridServer = gridServer; m_simPort = simPort; m_simAddr = simAddr; regionX = regX; @@ -83,6 +84,12 @@ namespace OpenSim.UserServer this.userAccounts = useAccounts; } + public void SetSessionHandler(AddNewSessionHandler sessionHandler) + { + this.AddSession = sessionHandler; + this.userManager.SetSessionHandler(sessionHandler); + } + public void Startup() { this._needPasswd = false; @@ -180,15 +187,16 @@ namespace OpenSim.UserServer _login.Agent = loginResponse.AgentID; _login.Session = loginResponse.SessionID; _login.SecureSession = loginResponse.SecureSessionID; - + _login.CircuitCode = (uint) loginResponse.CircuitCode; _login.BaseFolder = loginResponse.BaseFolderID; _login.InventoryFolder = loginResponse.InventoryFolderID; //working on local computer if so lets add to the gridserver's list of sessions? - if (m_gridServer.GetName() == "Local") + /* if (m_gridServer.GetName() == "Local") { ((LocalGridBase)m_gridServer).AddNewSession(_login); - } + }*/ + AddSession(_login); return response; } diff --git a/OpenSim.sln b/OpenSim.sln index 5b054aa..db4f96d 100644 --- a/OpenSim.sln +++ b/OpenSim.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +# Visual C# Express 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}" -- cgit v1.1