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 | |
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.
-rw-r--r-- | OpenSim.Framework/Types/AgentCiruitData.cs | 6 | ||||
-rw-r--r-- | OpenSim.Framework/Types/Login.cs | 2 | ||||
-rw-r--r-- | OpenSim.GridInterfaces/Remote/RemoteGridServer.cs | 49 | ||||
-rw-r--r-- | OpenSim.RegionServer/AuthenticateSessionsBase.cs | 67 | ||||
-rw-r--r-- | OpenSim.RegionServer/AuthenticateSessionsLocal.cs | 30 | ||||
-rw-r--r-- | OpenSim.RegionServer/AuthenticateSessionsRemote.cs | 44 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSim.RegionServer.csproj | 61 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSim.RegionServer.dll.build | 2 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 52 | ||||
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 6 | ||||
-rw-r--r-- | OpenSim.RegionServer/UDPServer.cs | 7 | ||||
-rw-r--r-- | OpenSim.Servers/LocalUserProfileManager.cs | 13 | ||||
-rw-r--r-- | OpenSim.Servers/LoginServer.cs | 18 | ||||
-rw-r--r-- | OpenSim.sln | 2 |
14 files changed, 264 insertions, 95 deletions
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 | |||
11 | public LLUUID AgentID; | 11 | public LLUUID AgentID; |
12 | public LLUUID SessionID; | 12 | public LLUUID SessionID; |
13 | public LLUUID SecureSessionID; | 13 | public LLUUID SecureSessionID; |
14 | public LLVector3 startpos; | 14 | public LLVector3 startpos; |
15 | public string firstname; | 15 | public string firstname; |
16 | public string lastname; | 16 | public string lastname; |
17 | public uint circuitcode; | 17 | public uint circuitcode; |
18 | public bool child; | 18 | public bool child; |
19 | public LLUUID InventoryFolder; | ||
20 | public LLUUID BaseFolder; | ||
19 | } | 21 | } |
20 | } | 22 | } |
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 | |||
14 | public LLUUID SecureSession = LLUUID.Zero; | 14 | public LLUUID SecureSession = LLUUID.Zero; |
15 | public LLUUID InventoryFolder; | 15 | public LLUUID InventoryFolder; |
16 | public LLUUID BaseFolder; | 16 | public LLUUID BaseFolder; |
17 | public uint CircuitCode; | ||
18 | |||
17 | public Login() | 19 | public Login() |
18 | { | 20 | { |
19 | 21 | ||
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 | |||
44 | private string GridSendKey; | 44 | private string GridSendKey; |
45 | private string GridRecvKey; | 45 | private string GridRecvKey; |
46 | private Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>(); | 46 | private Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>(); |
47 | private ArrayList simneighbours = new ArrayList(); | 47 | private ArrayList simneighbours = new ArrayList(); |
48 | private Hashtable griddatahash; | 48 | private Hashtable griddatahash; |
49 | 49 | ||
50 | public override Dictionary<uint, AgentCircuitData> agentcircuits | 50 | public override Dictionary<uint, AgentCircuitData> agentcircuits |
51 | { | 51 | { |
@@ -59,7 +59,7 @@ namespace OpenSim.GridInterfaces.Remote | |||
59 | set { simneighbours = value; } | 59 | set { simneighbours = value; } |
60 | } | 60 | } |
61 | 61 | ||
62 | public override Hashtable GridData | 62 | public override Hashtable GridData |
63 | { | 63 | { |
64 | get { return griddatahash; } | 64 | get { return griddatahash; } |
65 | set { griddatahash = value; } | 65 | set { griddatahash = value; } |
@@ -68,34 +68,35 @@ namespace OpenSim.GridInterfaces.Remote | |||
68 | 68 | ||
69 | public RemoteGridServer() | 69 | public RemoteGridServer() |
70 | { | 70 | { |
71 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Remote Grid Server class created"); | 71 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Remote Grid Server class created"); |
72 | } | 72 | } |
73 | 73 | ||
74 | public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) | 74 | public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) |
75 | { | 75 | { |
76 | Hashtable GridParams = new Hashtable(); | 76 | Hashtable GridParams = new Hashtable(); |
77 | GridParams["authkey"]=GridSendKey; | 77 | GridParams["authkey"] = GridSendKey; |
78 | GridParams["UUID"]=SimUUID.ToString(); | 78 | GridParams["UUID"] = SimUUID.ToString(); |
79 | GridParams["sim_ip"]=sim_ip; | 79 | GridParams["sim_ip"] = sim_ip; |
80 | GridParams["sim_port"]=sim_port.ToString(); | 80 | GridParams["sim_port"] = sim_port.ToString(); |
81 | ArrayList SendParams = new ArrayList(); | 81 | ArrayList SendParams = new ArrayList(); |
82 | SendParams.Add(GridParams); | 82 | SendParams.Add(GridParams); |
83 | 83 | ||
84 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | 84 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); |
85 | XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000); | 85 | XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000); |
86 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 86 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
87 | this.griddatahash=GridRespData; | 87 | this.griddatahash = GridRespData; |
88 | 88 | ||
89 | if(GridRespData.ContainsKey("error")) { | 89 | if (GridRespData.ContainsKey("error")) |
90 | string errorstring = (string)GridRespData["error"]; | 90 | { |
91 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Error connecting to grid:"); | 91 | string errorstring = (string)GridRespData["error"]; |
92 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,errorstring); | 92 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Error connecting to grid:"); |
93 | return false; | 93 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, errorstring); |
94 | } | 94 | return false; |
95 | this.neighbours = (ArrayList)GridRespData["neighbours"]; | 95 | } |
96 | Console.WriteLine(simneighbours.Count); | 96 | this.neighbours = (ArrayList)GridRespData["neighbours"]; |
97 | return true; | 97 | Console.WriteLine(simneighbours.Count); |
98 | } | 98 | return true; |
99 | } | ||
99 | 100 | ||
100 | public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) | 101 | public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) |
101 | { | 102 | { |
@@ -120,7 +121,7 @@ namespace OpenSim.GridInterfaces.Remote | |||
120 | user.LoginInfo.Agent = agentID; | 121 | user.LoginInfo.Agent = agentID; |
121 | user.LoginInfo.Session = sessionID; | 122 | user.LoginInfo.Session = sessionID; |
122 | user.LoginInfo.SecureSession = validcircuit.SecureSessionID; | 123 | user.LoginInfo.SecureSession = validcircuit.SecureSessionID; |
123 | user.LoginInfo.First = validcircuit.firstname; | 124 | user.LoginInfo.First = validcircuit.firstname; |
124 | user.LoginInfo.Last = validcircuit.lastname; | 125 | user.LoginInfo.Last = validcircuit.lastname; |
125 | } | 126 | } |
126 | else | 127 | 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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Framework.Types; | ||
7 | |||
8 | namespace OpenSim | ||
9 | { | ||
10 | public class AuthenticateSessionsBase | ||
11 | { | ||
12 | private Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>(); | ||
13 | |||
14 | public AuthenticateSessionsBase() | ||
15 | { | ||
16 | |||
17 | } | ||
18 | |||
19 | public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) | ||
20 | { | ||
21 | AgentCircuitData validcircuit = null; | ||
22 | if (this.AgentCircuits.ContainsKey(circuitcode)) | ||
23 | { | ||
24 | validcircuit = this.AgentCircuits[circuitcode]; | ||
25 | } | ||
26 | AuthenticateResponse user = new AuthenticateResponse(); | ||
27 | if (validcircuit == null) | ||
28 | { | ||
29 | //don't have this circuit code in our list | ||
30 | user.Authorised = false; | ||
31 | return (user); | ||
32 | } | ||
33 | |||
34 | if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID)) | ||
35 | { | ||
36 | user.Authorised = true; | ||
37 | user.LoginInfo = new Login(); | ||
38 | user.LoginInfo.Agent = agentID; | ||
39 | user.LoginInfo.Session = sessionID; | ||
40 | user.LoginInfo.SecureSession = validcircuit.SecureSessionID; | ||
41 | user.LoginInfo.First = validcircuit.firstname; | ||
42 | user.LoginInfo.Last = validcircuit.lastname; | ||
43 | user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder; | ||
44 | user.LoginInfo.BaseFolder = validcircuit.BaseFolder; | ||
45 | } | ||
46 | else | ||
47 | { | ||
48 | // Invalid | ||
49 | user.Authorised = false; | ||
50 | } | ||
51 | |||
52 | return (user); | ||
53 | } | ||
54 | |||
55 | public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) | ||
56 | { | ||
57 | if (this.AgentCircuits.ContainsKey(circuitCode)) | ||
58 | { | ||
59 | this.AgentCircuits[circuitCode] = agentData; | ||
60 | } | ||
61 | else | ||
62 | { | ||
63 | this.AgentCircuits.Add(circuitCode, agentData); | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | } | ||
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Framework.Types; | ||
5 | |||
6 | namespace OpenSim | ||
7 | { | ||
8 | public class AuthenticateSessionsLocal : AuthenticateSessionsBase | ||
9 | { | ||
10 | public AuthenticateSessionsLocal() | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | public void AddNewSession(Login loginData) | ||
16 | { | ||
17 | AgentCircuitData agent = new AgentCircuitData(); | ||
18 | agent.AgentID = loginData.Agent; | ||
19 | agent.firstname = loginData.First; | ||
20 | agent.lastname = loginData.Last; | ||
21 | agent.SessionID = loginData.Session; | ||
22 | agent.SecureSessionID = loginData.SecureSession; | ||
23 | agent.circuitcode = loginData.CircuitCode; | ||
24 | agent.BaseFolder = loginData.BaseFolder; | ||
25 | agent.InventoryFolder = loginData.InventoryFolder; | ||
26 | |||
27 | this.AddNewCircuit(agent.circuitcode, agent); | ||
28 | } | ||
29 | } | ||
30 | } | ||
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 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | ||
4 | using System.Text; | ||
5 | using System.Xml; | ||
6 | using libsecondlife; | ||
7 | using OpenSim.Framework.Types; | ||
8 | using Nwc.XmlRpc; | ||
9 | |||
10 | namespace OpenSim | ||
11 | { | ||
12 | public class AuthenticateSessionsRemote : AuthenticateSessionsBase | ||
13 | { | ||
14 | public AuthenticateSessionsRemote() | ||
15 | { | ||
16 | |||
17 | } | ||
18 | |||
19 | public XmlRpcResponse ExpectUser(XmlRpcRequest request) | ||
20 | { | ||
21 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
22 | AgentCircuitData agentData = new AgentCircuitData(); | ||
23 | agentData.SessionID = new LLUUID((string)requestData["session_id"]); | ||
24 | agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); | ||
25 | agentData.firstname = (string)requestData["firstname"]; | ||
26 | agentData.lastname = (string)requestData["lastname"]; | ||
27 | agentData.AgentID = new LLUUID((string)requestData["agent_id"]); | ||
28 | agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | ||
29 | if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) | ||
30 | { | ||
31 | agentData.child = true; | ||
32 | } | ||
33 | else | ||
34 | { | ||
35 | agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); | ||
36 | agentData.child = false; | ||
37 | } | ||
38 | |||
39 | this.AddNewCircuit(agentData.circuitcode, agentData); | ||
40 | |||
41 | return new XmlRpcResponse(); | ||
42 | } | ||
43 | } | ||
44 | } | ||
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 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <ProjectType>Local</ProjectType> | 3 | <ProjectType>Local</ProjectType> |
4 | <ProductVersion>8.0.50727</ProductVersion> | 4 | <ProductVersion>8.0.50727</ProductVersion> |
@@ -6,7 +6,8 @@ | |||
6 | <ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid> | 6 | <ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid> |
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
9 | <ApplicationIcon></ApplicationIcon> | 9 | <ApplicationIcon> |
10 | </ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | 11 | <AssemblyKeyContainerName> |
11 | </AssemblyKeyContainerName> | 12 | </AssemblyKeyContainerName> |
12 | <AssemblyName>OpenSim.RegionServer</AssemblyName> | 13 | <AssemblyName>OpenSim.RegionServer</AssemblyName> |
@@ -15,9 +16,11 @@ | |||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | 16 | <DefaultTargetSchema>IE50</DefaultTargetSchema> |
16 | <DelaySign>false</DelaySign> | 17 | <DelaySign>false</DelaySign> |
17 | <OutputType>Library</OutputType> | 18 | <OutputType>Library</OutputType> |
18 | <AppDesignerFolder></AppDesignerFolder> | 19 | <AppDesignerFolder> |
20 | </AppDesignerFolder> | ||
19 | <RootNamespace>OpenSim.RegionServer</RootNamespace> | 21 | <RootNamespace>OpenSim.RegionServer</RootNamespace> |
20 | <StartupObject></StartupObject> | 22 | <StartupObject> |
23 | </StartupObject> | ||
21 | <FileUpgradeFlags> | 24 | <FileUpgradeFlags> |
22 | </FileUpgradeFlags> | 25 | </FileUpgradeFlags> |
23 | </PropertyGroup> | 26 | </PropertyGroup> |
@@ -28,7 +31,8 @@ | |||
28 | <ConfigurationOverrideFile> | 31 | <ConfigurationOverrideFile> |
29 | </ConfigurationOverrideFile> | 32 | </ConfigurationOverrideFile> |
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | 33 | <DefineConstants>TRACE;DEBUG</DefineConstants> |
31 | <DocumentationFile></DocumentationFile> | 34 | <DocumentationFile> |
35 | </DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | 36 | <DebugSymbols>True</DebugSymbols> |
33 | <FileAlignment>4096</FileAlignment> | 37 | <FileAlignment>4096</FileAlignment> |
34 | <Optimize>False</Optimize> | 38 | <Optimize>False</Optimize> |
@@ -37,7 +41,8 @@ | |||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 41 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 42 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
39 | <WarningLevel>4</WarningLevel> | 43 | <WarningLevel>4</WarningLevel> |
40 | <NoWarn></NoWarn> | 44 | <NoWarn> |
45 | </NoWarn> | ||
41 | </PropertyGroup> | 46 | </PropertyGroup> |
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 47 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | 48 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
@@ -46,7 +51,8 @@ | |||
46 | <ConfigurationOverrideFile> | 51 | <ConfigurationOverrideFile> |
47 | </ConfigurationOverrideFile> | 52 | </ConfigurationOverrideFile> |
48 | <DefineConstants>TRACE</DefineConstants> | 53 | <DefineConstants>TRACE</DefineConstants> |
49 | <DocumentationFile></DocumentationFile> | 54 | <DocumentationFile> |
55 | </DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | 56 | <DebugSymbols>False</DebugSymbols> |
51 | <FileAlignment>4096</FileAlignment> | 57 | <FileAlignment>4096</FileAlignment> |
52 | <Optimize>True</Optimize> | 58 | <Optimize>True</Optimize> |
@@ -55,26 +61,28 @@ | |||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 61 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 62 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
57 | <WarningLevel>4</WarningLevel> | 63 | <WarningLevel>4</WarningLevel> |
58 | <NoWarn></NoWarn> | 64 | <NoWarn> |
65 | </NoWarn> | ||
59 | </PropertyGroup> | 66 | </PropertyGroup> |
60 | <ItemGroup> | 67 | <ItemGroup> |
61 | <Reference Include="System" > | 68 | <Reference Include="System"> |
62 | <HintPath>System.dll</HintPath> | 69 | <HintPath>System.dll</HintPath> |
63 | <Private>False</Private> | 70 | <Private>False</Private> |
64 | </Reference> | 71 | </Reference> |
65 | <Reference Include="System.Xml" > | 72 | <Reference Include="System.Data" /> |
73 | <Reference Include="System.Xml"> | ||
66 | <HintPath>System.Xml.dll</HintPath> | 74 | <HintPath>System.Xml.dll</HintPath> |
67 | <Private>False</Private> | 75 | <Private>False</Private> |
68 | </Reference> | 76 | </Reference> |
69 | <Reference Include="libsecondlife.dll" > | 77 | <Reference Include="libsecondlife.dll"> |
70 | <HintPath>..\bin\libsecondlife.dll</HintPath> | 78 | <HintPath>..\bin\libsecondlife.dll</HintPath> |
71 | <Private>False</Private> | 79 | <Private>False</Private> |
72 | </Reference> | 80 | </Reference> |
73 | <Reference Include="Axiom.MathLib.dll" > | 81 | <Reference Include="Axiom.MathLib.dll"> |
74 | <HintPath>..\bin\Axiom.MathLib.dll</HintPath> | 82 | <HintPath>..\bin\Axiom.MathLib.dll</HintPath> |
75 | <Private>False</Private> | 83 | <Private>False</Private> |
76 | </Reference> | 84 | </Reference> |
77 | <Reference Include="Db4objects.Db4o.dll" > | 85 | <Reference Include="Db4objects.Db4o.dll"> |
78 | <HintPath>..\bin\Db4objects.Db4o.dll</HintPath> | 86 | <HintPath>..\bin\Db4objects.Db4o.dll</HintPath> |
79 | <Private>False</Private> | 87 | <Private>False</Private> |
80 | </Reference> | 88 | </Reference> |
@@ -84,49 +92,52 @@ | |||
84 | <Name>OpenSim.Terrain.BasicTerrain</Name> | 92 | <Name>OpenSim.Terrain.BasicTerrain</Name> |
85 | <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> | 93 | <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> |
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 94 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
87 | <Private>False</Private> | 95 | <Private>False</Private> |
88 | </ProjectReference> | 96 | </ProjectReference> |
89 | <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> | 97 | <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> |
90 | <Name>OpenSim.Framework</Name> | 98 | <Name>OpenSim.Framework</Name> |
91 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> | 99 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> |
92 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 100 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
93 | <Private>False</Private> | 101 | <Private>False</Private> |
94 | </ProjectReference> | 102 | </ProjectReference> |
95 | <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> | 103 | <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> |
96 | <Name>OpenSim.Framework.Console</Name> | 104 | <Name>OpenSim.Framework.Console</Name> |
97 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | 105 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> |
98 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 106 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
99 | <Private>False</Private> | 107 | <Private>False</Private> |
100 | </ProjectReference> | 108 | </ProjectReference> |
101 | <ProjectReference Include="..\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj"> | 109 | <ProjectReference Include="..\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj"> |
102 | <Name>OpenSim.GenericConfig.Xml</Name> | 110 | <Name>OpenSim.GenericConfig.Xml</Name> |
103 | <Project>{E88EF749-0000-0000-0000-000000000000}</Project> | 111 | <Project>{E88EF749-0000-0000-0000-000000000000}</Project> |
104 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 112 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
105 | <Private>False</Private> | 113 | <Private>False</Private> |
106 | </ProjectReference> | 114 | </ProjectReference> |
107 | <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj"> | 115 | <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj"> |
108 | <Name>OpenSim.Physics.Manager</Name> | 116 | <Name>OpenSim.Physics.Manager</Name> |
109 | <Project>{8BE16150-0000-0000-0000-000000000000}</Project> | 117 | <Project>{8BE16150-0000-0000-0000-000000000000}</Project> |
110 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 118 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
111 | <Private>False</Private> | 119 | <Private>False</Private> |
112 | </ProjectReference> | 120 | </ProjectReference> |
113 | <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj"> | 121 | <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj"> |
114 | <Name>OpenSim.Servers</Name> | 122 | <Name>OpenSim.Servers</Name> |
115 | <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> | 123 | <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> |
116 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 124 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
117 | <Private>False</Private> | 125 | <Private>False</Private> |
118 | </ProjectReference> | 126 | </ProjectReference> |
119 | <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> | 127 | <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> |
120 | <Name>XMLRPC</Name> | 128 | <Name>XMLRPC</Name> |
121 | <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> | 129 | <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> |
122 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 130 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
123 | <Private>False</Private> | 131 | <Private>False</Private> |
124 | </ProjectReference> | 132 | </ProjectReference> |
125 | </ItemGroup> | 133 | </ItemGroup> |
126 | <ItemGroup> | 134 | <ItemGroup> |
127 | <Compile Include="AgentAssetUpload.cs"> | 135 | <Compile Include="AgentAssetUpload.cs"> |
128 | <SubType>Code</SubType> | 136 | <SubType>Code</SubType> |
129 | </Compile> | 137 | </Compile> |
138 | <Compile Include="AuthenticateSessionsBase.cs" /> | ||
139 | <Compile Include="AuthenticateSessionsLocal.cs" /> | ||
140 | <Compile Include="AuthenticateSessionsRemote.cs" /> | ||
130 | <Compile Include="Grid.cs"> | 141 | <Compile Include="Grid.cs"> |
131 | <SubType>Code</SubType> | 142 | <SubType>Code</SubType> |
132 | </Compile> | 143 | </Compile> |
@@ -150,12 +161,16 @@ | |||
150 | </Compile> | 161 | </Compile> |
151 | <Compile Include="SimClient.Grid.cs"> | 162 | <Compile Include="SimClient.Grid.cs"> |
152 | <SubType>Code</SubType> | 163 | <SubType>Code</SubType> |
164 | <DependentUpon>SimClient.cs</DependentUpon> | ||
153 | </Compile> | 165 | </Compile> |
154 | <Compile Include="SimClient.PacketHandlers.cs"> | 166 | <Compile Include="SimClient.PacketHandlers.cs"> |
155 | <SubType>Code</SubType> | 167 | <SubType>Code</SubType> |
168 | <DependentUpon>SimClient.cs</DependentUpon> | ||
156 | </Compile> | 169 | </Compile> |
157 | <Compile Include="SimClient.ProcessPackets.cs"> | 170 | <Compile Include="SimClient.ProcessPackets.cs"> |
158 | <SubType>Code</SubType> | 171 | <SubType>Code</SubType> |
172 | <DependentUpon>SimClient.cs</DependentUpon> | ||
173 | <SubType>Code</SubType> | ||
159 | </Compile> | 174 | </Compile> |
160 | <Compile Include="SimClientBase.cs"> | 175 | <Compile Include="SimClientBase.cs"> |
161 | <SubType>Code</SubType> | 176 | <SubType>Code</SubType> |
@@ -183,12 +198,14 @@ | |||
183 | </Compile> | 198 | </Compile> |
184 | <Compile Include="world\Avatar.Client.cs"> | 199 | <Compile Include="world\Avatar.Client.cs"> |
185 | <SubType>Code</SubType> | 200 | <SubType>Code</SubType> |
201 | <DependentUpon>Avatar.cs</DependentUpon> | ||
186 | </Compile> | 202 | </Compile> |
187 | <Compile Include="world\Avatar.cs"> | 203 | <Compile Include="world\Avatar.cs"> |
188 | <SubType>Code</SubType> | 204 | <SubType>Code</SubType> |
189 | </Compile> | 205 | </Compile> |
190 | <Compile Include="world\Avatar.Update.cs"> | 206 | <Compile Include="world\Avatar.Update.cs"> |
191 | <SubType>Code</SubType> | 207 | <SubType>Code</SubType> |
208 | <DependentUpon>Avatar.cs</DependentUpon> | ||
192 | </Compile> | 209 | </Compile> |
193 | <Compile Include="world\AvatarAnimations.cs"> | 210 | <Compile Include="world\AvatarAnimations.cs"> |
194 | <SubType>Code</SubType> | 211 | <SubType>Code</SubType> |
@@ -210,9 +227,11 @@ | |||
210 | </Compile> | 227 | </Compile> |
211 | <Compile Include="world\World.PacketHandlers.cs"> | 228 | <Compile Include="world\World.PacketHandlers.cs"> |
212 | <SubType>Code</SubType> | 229 | <SubType>Code</SubType> |
230 | <DependentUpon>World.cs</DependentUpon> | ||
213 | </Compile> | 231 | </Compile> |
214 | <Compile Include="world\World.Scripting.cs"> | 232 | <Compile Include="world\World.Scripting.cs"> |
215 | <SubType>Code</SubType> | 233 | <SubType>Code</SubType> |
234 | <DependentUpon>World.cs</DependentUpon> | ||
216 | </Compile> | 235 | </Compile> |
217 | <Compile Include="world\scripting\IScriptContext.cs"> | 236 | <Compile Include="world\scripting\IScriptContext.cs"> |
218 | <SubType>Code</SubType> | 237 | <SubType>Code</SubType> |
@@ -240,4 +259,4 @@ | |||
240 | <PostBuildEvent> | 259 | <PostBuildEvent> |
241 | </PostBuildEvent> | 260 | </PostBuildEvent> |
242 | </PropertyGroup> | 261 | </PropertyGroup> |
243 | </Project> | 262 | </Project> \ 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 @@ | |||
12 | </resources> | 12 | </resources> |
13 | <sources failonempty="true"> | 13 | <sources failonempty="true"> |
14 | <include name="AgentAssetUpload.cs" /> | 14 | <include name="AgentAssetUpload.cs" /> |
15 | <include name="AuthenticateSessionsBase.cs" /> | ||
16 | <include name="AuthenticateSessionsLocal.cs" /> | ||
15 | <include name="Grid.cs" /> | 17 | <include name="Grid.cs" /> |
16 | <include name="OpenSimMain.cs" /> | 18 | <include name="OpenSimMain.cs" /> |
17 | <include name="OpenSimNetworkHandler.cs" /> | 19 | <include name="OpenSimNetworkHandler.cs" /> |
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 | |||
77 | 77 | ||
78 | private UDPServer m_udpServer; | 78 | private UDPServer m_udpServer; |
79 | protected BaseHttpServer httpServer; | 79 | protected BaseHttpServer httpServer; |
80 | private AuthenticateSessionsBase AuthenticateSessionsHandler; | ||
80 | 81 | ||
81 | protected ConsoleBase m_console; | 82 | protected ConsoleBase m_console; |
82 | 83 | ||
@@ -144,8 +145,19 @@ namespace OpenSim | |||
144 | Environment.Exit(1); | 145 | Environment.Exit(1); |
145 | } | 146 | } |
146 | 147 | ||
147 | //PacketServer packetServer = new PacketServer(this); | 148 | //Authenticate Session Handler |
148 | m_udpServer = new UDPServer(this.regionData.IPListenPort, this.GridServers, this.AssetCache, this.InventoryCache, this.regionData, this.m_sandbox, this.user_accounts, this.m_console); | 149 | if (m_sandbox) |
150 | { | ||
151 | AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal(); | ||
152 | this.AuthenticateSessionsHandler = authen; | ||
153 | } | ||
154 | else | ||
155 | { | ||
156 | AuthenticateSessionsRemote authen = new AuthenticateSessionsRemote(); | ||
157 | this.AuthenticateSessionsHandler = authen; | ||
158 | } | ||
159 | |||
160 | 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); | ||
149 | 161 | ||
150 | //should be passing a IGenericConfig object to these so they can read the config data they want from it | 162 | //should be passing a IGenericConfig object to these so they can read the config data they want from it |
151 | GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey); | 163 | GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey); |
@@ -174,8 +186,9 @@ namespace OpenSim | |||
174 | bool sandBoxWithLoginServer = m_loginserver && m_sandbox; | 186 | bool sandBoxWithLoginServer = m_loginserver && m_sandbox; |
175 | if (sandBoxWithLoginServer) | 187 | if (sandBoxWithLoginServer) |
176 | { | 188 | { |
177 | loginServer = new LoginServer(gridServer, regionData.IPListenAddr, regionData.IPListenPort, regionData.RegionLocX, regionData.RegionLocY, this.user_accounts); | 189 | loginServer = new LoginServer( regionData.IPListenAddr, regionData.IPListenPort, regionData.RegionLocX, regionData.RegionLocY, this.user_accounts); |
178 | loginServer.Startup(); | 190 | loginServer.Startup(); |
191 | loginServer.SetSessionHandler(((AuthenticateSessionsLocal) this.AuthenticateSessionsHandler).AddNewSession); | ||
179 | 192 | ||
180 | if (user_accounts) | 193 | if (user_accounts) |
181 | { | 194 | { |
@@ -285,38 +298,7 @@ namespace OpenSim | |||
285 | { | 298 | { |
286 | 299 | ||
287 | // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server | 300 | // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server |
288 | httpServer.AddXmlRPCHandler("expect_user", | 301 | httpServer.AddXmlRPCHandler("expect_user", ((AuthenticateSessionsRemote)this.AuthenticateSessionsHandler).ExpectUser ); |
289 | delegate(XmlRpcRequest request) | ||
290 | { | ||
291 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
292 | AgentCircuitData agent_data = new AgentCircuitData(); | ||
293 | agent_data.SessionID = new LLUUID((string)requestData["session_id"]); | ||
294 | agent_data.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); | ||
295 | agent_data.firstname = (string)requestData["firstname"]; | ||
296 | agent_data.lastname = (string)requestData["lastname"]; | ||
297 | agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); | ||
298 | agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | ||
299 | if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) | ||
300 | { | ||
301 | agent_data.child = true; | ||
302 | } | ||
303 | else | ||
304 | { | ||
305 | agent_data.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); | ||
306 | agent_data.child = false; | ||
307 | } | ||
308 | |||
309 | if (((RemoteGridBase)this.GridServers.GridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode)) | ||
310 | { | ||
311 | ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[(uint)agent_data.circuitcode] = agent_data; | ||
312 | } | ||
313 | else | ||
314 | { | ||
315 | ((RemoteGridBase)this.GridServers.GridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); | ||
316 | } | ||
317 | |||
318 | return new XmlRpcResponse(); | ||
319 | }); | ||
320 | 302 | ||
321 | httpServer.AddXmlRPCHandler("agent_crossing", | 303 | httpServer.AddXmlRPCHandler("agent_crossing", |
322 | delegate(XmlRpcRequest request) | 304 | 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 | |||
113 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs - Started up new client thread to handle incoming request"); | 113 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs - Started up new client thread to handle incoming request"); |
114 | cirpack = initialcirpack; | 114 | cirpack = initialcirpack; |
115 | userEP = remoteEP; | 115 | userEP = remoteEP; |
116 | if (m_gridServer.GetName() == "Remote") | 116 | /* if (m_gridServer.GetName() == "Remote") |
117 | { | 117 | { |
118 | this.startpos = ((RemoteGridBase)m_gridServer).agentcircuits[initialcirpack.CircuitCode.Code].startpos; | 118 | this.startpos = ((RemoteGridBase)m_gridServer).agentcircuits[initialcirpack.CircuitCode.Code].startpos; |
119 | } | 119 | } |
120 | else | 120 | else |
121 | { | 121 | {*/ |
122 | this.startpos = new LLVector3(128, 128, m_world.Terrain[(int)128, (int)128] + 15.0f); // new LLVector3(128.0f, 128.0f, 60f); | 122 | this.startpos = new LLVector3(128, 128, m_world.Terrain[(int)128, (int)128] + 15.0f); // new LLVector3(128.0f, 128.0f, 60f); |
123 | } | 123 | //} |
124 | PacketQueue = new BlockingQueue<QueItem>(); | 124 | PacketQueue = new BlockingQueue<QueItem>(); |
125 | 125 | ||
126 | this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); | 126 | 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 | |||
47 | private bool m_sandbox = false; | 47 | private bool m_sandbox = false; |
48 | private bool user_accounts = false; | 48 | private bool user_accounts = false; |
49 | private ConsoleBase m_console; | 49 | private ConsoleBase m_console; |
50 | private AuthenticateSessionsBase m_authenticateSessionsClass; | ||
51 | |||
50 | public AuthenticateSessionHandler AuthenticateHandler; | 52 | public AuthenticateSessionHandler AuthenticateHandler; |
51 | 53 | ||
52 | public PacketServer PacketServer | 54 | public PacketServer PacketServer |
@@ -70,7 +72,7 @@ namespace OpenSim | |||
70 | } | 72 | } |
71 | } | 73 | } |
72 | 74 | ||
73 | public UDPServer(int port, Grid gridServers, AssetCache assetCache, InventoryCache inventoryCache, RegionInfo _regionData, bool sandbox, bool accounts, ConsoleBase console) | 75 | public UDPServer(int port, Grid gridServers, AssetCache assetCache, InventoryCache inventoryCache, RegionInfo _regionData, bool sandbox, bool accounts, ConsoleBase console , AuthenticateSessionsBase authenticateClass) |
74 | { | 76 | { |
75 | listenPort = port; | 77 | listenPort = port; |
76 | this.m_gridServers = gridServers; | 78 | this.m_gridServers = gridServers; |
@@ -80,10 +82,11 @@ namespace OpenSim | |||
80 | this.m_sandbox = sandbox; | 82 | this.m_sandbox = sandbox; |
81 | this.user_accounts = accounts; | 83 | this.user_accounts = accounts; |
82 | this.m_console = console; | 84 | this.m_console = console; |
85 | this.m_authenticateSessionsClass = authenticateClass; | ||
83 | PacketServer packetServer = new PacketServer(this); | 86 | PacketServer packetServer = new PacketServer(this); |
84 | 87 | ||
85 | //set up delegate for authenticate sessions | 88 | //set up delegate for authenticate sessions |
86 | this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_gridServers.GridServer.AuthenticateSession); | 89 | this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_authenticateSessionsClass.AuthenticateSession); |
87 | } | 90 | } |
88 | 91 | ||
89 | protected virtual void OnReceivedData(IAsyncResult result) | 92 | 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 | |||
45 | private string m_ipAddr; | 45 | private string m_ipAddr; |
46 | private uint regionX; | 46 | private uint regionX; |
47 | private uint regionY; | 47 | private uint regionY; |
48 | private AddNewSessionHandler AddSession; | ||
48 | 49 | ||
49 | public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr , uint regX, uint regY) | 50 | public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr , uint regX, uint regY) |
50 | { | 51 | { |
@@ -55,6 +56,11 @@ namespace OpenSim.UserServer | |||
55 | regionY = regY; | 56 | regionY = regY; |
56 | } | 57 | } |
57 | 58 | ||
59 | public void SetSessionHandler(AddNewSessionHandler sessionHandler) | ||
60 | { | ||
61 | this.AddSession = sessionHandler; | ||
62 | } | ||
63 | |||
58 | public override void InitUserProfiles() | 64 | public override void InitUserProfiles() |
59 | { | 65 | { |
60 | // TODO: need to load from database | 66 | // TODO: need to load from database |
@@ -100,15 +106,18 @@ namespace OpenSim.UserServer | |||
100 | _login.Agent = new LLUUID((string)response["agent_id"]) ; | 106 | _login.Agent = new LLUUID((string)response["agent_id"]) ; |
101 | _login.Session = new LLUUID((string)response["session_id"]); | 107 | _login.Session = new LLUUID((string)response["session_id"]); |
102 | _login.SecureSession = new LLUUID((string)response["secure_session_id"]); | 108 | _login.SecureSession = new LLUUID((string)response["secure_session_id"]); |
109 | _login.CircuitCode =(uint) circode; | ||
103 | _login.BaseFolder = null; | 110 | _login.BaseFolder = null; |
104 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); | 111 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); |
105 | 112 | ||
106 | //working on local computer if so lets add to the gridserver's list of sessions? | 113 | //working on local computer if so lets add to the gridserver's list of sessions? |
107 | if (m_gridServer.GetName() == "Local") | 114 | /*if (m_gridServer.GetName() == "Local") |
108 | { | 115 | { |
109 | Console.WriteLine("adding login data to gridserver"); | 116 | Console.WriteLine("adding login data to gridserver"); |
110 | ((LocalGridBase)this.m_gridServer).AddNewSession(_login); | 117 | ((LocalGridBase)this.m_gridServer).AddNewSession(_login); |
111 | } | 118 | }*/ |
119 | |||
120 | this.AddSession(_login); | ||
112 | } | 121 | } |
113 | } | 122 | } |
114 | } | 123 | } |
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 | } |
diff --git a/OpenSim.sln b/OpenSim.sln index 5b054aa..db4f96d 100644 --- a/OpenSim.sln +++ b/OpenSim.sln | |||
@@ -1,5 +1,5 @@ | |||
1 | Microsoft Visual Studio Solution File, Format Version 9.00 | 1 | Microsoft Visual Studio Solution File, Format Version 9.00 |
2 | # Visual Studio 2005 | 2 | # Visual C# Express 2005 |
3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}" | 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}" |
4 | EndProject | 4 | EndProject |
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}" | 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}" |