diff options
Diffstat (limited to '')
-rw-r--r-- | OGS/OGS.sln (renamed from ogs/OGS-UserServer.sln) | 16 | ||||
-rw-r--r-- | OGS/ServerConsole/Properties/AssemblyInfo.cs (renamed from ogs/ServerConsole/Properties/AssemblyInfo.cs) | 0 | ||||
-rw-r--r-- | OGS/ServerConsole/ServerConsole.cs (renamed from ogs/ServerConsole/ServerConsole.cs) | 0 | ||||
-rw-r--r-- | OGS/ServerConsole/ServerConsole.csproj (renamed from ogs/ServerConsole/ServerConsole.csproj) | 9 | ||||
-rw-r--r-- | OGS/ServerConsole/default.build (renamed from ogs/ServerConsole/default.build) | 0 | ||||
-rw-r--r-- | OGS/common/VersionInfo/VersionInfo.cs (renamed from ogs/common/VersionInfo/VersionInfo.cs) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | OGS/common/bin/libsecondlife.dll (renamed from ogs/common/bin/libsecondlife.dll) | bin | 2338816 -> 2338816 bytes | |||
-rw-r--r-- | OGS/common/src/OGS-Console.cs (renamed from ogs/common/src/OGS-Console.cs) | 0 | ||||
-rw-r--r-- | OGS/common/src/VersionInfo.cs.template (renamed from ogs/common/src/VersionInfo.cs.template) | 0 | ||||
-rw-r--r-- | OGS/gridserver/default.build (renamed from ogs/gridserver/default.build) | 0 | ||||
-rw-r--r-- | OGS/gridserver/src/ConsoleCmds.cs (renamed from ogs/gridserver/src/ConsoleCmds.cs) | 0 | ||||
-rw-r--r-- | OGS/gridserver/src/GridHttp.cs (renamed from ogs/gridserver/src/GridHttp.cs) | 3 | ||||
-rw-r--r-- | OGS/gridserver/src/Main.cs (renamed from ogs/gridserver/src/Main.cs) | 0 | ||||
-rw-r--r-- | OGS/gridserver/src/OGS-GridServer.csproj (renamed from ogs/gridserver/src/OGS-GridServer.csproj) | 14 | ||||
-rw-r--r-- | OGS/gridserver/src/Properties/AssemblyInfo.cs (renamed from ogs/gridserver/src/Properties/AssemblyInfo.cs) | 0 | ||||
-rw-r--r-- | OGS/gridserver/src/SimProfiles.cs (renamed from ogs/gridserver/src/SimProfiles.cs) | 21 | ||||
-rw-r--r-- | OGS/userserver/src/ConsoleCmds.cs (renamed from ogs/userserver/src/ConsoleCmds.cs) | 0 | ||||
-rw-r--r-- | OGS/userserver/src/Main.cs (renamed from ogs/userserver/src/Main.cs) | 10 | ||||
-rw-r--r-- | OGS/userserver/src/OGS-UserServer.csproj (renamed from ogs/userserver/src/OGS-UserServer.csproj) | 13 | ||||
-rw-r--r-- | OGS/userserver/src/OGS-UserServer.csproj.user (renamed from ogs/userserver/src/OGS-UserServer.csproj.user) | 8 | ||||
-rw-r--r-- | OGS/userserver/src/Properties/AssemblyInfo.cs (renamed from ogs/userserver/src/Properties/AssemblyInfo.cs) | 0 | ||||
-rw-r--r-- | ogs/assetserver/assets/00000000000000005005000000000005/data | bin | 291 -> 0 bytes | |||
-rw-r--r-- | ogs/assetserver/assets/00000000000000007007000000000006/data | bin | 153 -> 0 bytes | |||
-rw-r--r-- | ogs/assetserver/assets/00000000000000007009000000000008/data | bin | 570 -> 0 bytes | |||
-rw-r--r-- | ogs/assetserver/assets/66c41e3938f9f75a024e585989bfab73/data | 105 | ||||
-rw-r--r-- | ogs/assetserver/assets/e0ee49b5a4184df8d3c9a65361fe7f49/data | 52 | ||||
-rw-r--r-- | ogs/common/src/Util.cs | 87 | ||||
-rw-r--r-- | ogs/genvers.sh | 9 | ||||
-rw-r--r-- | ogs/ogs.build | 38 | ||||
-rw-r--r-- | ogs/userserver/default.build | 63 | ||||
-rw-r--r-- | ogs/userserver/src/UserHttp.cs | 287 | ||||
-rw-r--r-- | ogs/userserver/src/UserProfiles.cs | 223 | ||||
-rw-r--r-- | ogs/userserver/src/Util.cs | 87 |
33 files changed, 40 insertions, 1005 deletions
diff --git a/ogs/OGS-UserServer.sln b/OGS/OGS.sln index 6c98af1..20eb03a 100644 --- a/ogs/OGS-UserServer.sln +++ b/OGS/OGS.sln | |||
@@ -3,9 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 9.00 | |||
3 | # Visual C# Express 2005 | 3 | # Visual C# Express 2005 |
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OGS-UserServer", "userserver\src\OGS-UserServer.csproj", "{D45B6E48-5668-478D-B9CB-6D46E665FACF}" | 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OGS-UserServer", "userserver\src\OGS-UserServer.csproj", "{D45B6E48-5668-478D-B9CB-6D46E665FACF}" |
5 | EndProject | 5 | EndProject |
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OGS-GridServer", "gridserver\src\OGS-GridServer.csproj", "{FE50A574-C8ED-433B-95F0-213A5EED2AB2}" | ||
7 | EndProject | ||
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerConsole", "ServerConsole\ServerConsole.csproj", "{7667E6E2-F227-41A2-B1B2-315613E1BAFC}" | 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerConsole", "ServerConsole\ServerConsole.csproj", "{7667E6E2-F227-41A2-B1B2-315613E1BAFC}" |
7 | EndProject | 9 | EndProject |
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OGS-GridServer", "gridserver\src\OGS-GridServer.csproj", "{FE50A574-C8ED-433B-95F0-213A5EED2AB2}" | 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework", "..\OpenSim.FrameWork\OpenSim.Framework.csproj", "{2E46A825-3168-492F-93BC-637126B5B72B}" |
9 | EndProject | 11 | EndProject |
10 | Global | 12 | Global |
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
@@ -17,14 +19,18 @@ Global | |||
17 | {D45B6E48-5668-478D-B9CB-6D46E665FACF}.Debug|Any CPU.Build.0 = Debug|Any CPU | 19 | {D45B6E48-5668-478D-B9CB-6D46E665FACF}.Debug|Any CPU.Build.0 = Debug|Any CPU |
18 | {D45B6E48-5668-478D-B9CB-6D46E665FACF}.Release|Any CPU.ActiveCfg = Release|Any CPU | 20 | {D45B6E48-5668-478D-B9CB-6D46E665FACF}.Release|Any CPU.ActiveCfg = Release|Any CPU |
19 | {D45B6E48-5668-478D-B9CB-6D46E665FACF}.Release|Any CPU.Build.0 = Release|Any CPU | 21 | {D45B6E48-5668-478D-B9CB-6D46E665FACF}.Release|Any CPU.Build.0 = Release|Any CPU |
20 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
21 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
22 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
23 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
24 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 22 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
25 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU | 23 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU |
26 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU | 24 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU |
27 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Release|Any CPU.Build.0 = Release|Any CPU | 25 | {FE50A574-C8ED-433B-95F0-213A5EED2AB2}.Release|Any CPU.Build.0 = Release|Any CPU |
26 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
27 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
28 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
29 | {7667E6E2-F227-41A2-B1B2-315613E1BAFC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
30 | {2E46A825-3168-492F-93BC-637126B5B72B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
31 | {2E46A825-3168-492F-93BC-637126B5B72B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
32 | {2E46A825-3168-492F-93BC-637126B5B72B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
33 | {2E46A825-3168-492F-93BC-637126B5B72B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
28 | EndGlobalSection | 34 | EndGlobalSection |
29 | GlobalSection(SolutionProperties) = preSolution | 35 | GlobalSection(SolutionProperties) = preSolution |
30 | HideSolutionNode = FALSE | 36 | HideSolutionNode = FALSE |
diff --git a/ogs/ServerConsole/Properties/AssemblyInfo.cs b/OGS/ServerConsole/Properties/AssemblyInfo.cs index 0028e2a..0028e2a 100644 --- a/ogs/ServerConsole/Properties/AssemblyInfo.cs +++ b/OGS/ServerConsole/Properties/AssemblyInfo.cs | |||
diff --git a/ogs/ServerConsole/ServerConsole.cs b/OGS/ServerConsole/ServerConsole.cs index d50a7e2..d50a7e2 100644 --- a/ogs/ServerConsole/ServerConsole.cs +++ b/OGS/ServerConsole/ServerConsole.cs | |||
diff --git a/ogs/ServerConsole/ServerConsole.csproj b/OGS/ServerConsole/ServerConsole.csproj index 7f3005e..d23ca52 100644 --- a/ogs/ServerConsole/ServerConsole.csproj +++ b/OGS/ServerConsole/ServerConsole.csproj | |||
@@ -9,8 +9,6 @@ | |||
9 | <AppDesignerFolder>Properties</AppDesignerFolder> | 9 | <AppDesignerFolder>Properties</AppDesignerFolder> |
10 | <RootNamespace>ServerConsole</RootNamespace> | 10 | <RootNamespace>ServerConsole</RootNamespace> |
11 | <AssemblyName>ServerConsole</AssemblyName> | 11 | <AssemblyName>ServerConsole</AssemblyName> |
12 | <StartupObject> | ||
13 | </StartupObject> | ||
14 | </PropertyGroup> | 12 | </PropertyGroup> |
15 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | 13 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
16 | <DebugSymbols>true</DebugSymbols> | 14 | <DebugSymbols>true</DebugSymbols> |
@@ -39,11 +37,4 @@ | |||
39 | <Compile Include="ServerConsole.cs" /> | 37 | <Compile Include="ServerConsole.cs" /> |
40 | </ItemGroup> | 38 | </ItemGroup> |
41 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | 39 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
42 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
43 | Other similar extension points exist, see Microsoft.Common.targets. | ||
44 | <Target Name="BeforeBuild"> | ||
45 | </Target> | ||
46 | <Target Name="AfterBuild"> | ||
47 | </Target> | ||
48 | --> | ||
49 | </Project> \ No newline at end of file | 40 | </Project> \ No newline at end of file |
diff --git a/ogs/ServerConsole/default.build b/OGS/ServerConsole/default.build index 64a4f04..64a4f04 100644 --- a/ogs/ServerConsole/default.build +++ b/OGS/ServerConsole/default.build | |||
diff --git a/ogs/common/VersionInfo/VersionInfo.cs b/OGS/common/VersionInfo/VersionInfo.cs index 9763e62..9763e62 100644 --- a/ogs/common/VersionInfo/VersionInfo.cs +++ b/OGS/common/VersionInfo/VersionInfo.cs | |||
diff --git a/ogs/common/bin/libsecondlife.dll b/OGS/common/bin/libsecondlife.dll index 89d692a..89d692a 100755..100644 --- a/ogs/common/bin/libsecondlife.dll +++ b/OGS/common/bin/libsecondlife.dll | |||
Binary files differ | |||
diff --git a/ogs/common/src/OGS-Console.cs b/OGS/common/src/OGS-Console.cs index c35c75c..c35c75c 100644 --- a/ogs/common/src/OGS-Console.cs +++ b/OGS/common/src/OGS-Console.cs | |||
diff --git a/ogs/common/src/VersionInfo.cs.template b/OGS/common/src/VersionInfo.cs.template index 8f73b4b..8f73b4b 100644 --- a/ogs/common/src/VersionInfo.cs.template +++ b/OGS/common/src/VersionInfo.cs.template | |||
diff --git a/ogs/gridserver/default.build b/OGS/gridserver/default.build index b113b83..b113b83 100644 --- a/ogs/gridserver/default.build +++ b/OGS/gridserver/default.build | |||
diff --git a/ogs/gridserver/src/ConsoleCmds.cs b/OGS/gridserver/src/ConsoleCmds.cs index 82a2279..82a2279 100644 --- a/ogs/gridserver/src/ConsoleCmds.cs +++ b/OGS/gridserver/src/ConsoleCmds.cs | |||
diff --git a/ogs/gridserver/src/GridHttp.cs b/OGS/gridserver/src/GridHttp.cs index 833a8ac..496a3bc 100644 --- a/ogs/gridserver/src/GridHttp.cs +++ b/OGS/gridserver/src/GridHttp.cs | |||
@@ -38,6 +38,7 @@ using System.Collections; | |||
38 | using System.Collections.Generic; | 38 | using System.Collections.Generic; |
39 | using libsecondlife; | 39 | using libsecondlife; |
40 | using ServerConsole; | 40 | using ServerConsole; |
41 | using OpenSim.Framework.Sims; | ||
41 | 42 | ||
42 | namespace OpenGridServices | 43 | namespace OpenGridServices |
43 | { | 44 | { |
@@ -73,7 +74,7 @@ namespace OpenGridServices | |||
73 | switch(request.MethodName) { | 74 | switch(request.MethodName) { |
74 | case "get_sim_info": | 75 | case "get_sim_info": |
75 | ulong req_handle=(ulong)Convert.ToInt64(requestData["region_handle"]); | 76 | ulong req_handle=(ulong)Convert.ToInt64(requestData["region_handle"]); |
76 | SimProfile TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle(req_handle); | 77 | SimProfileBase TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle(req_handle); |
77 | string RecvKey=""; | 78 | string RecvKey=""; |
78 | string caller=(string)requestData["caller"]; | 79 | string caller=(string)requestData["caller"]; |
79 | switch(caller) { | 80 | switch(caller) { |
diff --git a/ogs/gridserver/src/Main.cs b/OGS/gridserver/src/Main.cs index d29a1ae..d29a1ae 100644 --- a/ogs/gridserver/src/Main.cs +++ b/OGS/gridserver/src/Main.cs | |||
diff --git a/ogs/gridserver/src/OGS-GridServer.csproj b/OGS/gridserver/src/OGS-GridServer.csproj index d984e9a..b957d40 100644 --- a/ogs/gridserver/src/OGS-GridServer.csproj +++ b/OGS/gridserver/src/OGS-GridServer.csproj | |||
@@ -40,9 +40,6 @@ | |||
40 | <Compile Include="..\..\common\src\OGS-Console.cs"> | 40 | <Compile Include="..\..\common\src\OGS-Console.cs"> |
41 | <Link>OGS-Console.cs</Link> | 41 | <Link>OGS-Console.cs</Link> |
42 | </Compile> | 42 | </Compile> |
43 | <Compile Include="..\..\common\src\Util.cs"> | ||
44 | <Link>Util.cs</Link> | ||
45 | </Compile> | ||
46 | <Compile Include="..\..\common\VersionInfo\VersionInfo.cs"> | 43 | <Compile Include="..\..\common\VersionInfo\VersionInfo.cs"> |
47 | <Link>VersionInfo.cs</Link> | 44 | <Link>VersionInfo.cs</Link> |
48 | </Compile> | 45 | </Compile> |
@@ -53,17 +50,14 @@ | |||
53 | <Compile Include="SimProfiles.cs" /> | 50 | <Compile Include="SimProfiles.cs" /> |
54 | </ItemGroup> | 51 | </ItemGroup> |
55 | <ItemGroup> | 52 | <ItemGroup> |
53 | <ProjectReference Include="..\..\..\OpenSim.FrameWork\OpenSim.Framework.csproj"> | ||
54 | <Project>{2E46A825-3168-492F-93BC-637126B5B72B}</Project> | ||
55 | <Name>OpenSim.Framework</Name> | ||
56 | </ProjectReference> | ||
56 | <ProjectReference Include="..\..\ServerConsole\ServerConsole.csproj"> | 57 | <ProjectReference Include="..\..\ServerConsole\ServerConsole.csproj"> |
57 | <Project>{7667E6E2-F227-41A2-B1B2-315613E1BAFC}</Project> | 58 | <Project>{7667E6E2-F227-41A2-B1B2-315613E1BAFC}</Project> |
58 | <Name>ServerConsole</Name> | 59 | <Name>ServerConsole</Name> |
59 | </ProjectReference> | 60 | </ProjectReference> |
60 | </ItemGroup> | 61 | </ItemGroup> |
61 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | 62 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
62 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
63 | Other similar extension points exist, see Microsoft.Common.targets. | ||
64 | <Target Name="BeforeBuild"> | ||
65 | </Target> | ||
66 | <Target Name="AfterBuild"> | ||
67 | </Target> | ||
68 | --> | ||
69 | </Project> \ No newline at end of file | 63 | </Project> \ No newline at end of file |
diff --git a/ogs/gridserver/src/Properties/AssemblyInfo.cs b/OGS/gridserver/src/Properties/AssemblyInfo.cs index 8471e6b..8471e6b 100644 --- a/ogs/gridserver/src/Properties/AssemblyInfo.cs +++ b/OGS/gridserver/src/Properties/AssemblyInfo.cs | |||
diff --git a/ogs/gridserver/src/SimProfiles.cs b/OGS/gridserver/src/SimProfiles.cs index 91a92ea..6db8331 100644 --- a/ogs/gridserver/src/SimProfiles.cs +++ b/OGS/gridserver/src/SimProfiles.cs | |||
@@ -33,6 +33,8 @@ using System.Collections; | |||
33 | using System.Collections.Generic; | 33 | using System.Collections.Generic; |
34 | using libsecondlife; | 34 | using libsecondlife; |
35 | using ServerConsole; | 35 | using ServerConsole; |
36 | using OpenSim.Framework.Utilities; | ||
37 | using OpenSim.Framework.Sims; | ||
36 | 38 | ||
37 | namespace OpenGridServices | 39 | namespace OpenGridServices |
38 | { | 40 | { |
@@ -40,7 +42,7 @@ namespace OpenGridServices | |||
40 | /// </summary> | 42 | /// </summary> |
41 | public class SimProfileManager { | 43 | public class SimProfileManager { |
42 | 44 | ||
43 | public Dictionary<LLUUID, SimProfile> SimProfiles = new Dictionary<LLUUID, SimProfile>(); | 45 | public Dictionary<LLUUID, SimProfileBase> SimProfiles = new Dictionary<LLUUID, SimProfileBase>(); |
44 | 46 | ||
45 | public SimProfileManager() { | 47 | public SimProfileManager() { |
46 | } | 48 | } |
@@ -49,19 +51,19 @@ namespace OpenGridServices | |||
49 | // TODO: need to load from database | 51 | // TODO: need to load from database |
50 | } | 52 | } |
51 | 53 | ||
52 | public SimProfile GetProfileByHandle(ulong reqhandle) { | 54 | public SimProfileBase GetProfileByHandle(ulong reqhandle) { |
53 | foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys) { | 55 | foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys) { |
54 | if(SimProfiles[UUID].regionhandle==reqhandle) return SimProfiles[UUID]; | 56 | if(SimProfiles[UUID].regionhandle==reqhandle) return SimProfiles[UUID]; |
55 | } | 57 | } |
56 | return null; | 58 | return null; |
57 | } | 59 | } |
58 | 60 | ||
59 | public SimProfile GetProfileByLLUUID(LLUUID ProfileLLUUID) { | 61 | public SimProfileBase GetProfileByLLUUID(LLUUID ProfileLLUUID) { |
60 | return SimProfiles[ProfileLLUUID]; | 62 | return SimProfiles[ProfileLLUUID]; |
61 | } | 63 | } |
62 | 64 | ||
63 | public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey) { | 65 | public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey) { |
64 | SimProfile TheSim=GetProfileByHandle(regionhandle); | 66 | SimProfileBase TheSim=GetProfileByHandle(regionhandle); |
65 | if(TheSim != null) | 67 | if(TheSim != null) |
66 | if(TheSim.recvkey==simrecvkey) { | 68 | if(TheSim.recvkey==simrecvkey) { |
67 | return true; | 69 | return true; |
@@ -71,8 +73,8 @@ namespace OpenGridServices | |||
71 | 73 | ||
72 | } | 74 | } |
73 | 75 | ||
74 | public SimProfile CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) { | 76 | public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) { |
75 | SimProfile newprofile = new SimProfile(); | 77 | SimProfileBase newprofile = new SimProfileBase(); |
76 | newprofile.regionname=regionname; | 78 | newprofile.regionname=regionname; |
77 | newprofile.sim_ip=sim_ip; | 79 | newprofile.sim_ip=sim_ip; |
78 | newprofile.sim_port=sim_port; | 80 | newprofile.sim_port=sim_port; |
@@ -89,7 +91,8 @@ namespace OpenGridServices | |||
89 | 91 | ||
90 | } | 92 | } |
91 | 93 | ||
92 | public class SimProfile { | 94 | /* is in OpenSim.Framework |
95 | public class SimProfileBase { | ||
93 | public LLUUID UUID; | 96 | public LLUUID UUID; |
94 | public ulong regionhandle; | 97 | public ulong regionhandle; |
95 | public string regionname; | 98 | public string regionname; |
@@ -102,10 +105,10 @@ namespace OpenGridServices | |||
102 | public string recvkey; | 105 | public string recvkey; |
103 | 106 | ||
104 | 107 | ||
105 | public SimProfile() { | 108 | public SimProfileBase() { |
106 | } | 109 | } |
107 | 110 | ||
108 | 111 | ||
109 | } | 112 | }*/ |
110 | 113 | ||
111 | } | 114 | } |
diff --git a/ogs/userserver/src/ConsoleCmds.cs b/OGS/userserver/src/ConsoleCmds.cs index f2568fc..f2568fc 100644 --- a/ogs/userserver/src/ConsoleCmds.cs +++ b/OGS/userserver/src/ConsoleCmds.cs | |||
diff --git a/ogs/userserver/src/Main.cs b/OGS/userserver/src/Main.cs index 40ef916..7e5308e 100644 --- a/ogs/userserver/src/Main.cs +++ b/OGS/userserver/src/Main.cs | |||
@@ -33,6 +33,9 @@ using System.Collections.Generic; | |||
33 | using System.Text; | 33 | using System.Text; |
34 | using libsecondlife; | 34 | using libsecondlife; |
35 | using ServerConsole; | 35 | using ServerConsole; |
36 | using OpenSim.Framework.User; | ||
37 | using OpenSim.Framework.Sims; | ||
38 | using OpenSim.Framework.Inventory; | ||
36 | 39 | ||
37 | namespace OpenGridServices | 40 | namespace OpenGridServices |
38 | { | 41 | { |
@@ -73,16 +76,17 @@ namespace OpenGridServices | |||
73 | public void Startup() { | 76 | public void Startup() { |
74 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Please press enter to retain default settings"); | 77 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Please press enter to retain default settings"); |
75 | 78 | ||
76 | this.GridURL=ServerConsole.MainConsole.Instance.CmdPrompt("Grid URL: "); | 79 | this.GridURL=ServerConsole.MainConsole.Instance.CmdPrompt("Grid URL: "); |
77 | this.GridSendKey=ServerConsole.MainConsole.Instance.CmdPrompt("Key to send to grid: "); | 80 | this.GridSendKey=ServerConsole.MainConsole.Instance.CmdPrompt("Key to send to grid: "); |
78 | this.GridRecvKey=ServerConsole.MainConsole.Instance.CmdPrompt("Key to expect from grid: "); | 81 | this.GridRecvKey=ServerConsole.MainConsole.Instance.CmdPrompt("Key to expect from grid: "); |
79 | 82 | ||
80 | this.DefaultStartupMsg=ServerConsole.MainConsole.Instance.CmdPrompt("Default startup message for clients [Welcome to OGS!] :","Welcome to OGS!"); | 83 | this.DefaultStartupMsg=ServerConsole.MainConsole.Instance.CmdPrompt("Default startup message for clients [Welcome to OGS!] :","Welcome to OGS!"); |
81 | 84 | ||
82 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager"); | 85 | ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager"); |
83 | _profilemanager = new UserProfileManager(); | 86 | _profilemanager = new UserProfileManager(); |
84 | _profilemanager.InitUserProfiles(); | 87 | _profilemanager.InitUserProfiles(); |
85 | 88 | _profilemanager.SetKeys(GridSendKey, GridRecvKey, GridURL, DefaultStartupMsg); | |
89 | |||
86 | 90 | ||
87 | string tempfirstname; | 91 | string tempfirstname; |
88 | string templastname; | 92 | string templastname; |
diff --git a/ogs/userserver/src/OGS-UserServer.csproj b/OGS/userserver/src/OGS-UserServer.csproj index f6737c8..f4fa8b6 100644 --- a/ogs/userserver/src/OGS-UserServer.csproj +++ b/OGS/userserver/src/OGS-UserServer.csproj | |||
@@ -48,21 +48,16 @@ | |||
48 | <Compile Include="Main.cs" /> | 48 | <Compile Include="Main.cs" /> |
49 | <Compile Include="Properties\AssemblyInfo.cs" /> | 49 | <Compile Include="Properties\AssemblyInfo.cs" /> |
50 | <Compile Include="UserHttp.cs" /> | 50 | <Compile Include="UserHttp.cs" /> |
51 | <Compile Include="UserProfiles.cs" /> | ||
52 | <Compile Include="Util.cs" /> | ||
53 | </ItemGroup> | 51 | </ItemGroup> |
54 | <ItemGroup> | 52 | <ItemGroup> |
53 | <ProjectReference Include="..\..\..\OpenSim.FrameWork\OpenSim.Framework.csproj"> | ||
54 | <Project>{2E46A825-3168-492F-93BC-637126B5B72B}</Project> | ||
55 | <Name>OpenSim.Framework</Name> | ||
56 | </ProjectReference> | ||
55 | <ProjectReference Include="..\..\ServerConsole\ServerConsole.csproj"> | 57 | <ProjectReference Include="..\..\ServerConsole\ServerConsole.csproj"> |
56 | <Project>{7667E6E2-F227-41A2-B1B2-315613E1BAFC}</Project> | 58 | <Project>{7667E6E2-F227-41A2-B1B2-315613E1BAFC}</Project> |
57 | <Name>ServerConsole</Name> | 59 | <Name>ServerConsole</Name> |
58 | </ProjectReference> | 60 | </ProjectReference> |
59 | </ItemGroup> | 61 | </ItemGroup> |
60 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | 62 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
61 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
62 | Other similar extension points exist, see Microsoft.Common.targets. | ||
63 | <Target Name="BeforeBuild"> | ||
64 | </Target> | ||
65 | <Target Name="AfterBuild"> | ||
66 | </Target> | ||
67 | --> | ||
68 | </Project> \ No newline at end of file | 63 | </Project> \ No newline at end of file |
diff --git a/ogs/userserver/src/OGS-UserServer.csproj.user b/OGS/userserver/src/OGS-UserServer.csproj.user index 9c0b2d9..aa75a3d 100644 --- a/ogs/userserver/src/OGS-UserServer.csproj.user +++ b/OGS/userserver/src/OGS-UserServer.csproj.user | |||
@@ -1,14 +1,6 @@ | |||
1 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <PublishUrlHistory>publish\</PublishUrlHistory> | 3 | <PublishUrlHistory>publish\</PublishUrlHistory> |
4 | <InstallUrlHistory> | ||
5 | </InstallUrlHistory> | ||
6 | <SupportUrlHistory> | ||
7 | </SupportUrlHistory> | ||
8 | <UpdateUrlHistory> | ||
9 | </UpdateUrlHistory> | ||
10 | <BootstrapperUrlHistory> | ||
11 | </BootstrapperUrlHistory> | ||
12 | <ApplicationRevision>0</ApplicationRevision> | 4 | <ApplicationRevision>0</ApplicationRevision> |
13 | <FallbackCulture>en-US</FallbackCulture> | 5 | <FallbackCulture>en-US</FallbackCulture> |
14 | <VerifyUploadedFiles>false</VerifyUploadedFiles> | 6 | <VerifyUploadedFiles>false</VerifyUploadedFiles> |
diff --git a/ogs/userserver/src/Properties/AssemblyInfo.cs b/OGS/userserver/src/Properties/AssemblyInfo.cs index 5d5ce8d..5d5ce8d 100644 --- a/ogs/userserver/src/Properties/AssemblyInfo.cs +++ b/OGS/userserver/src/Properties/AssemblyInfo.cs | |||
diff --git a/ogs/assetserver/assets/00000000000000005005000000000005/data b/ogs/assetserver/assets/00000000000000005005000000000005/data deleted file mode 100644 index e6840e2..0000000 --- a/ogs/assetserver/assets/00000000000000005005000000000005/data +++ /dev/null | |||
Binary files differ | |||
diff --git a/ogs/assetserver/assets/00000000000000007007000000000006/data b/ogs/assetserver/assets/00000000000000007007000000000006/data deleted file mode 100644 index 5ad1fd0..0000000 --- a/ogs/assetserver/assets/00000000000000007007000000000006/data +++ /dev/null | |||
Binary files differ | |||
diff --git a/ogs/assetserver/assets/00000000000000007009000000000008/data b/ogs/assetserver/assets/00000000000000007009000000000008/data deleted file mode 100644 index cd2fd94..0000000 --- a/ogs/assetserver/assets/00000000000000007009000000000008/data +++ /dev/null | |||
Binary files differ | |||
diff --git a/ogs/assetserver/assets/66c41e3938f9f75a024e585989bfab73/data b/ogs/assetserver/assets/66c41e3938f9f75a024e585989bfab73/data deleted file mode 100644 index 920c775..0000000 --- a/ogs/assetserver/assets/66c41e3938f9f75a024e585989bfab73/data +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | LLWearable version 22 | ||
2 | Female Shape and Outfit 3 Shape | ||
3 | Created by system from avatar's appearance. | ||
4 | permissions 0 | ||
5 | { | ||
6 | base_mask 00082000 | ||
7 | owner_mask 00082000 | ||
8 | group_mask 00082000 | ||
9 | everyone_mask 00082000 | ||
10 | next_owner_mask 00082000 | ||
11 | creator_id 3d924400-038e-6ad9-920b-cfbb9b40585c | ||
12 | owner_id 542ffb8e-8932-49b9-8664-58f53e442797 | ||
13 | last_owner_id 3d924400-038e-6ad9-920b-cfbb9b40585c | ||
14 | group_id 00000000-0000-0000-0000-000000000000 | ||
15 | } | ||
16 | sale_info 0 | ||
17 | { | ||
18 | sale_type not | ||
19 | sale_price 0 | ||
20 | } | ||
21 | type 0 | ||
22 | parameters 82 | ||
23 | 1 .21 | ||
24 | 2 -.5 | ||
25 | 4 -.11 | ||
26 | 5 -.1 | ||
27 | 6 -.3 | ||
28 | 7 -.4 | ||
29 | 8 -.5 | ||
30 | 10 .7 | ||
31 | 11 .34 | ||
32 | 12 -.5 | ||
33 | 13 0 | ||
34 | 14 .04 | ||
35 | 15 .58 | ||
36 | 17 .56 | ||
37 | 18 -.26 | ||
38 | 19 -.73 | ||
39 | 20 -.34 | ||
40 | 21 -.01 | ||
41 | 22 1 | ||
42 | 23 -.5 | ||
43 | 24 -.63 | ||
44 | 25 .44 | ||
45 | 27 .05 | ||
46 | 33 -.24 | ||
47 | 34 -.7 | ||
48 | 35 -.16 | ||
49 | 36 -.2 | ||
50 | 37 -.98 | ||
51 | 38 -.5 | ||
52 | 80 0 | ||
53 | 105 .07 | ||
54 | 155 -.22 | ||
55 | 157 0 | ||
56 | 185 -1 | ||
57 | 193 .86 | ||
58 | 196 -.74 | ||
59 | 505 .65 | ||
60 | 506 .12 | ||
61 | 507 -1.5 | ||
62 | 515 0 | ||
63 | 517 .16 | ||
64 | 518 .8 | ||
65 | 629 0 | ||
66 | 637 0 | ||
67 | 646 .4 | ||
68 | 647 1 | ||
69 | 649 .36 | ||
70 | 650 .85 | ||
71 | 652 .49 | ||
72 | 653 -1 | ||
73 | 656 0 | ||
74 | 659 .65 | ||
75 | 662 .5 | ||
76 | 663 0 | ||
77 | 664 0 | ||
78 | 665 0 | ||
79 | 675 -.15 | ||
80 | 676 .26 | ||
81 | 678 .28 | ||
82 | 682 .27 | ||
83 | 683 -.19 | ||
84 | 684 -.09 | ||
85 | 685 0 | ||
86 | 690 .45 | ||
87 | 692 .4 | ||
88 | 693 -0 | ||
89 | 753 -.5 | ||
90 | 756 -.08 | ||
91 | 758 .24 | ||
92 | 759 .6 | ||
93 | 760 .11 | ||
94 | 764 -.38 | ||
95 | 765 -.3 | ||
96 | 769 .42 | ||
97 | 773 .51 | ||
98 | 795 .16 | ||
99 | 796 .11 | ||
100 | 799 .36 | ||
101 | 841 0 | ||
102 | 842 -.82 | ||
103 | 879 0 | ||
104 | 880 0 | ||
105 | textures 0 | ||
diff --git a/ogs/assetserver/assets/e0ee49b5a4184df8d3c9a65361fe7f49/data b/ogs/assetserver/assets/e0ee49b5a4184df8d3c9a65361fe7f49/data deleted file mode 100644 index 95cc683..0000000 --- a/ogs/assetserver/assets/e0ee49b5a4184df8d3c9a65361fe7f49/data +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | LLWearable version 22 | ||
2 | Sexy - Female Skin | ||
3 | |||
4 | permissions 0 | ||
5 | { | ||
6 | base_mask 00086000 | ||
7 | owner_mask 00086000 | ||
8 | group_mask 00000000 | ||
9 | everyone_mask 00000000 | ||
10 | next_owner_mask 00086000 | ||
11 | creator_id 3b659a92-dbf0-4301-8fdc-208d78f00d77 | ||
12 | owner_id 3d924400-038e-6ad9-920b-cfbb9b40585c | ||
13 | last_owner_id 101358d5-469d-4b24-9b85-4dc3c05e635d | ||
14 | group_id 00000000-0000-0000-0000-000000000000 | ||
15 | } | ||
16 | sale_info 0 | ||
17 | { | ||
18 | sale_type not | ||
19 | sale_price 10 | ||
20 | } | ||
21 | type 1 | ||
22 | parameters 26 | ||
23 | 108 0 | ||
24 | 110 0 | ||
25 | 111 0 | ||
26 | 116 0 | ||
27 | 117 1 | ||
28 | 150 0 | ||
29 | 162 0 | ||
30 | 163 0 | ||
31 | 165 0 | ||
32 | 700 .01 | ||
33 | 701 .5 | ||
34 | 702 .26 | ||
35 | 703 0 | ||
36 | 704 0 | ||
37 | 705 .5 | ||
38 | 706 .6 | ||
39 | 707 0 | ||
40 | 708 0 | ||
41 | 709 0 | ||
42 | 710 0 | ||
43 | 711 .5 | ||
44 | 712 0 | ||
45 | 713 .7 | ||
46 | 714 0 | ||
47 | 715 0 | ||
48 | 775 0 | ||
49 | textures 3 | ||
50 | 0 f9261672-5058-9ef8-c0c4-48f43a0b16d4 | ||
51 | 5 b6ba53be-b5bf-9a1f-2e19-21daf998429c | ||
52 | 6 703f6e24-a1fb-1980-acaf-6ab8a99a5bd5 | ||
diff --git a/ogs/common/src/Util.cs b/ogs/common/src/Util.cs deleted file mode 100644 index 1efa471..0000000 --- a/ogs/common/src/Util.cs +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | /* | ||
2 | Copyright (c) OpenSim project, http://osgrid.org/ | ||
3 | |||
4 | * Copyright (c) <year>, <copyright holder> | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions are met: | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * * Redistributions in binary form must reproduce the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer in the | ||
13 | * documentation and/or other materials provided with the distribution. | ||
14 | * * Neither the name of the <organization> nor the | ||
15 | * names of its contributors may be used to endorse or promote products | ||
16 | * derived from this software without specific prior written permission. | ||
17 | * | ||
18 | * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY | ||
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
21 | * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY | ||
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | using System; | ||
31 | using System.Collections.Generic; | ||
32 | using System.Threading; | ||
33 | using libsecondlife; | ||
34 | using libsecondlife.Packets; | ||
35 | |||
36 | namespace OpenGridServices | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// </summary> | ||
40 | /// | ||
41 | public class Util | ||
42 | { | ||
43 | public static ulong UIntsToLong(uint X, uint Y) | ||
44 | { | ||
45 | return Helpers.UIntsToLong(X,Y); | ||
46 | } | ||
47 | public Util() | ||
48 | { | ||
49 | |||
50 | } | ||
51 | } | ||
52 | |||
53 | public class QueItem { | ||
54 | public QueItem() | ||
55 | { | ||
56 | } | ||
57 | |||
58 | public Packet Packet; | ||
59 | public bool Incoming; | ||
60 | } | ||
61 | |||
62 | |||
63 | public class BlockingQueue< T > { | ||
64 | private Queue< T > _queue = new Queue< T >(); | ||
65 | private object _queueSync = new object(); | ||
66 | |||
67 | public void Enqueue(T value) | ||
68 | { | ||
69 | lock(_queueSync) | ||
70 | { | ||
71 | _queue.Enqueue(value); | ||
72 | Monitor.Pulse(_queueSync); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | public T Dequeue() | ||
77 | { | ||
78 | lock(_queueSync) | ||
79 | { | ||
80 | if( _queue.Count < 1) | ||
81 | Monitor.Wait(_queueSync); | ||
82 | |||
83 | return _queue.Dequeue(); | ||
84 | } | ||
85 | } | ||
86 | } | ||
87 | } | ||
diff --git a/ogs/genvers.sh b/ogs/genvers.sh deleted file mode 100644 index 8d8007c..0000000 --- a/ogs/genvers.sh +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | MAJOR=0 | ||
4 | MINOR=1 | ||
5 | BUILD=`date +%s` | ||
6 | REVISION=`svnversion . | sed s/:// | sed s/M//` | ||
7 | REALREVISION=`svnversion` | ||
8 | cat common/src/VersionInfo.cs.template | sed s/@@VERSION/"$MAJOR.$MINOR, Build $BUILD, Revision $REALREVISION"/g >common/src/VersionInfo.cs | ||
9 | echo -n $MAJOR.$MINOR.*.$REVISION >VERSION | ||
diff --git a/ogs/ogs.build b/ogs/ogs.build deleted file mode 100644 index 303b1bf..0000000 --- a/ogs/ogs.build +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <project name="OGS" default="build" basedir="."> | ||
3 | <description>nant buildfile for OpenSim</description> | ||
4 | <property name="debug" value="true" overwrite="false" /> | ||
5 | <target name="clean" description="remove all generated files"> | ||
6 | <nant target="clean"> | ||
7 | <buildfiles> | ||
8 | <include name="ServerConsole/default.build" /> | ||
9 | <include name="gridserver/default.build" /> | ||
10 | </buildfiles> | ||
11 | </nant> | ||
12 | |||
13 | </target> | ||
14 | |||
15 | <target name="svnupdate" description="updates to latest SVN"> | ||
16 | <exec program="svn"> | ||
17 | <arg value="update" /> | ||
18 | </exec> | ||
19 | </target> | ||
20 | |||
21 | <target name="upgrade" description="updates from SVN and then builds" depends="clean,svnupdate,build"> | ||
22 | |||
23 | </target> | ||
24 | |||
25 | <target name="build" description="compiles the source code"> | ||
26 | |||
27 | <exec program="genvers.sh" /> | ||
28 | <loadfile file="VERSION" property="svnver"/> | ||
29 | |||
30 | <nant> | ||
31 | <buildfiles> | ||
32 | <include name="ServerConsole/default.build" /> | ||
33 | <include name="gridserver/default.build" /> | ||
34 | </buildfiles> | ||
35 | </nant> | ||
36 | |||
37 | </target> | ||
38 | </project> | ||
diff --git a/ogs/userserver/default.build b/ogs/userserver/default.build deleted file mode 100644 index a56f925..0000000 --- a/ogs/userserver/default.build +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <project name="UserServer" default="build" basedir="./"> | ||
3 | <property name="debug" value="true" overwrite="false" /> | ||
4 | <target name="clean" description="remove all generated files"> | ||
5 | <delete> | ||
6 | <fileset failonempty="false"> | ||
7 | <include name="bin/*.dll" /> | ||
8 | <include name="bin/*.exe" /> | ||
9 | <include name="bin/*.mdb" /> | ||
10 | </fileset> | ||
11 | </delete> | ||
12 | </target> | ||
13 | |||
14 | <target name="svnupdate" description="updates to latest SVN"> | ||
15 | <exec program="svn"> | ||
16 | <arg value="update" /> | ||
17 | </exec> | ||
18 | </target> | ||
19 | |||
20 | <target name="upgrade" description="updates from SVN and then builds" depends="clean,svnupdate,build"> | ||
21 | |||
22 | </target> | ||
23 | |||
24 | <target name="build" description="compiles the source code"> | ||
25 | |||
26 | <loadfile file="../VERSION" property="svnver"/> | ||
27 | <asminfo output="src/AssemblyInfo.cs" language="CSharp"> | ||
28 | <imports> | ||
29 | <import namespace="System" /> | ||
30 | <import namespace="System.Reflection" /> | ||
31 | <import namespace="System.Runtime.InteropServices" /> | ||
32 | </imports> | ||
33 | <attributes> | ||
34 | <attribute type="ComVisibleAttribute" value="false" /> | ||
35 | <attribute type="CLSCompliantAttribute" value="false" /> | ||
36 | <attribute type="AssemblyVersionAttribute" value="${svnver}" /> | ||
37 | <attribute type="AssemblyTitleAttribute" value="ogs-UserServer" /> | ||
38 | <attribute type="AssemblyDescriptionAttribute" value="The core OGS User Server" /> | ||
39 | <attribute type="AssemblyCopyrightAttribute" value="Copyright © OGS development team 2007"/> | ||
40 | </attributes> | ||
41 | </asminfo> | ||
42 | |||
43 | <csc target="exe" output="bin/UserServer.exe" debug="${debug}" verbose="true" warninglevel="4"> | ||
44 | <references failonempty="true"> | ||
45 | <include name="System" /> | ||
46 | <include name="System.Xml" /> | ||
47 | <include name="../common/bin/ServerConsole.dll" /> | ||
48 | <include name="../common/bin/libsecondlife.dll" /> | ||
49 | </references> | ||
50 | <sources> | ||
51 | <include name="../common/src/VersionInfo.cs" /> | ||
52 | <include name="../common/src/OGS-Console.cs" /> | ||
53 | <include name="src/*.cs" /> | ||
54 | </sources> | ||
55 | </csc> | ||
56 | |||
57 | <copy todir="bin/"> | ||
58 | <fileset basedir="../common/bin"> | ||
59 | <include name="*.*" /> | ||
60 | </fileset> | ||
61 | </copy> | ||
62 | </target> | ||
63 | </project> | ||
diff --git a/ogs/userserver/src/UserHttp.cs b/ogs/userserver/src/UserHttp.cs deleted file mode 100644 index bc232fb..0000000 --- a/ogs/userserver/src/UserHttp.cs +++ /dev/null | |||
@@ -1,287 +0,0 @@ | |||
1 | /* | ||
2 | Copyright (c) OpenGrid project, http://osgrid.org/ | ||
3 | |||
4 | |||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions are met: | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * * Redistributions in binary form must reproduce the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer in the | ||
13 | * documentation and/or other materials provided with the distribution. | ||
14 | * * Neither the name of the <organization> nor the | ||
15 | * names of its contributors may be used to endorse or promote products | ||
16 | * derived from this software without specific prior written permission. | ||
17 | * | ||
18 | * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY | ||
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
21 | * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY | ||
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | using System; | ||
31 | using System.Text; | ||
32 | using Nwc.XmlRpc; | ||
33 | using System.Threading; | ||
34 | using System.Text.RegularExpressions; | ||
35 | using System.Net; | ||
36 | using System.IO; | ||
37 | using System.Collections; | ||
38 | using System.Collections.Generic; | ||
39 | using libsecondlife; | ||
40 | using ServerConsole; | ||
41 | |||
42 | namespace OpenGridServices | ||
43 | { | ||
44 | public class UserHTTPServer { | ||
45 | public Thread HTTPD; | ||
46 | public HttpListener Listener; | ||
47 | |||
48 | public UserHTTPServer() { | ||
49 | ServerConsole.MainConsole.Instance.WriteLine("Starting up HTTP Server"); | ||
50 | HTTPD = new Thread(new ThreadStart(StartHTTP)); | ||
51 | HTTPD.Start(); | ||
52 | } | ||
53 | |||
54 | public void StartHTTP() { | ||
55 | ServerConsole.MainConsole.Instance.WriteLine("UserHttp.cs:StartHTTP() - Spawned main thread OK"); | ||
56 | Listener = new HttpListener(); | ||
57 | |||
58 | Listener.Prefixes.Add("http://+:8002/userserver/"); | ||
59 | Listener.Prefixes.Add("http://+:8002/usersessions/"); | ||
60 | Listener.Start(); | ||
61 | |||
62 | HttpListenerContext context; | ||
63 | while(true) { | ||
64 | context = Listener.GetContext(); | ||
65 | ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context); | ||
66 | } | ||
67 | } | ||
68 | |||
69 | static string ParseXMLRPC(string requestBody) { | ||
70 | XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody); | ||
71 | |||
72 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
73 | switch(request.MethodName) { | ||
74 | case "login_to_simulator": | ||
75 | bool GoodXML= (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); | ||
76 | bool GoodLogin=false; | ||
77 | string firstname=""; | ||
78 | string lastname=""; | ||
79 | string passwd=""; | ||
80 | |||
81 | if(GoodXML) { | ||
82 | firstname=(string)requestData["first"]; | ||
83 | lastname=(string)requestData["last"]; | ||
84 | passwd=(string)requestData["passwd"]; | ||
85 | GoodLogin=OpenUser_Main.userserver._profilemanager.AuthenticateUser(firstname,lastname,passwd); | ||
86 | } | ||
87 | |||
88 | |||
89 | if(!(GoodXML && GoodLogin)) { | ||
90 | XmlRpcResponse LoginErrorResp = new XmlRpcResponse(); | ||
91 | Hashtable ErrorRespData = new Hashtable(); | ||
92 | ErrorRespData["reason"]="key"; | ||
93 | ErrorRespData["message"]="Error connecting to grid. Please double check your login details and check with the grid owner if you are sure these are correct"; | ||
94 | ErrorRespData["login"]="false"; | ||
95 | LoginErrorResp.Value=ErrorRespData; | ||
96 | return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(LoginErrorResp)," encoding=\"utf-16\"","" )); | ||
97 | } | ||
98 | |||
99 | UserProfile TheUser=OpenUser_Main.userserver._profilemanager.GetProfileByName(firstname,lastname); | ||
100 | |||
101 | if(!((TheUser.CurrentSessionID==null) && (TheUser.CurrentSecureSessionID==null))) { | ||
102 | XmlRpcResponse PresenceErrorResp = new XmlRpcResponse(); | ||
103 | Hashtable PresenceErrorRespData = new Hashtable(); | ||
104 | PresenceErrorRespData["reason"]="presence"; | ||
105 | PresenceErrorRespData["message"]="You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner"; | ||
106 | PresenceErrorRespData["login"]="false"; | ||
107 | PresenceErrorResp.Value=PresenceErrorRespData; | ||
108 | return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(PresenceErrorResp)," encoding=\"utf-16\"","" )); | ||
109 | |||
110 | } | ||
111 | |||
112 | try { | ||
113 | LLUUID AgentID = TheUser.UUID; | ||
114 | TheUser.InitSessionData(); | ||
115 | SimProfile SimInfo = new SimProfile(); | ||
116 | SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle,OpenUser_Main.userserver.GridURL,OpenUser_Main.userserver.GridSendKey,OpenUser_Main.userserver.GridRecvKey); | ||
117 | |||
118 | XmlRpcResponse LoginGoodResp = new XmlRpcResponse(); | ||
119 | Hashtable LoginGoodData = new Hashtable(); | ||
120 | |||
121 | Hashtable GlobalT = new Hashtable(); | ||
122 | GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271"; | ||
123 | GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; | ||
124 | GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; | ||
125 | ArrayList GlobalTextures = new ArrayList(); | ||
126 | GlobalTextures.Add(GlobalT); | ||
127 | |||
128 | Hashtable LoginFlagsHash = new Hashtable(); | ||
129 | LoginFlagsHash["daylight_savings"]="N"; | ||
130 | LoginFlagsHash["stipend_since_login"]="N"; | ||
131 | LoginFlagsHash["gendered"]="Y"; | ||
132 | LoginFlagsHash["ever_logged_in"]="Y"; | ||
133 | ArrayList LoginFlags=new ArrayList(); | ||
134 | LoginFlags.Add(LoginFlagsHash); | ||
135 | |||
136 | Hashtable uiconfig = new Hashtable(); | ||
137 | uiconfig["allow_first_life"]="Y"; | ||
138 | ArrayList ui_config=new ArrayList(); | ||
139 | ui_config.Add(uiconfig); | ||
140 | |||
141 | Hashtable ClassifiedCategoriesHash = new Hashtable(); | ||
142 | ClassifiedCategoriesHash["category_name"]="bla bla"; | ||
143 | ClassifiedCategoriesHash["category_id"]=(Int32)1; | ||
144 | ArrayList ClassifiedCategories = new ArrayList(); | ||
145 | ClassifiedCategories.Add(ClassifiedCategoriesHash); | ||
146 | |||
147 | ArrayList AgentInventory = new ArrayList(); | ||
148 | foreach(InventoryFolder InvFolder in TheUser.InventoryFolders.Values) { | ||
149 | Hashtable TempHash = new Hashtable(); | ||
150 | TempHash["name"]=InvFolder.FolderName; | ||
151 | TempHash["parent_id"]=InvFolder.ParentID.ToStringHyphenated(); | ||
152 | TempHash["version"]=(Int32)InvFolder.Version; | ||
153 | TempHash["type_default"]=(Int32)InvFolder.DefaultType; | ||
154 | TempHash["folder_id"]=InvFolder.FolderID.ToStringHyphenated(); | ||
155 | AgentInventory.Add(TempHash); | ||
156 | } | ||
157 | |||
158 | Hashtable InventoryRootHash = new Hashtable(); | ||
159 | InventoryRootHash["folder_id"]=TheUser.InventoryRoot.FolderID.ToStringHyphenated(); | ||
160 | ArrayList InventoryRoot = new ArrayList(); | ||
161 | InventoryRoot.Add(InventoryRootHash); | ||
162 | |||
163 | Hashtable InitialOutfitHash = new Hashtable(); | ||
164 | InitialOutfitHash["folder_name"]="Nightclub Female"; | ||
165 | InitialOutfitHash["gender"]="female"; | ||
166 | ArrayList InitialOutfit = new ArrayList(); | ||
167 | InitialOutfit.Add(InitialOutfitHash); | ||
168 | |||
169 | uint circode = (uint)(new Random()).Next(); | ||
170 | TheUser.AddSimCircuit(circode, SimInfo.UUID); | ||
171 | |||
172 | LoginGoodData["last_name"]="\"" + TheUser.firstname + "\""; | ||
173 | LoginGoodData["ui-config"]=ui_config; | ||
174 | LoginGoodData["sim_ip"]=SimInfo.sim_ip.ToString(); | ||
175 | LoginGoodData["login-flags"]=LoginFlags; | ||
176 | LoginGoodData["global-textures"]=GlobalTextures; | ||
177 | LoginGoodData["classified_categories"]=ClassifiedCategories; | ||
178 | LoginGoodData["event_categories"]=new ArrayList(); | ||
179 | LoginGoodData["inventory-skeleton"]=AgentInventory; | ||
180 | LoginGoodData["inventory-skel-lib"]=new ArrayList(); | ||
181 | LoginGoodData["inventory-root"]=InventoryRoot; | ||
182 | LoginGoodData["event_notifications"]=new ArrayList(); | ||
183 | LoginGoodData["gestures"]=new ArrayList(); | ||
184 | LoginGoodData["inventory-lib-owner"]=new ArrayList(); | ||
185 | LoginGoodData["initial-outfit"]=InitialOutfit; | ||
186 | LoginGoodData["seconds_since_epoch"]=(Int32)(DateTime.UtcNow - new DateTime(1970,1,1)).TotalSeconds; | ||
187 | LoginGoodData["start_location"]="last"; | ||
188 | LoginGoodData["home"]="{'region_handle':[r" + (SimInfo.RegionLocX*256).ToString() + ",r" + (SimInfo.RegionLocY*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() + "]}"; | ||
189 | LoginGoodData["message"]=OpenUser_Main.userserver.DefaultStartupMsg; | ||
190 | LoginGoodData["first_name"]="\"" + firstname + "\""; | ||
191 | LoginGoodData["circuit_code"]=(Int32)circode; | ||
192 | LoginGoodData["sim_port"]=(Int32)SimInfo.sim_port; | ||
193 | LoginGoodData["secure_session_id"]=TheUser.CurrentSecureSessionID.ToStringHyphenated(); | ||
194 | LoginGoodData["look_at"]="\n[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]\n"; | ||
195 | LoginGoodData["agent_id"]=AgentID.ToStringHyphenated(); | ||
196 | LoginGoodData["region_y"]=(Int32)SimInfo.RegionLocY*256; | ||
197 | LoginGoodData["region_x"]=(Int32)SimInfo.RegionLocX*256; | ||
198 | LoginGoodData["seed_capability"]=null; | ||
199 | LoginGoodData["agent_access"]="M"; | ||
200 | LoginGoodData["session_id"]=TheUser.CurrentSessionID.ToStringHyphenated(); | ||
201 | LoginGoodData["login"]="true"; | ||
202 | |||
203 | LoginGoodResp.Value=LoginGoodData; | ||
204 | TheUser.SendDataToSim(SimInfo); | ||
205 | return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(LoginGoodResp),"utf-16","utf-8" )); | ||
206 | |||
207 | } catch (Exception E) { | ||
208 | Console.WriteLine(E.ToString()); | ||
209 | } | ||
210 | |||
211 | break; | ||
212 | } | ||
213 | |||
214 | return ""; | ||
215 | } | ||
216 | |||
217 | static string ParseREST(HttpListenerRequest www_req) { | ||
218 | Console.WriteLine("INCOMING REST - " + www_req.RawUrl); | ||
219 | |||
220 | char[] splitter = {'/'}; | ||
221 | string[] rest_params = www_req.RawUrl.Split(splitter); | ||
222 | string req_type = rest_params[1]; // First part of the URL is the type of request - usersessions/userprofiles/inventory/blabla | ||
223 | switch(req_type) { | ||
224 | case "usersessions": | ||
225 | LLUUID sessionid = new LLUUID(rest_params[2]); // get usersessions/sessionid | ||
226 | if(www_req.HttpMethod=="DELETE") { | ||
227 | foreach (libsecondlife.LLUUID UUID in OpenUser_Main.userserver._profilemanager.UserProfiles.Keys) { | ||
228 | if(OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSessionID==sessionid) { | ||
229 | OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSessionID=null; | ||
230 | OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSecureSessionID=null; | ||
231 | OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].Circuits.Clear(); | ||
232 | } | ||
233 | } | ||
234 | |||
235 | } | ||
236 | return "OK"; | ||
237 | break; | ||
238 | } | ||
239 | |||
240 | return ""; | ||
241 | } | ||
242 | |||
243 | |||
244 | static void HandleRequest(Object stateinfo) { | ||
245 | HttpListenerContext context=(HttpListenerContext)stateinfo; | ||
246 | |||
247 | HttpListenerRequest request = context.Request; | ||
248 | HttpListenerResponse response = context.Response; | ||
249 | |||
250 | response.KeepAlive=false; | ||
251 | response.SendChunked=false; | ||
252 | |||
253 | System.IO.Stream body = request.InputStream; | ||
254 | System.Text.Encoding encoding = System.Text.Encoding.UTF8; | ||
255 | System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); | ||
256 | |||
257 | string requestBody = reader.ReadToEnd(); | ||
258 | body.Close(); | ||
259 | reader.Close(); | ||
260 | |||
261 | string responseString=""; | ||
262 | switch(request.ContentType) { | ||
263 | case "text/xml": | ||
264 | // must be XML-RPC, so pass to the XML-RPC parser | ||
265 | |||
266 | responseString=ParseXMLRPC(requestBody); | ||
267 | response.AddHeader("Content-type","text/xml"); | ||
268 | break; | ||
269 | |||
270 | case "text/plaintext": | ||
271 | responseString=ParseREST(request); | ||
272 | response.AddHeader("Content-type","text/plaintext"); | ||
273 | break; | ||
274 | } | ||
275 | |||
276 | |||
277 | byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); | ||
278 | System.IO.Stream output = response.OutputStream; | ||
279 | response.SendChunked=false; | ||
280 | response.ContentLength64=buffer.Length; | ||
281 | output.Write(buffer,0,buffer.Length); | ||
282 | output.Close(); | ||
283 | } | ||
284 | } | ||
285 | |||
286 | |||
287 | } | ||
diff --git a/ogs/userserver/src/UserProfiles.cs b/ogs/userserver/src/UserProfiles.cs deleted file mode 100644 index 4586ab3..0000000 --- a/ogs/userserver/src/UserProfiles.cs +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | /* | ||
2 | Copyright (c) OpenGrid project, http://osgrid.org/ | ||
3 | |||
4 | |||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions are met: | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * * Redistributions in binary form must reproduce the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer in the | ||
13 | * documentation and/or other materials provided with the distribution. | ||
14 | * * Neither the name of the <organization> nor the | ||
15 | * names of its contributors may be used to endorse or promote products | ||
16 | * derived from this software without specific prior written permission. | ||
17 | * | ||
18 | * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY | ||
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
21 | * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY | ||
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | using System; | ||
31 | using System.Text; | ||
32 | using System.Collections; | ||
33 | using System.Collections.Generic; | ||
34 | using libsecondlife; | ||
35 | using Nwc.XmlRpc; | ||
36 | using ServerConsole; | ||
37 | |||
38 | namespace OpenGridServices | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// </summary> | ||
42 | public class UserProfileManager { | ||
43 | |||
44 | public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>(); | ||
45 | |||
46 | public UserProfileManager() { | ||
47 | } | ||
48 | |||
49 | public void InitUserProfiles() { | ||
50 | // TODO: need to load from database | ||
51 | } | ||
52 | |||
53 | public UserProfile GetProfileByName(string firstname, string lastname) { | ||
54 | foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys) { | ||
55 | if((UserProfiles[UUID].firstname==firstname) && (UserProfiles[UUID].lastname==lastname)) return UserProfiles[UUID]; | ||
56 | } | ||
57 | return null; | ||
58 | } | ||
59 | |||
60 | public UserProfile GetProfileByLLUUID(LLUUID ProfileLLUUID) { | ||
61 | return UserProfiles[ProfileLLUUID]; | ||
62 | } | ||
63 | |||
64 | public bool AuthenticateUser(string firstname, string lastname, string passwd) { | ||
65 | UserProfile TheUser=GetProfileByName(firstname, lastname); | ||
66 | if(TheUser != null) | ||
67 | if(TheUser.MD5passwd==passwd) { | ||
68 | return true; | ||
69 | } else { | ||
70 | return false; | ||
71 | } else return false; | ||
72 | |||
73 | } | ||
74 | |||
75 | public void SetGod(LLUUID GodID) { | ||
76 | this.UserProfiles[GodID].IsGridGod=true; | ||
77 | } | ||
78 | |||
79 | public UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd) { | ||
80 | UserProfile newprofile = new UserProfile(); | ||
81 | newprofile.homeregionhandle=Util.UIntsToLong((997*256), (996*256)); | ||
82 | newprofile.firstname=firstname; | ||
83 | newprofile.lastname=lastname; | ||
84 | newprofile.MD5passwd=MD5passwd; | ||
85 | newprofile.UUID=LLUUID.Random(); | ||
86 | this.UserProfiles.Add(newprofile.UUID,newprofile); | ||
87 | return newprofile; | ||
88 | } | ||
89 | |||
90 | } | ||
91 | |||
92 | public class UserProfile { | ||
93 | |||
94 | public string firstname; | ||
95 | public string lastname; | ||
96 | public ulong homeregionhandle; | ||
97 | public LLVector3 homepos; | ||
98 | public LLVector3 homelookat; | ||
99 | |||
100 | public bool IsGridGod=false; | ||
101 | public bool IsLocal=true; // will be used in future for visitors from foreign grids | ||
102 | public string AssetURL; | ||
103 | public string MD5passwd; | ||
104 | |||
105 | public LLUUID CurrentSessionID; | ||
106 | public LLUUID CurrentSecureSessionID; | ||
107 | public LLUUID UUID; | ||
108 | public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes | ||
109 | |||
110 | public InventoryFolder InventoryRoot; | ||
111 | public Dictionary<LLUUID, InventoryFolder> InventoryFolders; | ||
112 | public Dictionary<LLUUID, InventoryItem> InventoryItems; | ||
113 | |||
114 | public UserProfile() { | ||
115 | Circuits = new Dictionary<LLUUID, uint>(); | ||
116 | InventoryFolders = new Dictionary<LLUUID, InventoryFolder>(); | ||
117 | InventoryItems = new Dictionary<LLUUID, InventoryItem>(); | ||
118 | InventoryRoot=new InventoryFolder(); | ||
119 | InventoryRoot.FolderID = LLUUID.Random(); | ||
120 | InventoryRoot.ParentID=new LLUUID(); | ||
121 | InventoryRoot.Version=1; | ||
122 | InventoryRoot.DefaultType=8; | ||
123 | InventoryRoot.FolderName="My Inventory"; | ||
124 | InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot); | ||
125 | homeregionhandle=Util.UIntsToLong((997*256), (996*256));; | ||
126 | } | ||
127 | |||
128 | public void InitSessionData() { | ||
129 | CurrentSessionID=LLUUID.Random(); | ||
130 | CurrentSecureSessionID=LLUUID.Random(); | ||
131 | } | ||
132 | |||
133 | public void AddSimCircuit(uint circuit_code, LLUUID region_UUID) { | ||
134 | if(this.Circuits.ContainsKey(region_UUID)== false) | ||
135 | this.Circuits.Add(region_UUID, circuit_code); | ||
136 | } | ||
137 | |||
138 | public void SendDataToSim(SimProfile TheSim) { | ||
139 | Console.WriteLine(TheSim.caps_url); | ||
140 | Hashtable SimParams = new Hashtable(); | ||
141 | SimParams["session_id"]=this.CurrentSessionID.ToString(); | ||
142 | SimParams["secure_session_id"]=this.CurrentSecureSessionID.ToString(); | ||
143 | SimParams["firstname"]=this.firstname; | ||
144 | SimParams["lastname"]=this.lastname; | ||
145 | SimParams["agent_id"]=this.UUID.ToString(); | ||
146 | SimParams["circuit_code"]=(Int32)this.Circuits[TheSim.UUID]; | ||
147 | ArrayList SendParams = new ArrayList(); | ||
148 | SendParams.Add(SimParams); | ||
149 | |||
150 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user",SendParams); | ||
151 | XmlRpcResponse GridResp = GridReq.Send(TheSim.caps_url,3000); | ||
152 | } | ||
153 | } | ||
154 | |||
155 | public class InventoryFolder { | ||
156 | public LLUUID FolderID; | ||
157 | public LLUUID ParentID; | ||
158 | public string FolderName; | ||
159 | public ushort DefaultType; | ||
160 | public ushort Version; | ||
161 | } | ||
162 | |||
163 | public class InventoryItem { //TODO: Fixup this and add full permissions etc | ||
164 | public LLUUID FolderID; | ||
165 | public LLUUID OwnerID; | ||
166 | public LLUUID ItemID; | ||
167 | public LLUUID AssetID; | ||
168 | public LLUUID CreatorID = LLUUID.Zero; | ||
169 | public sbyte InvType; | ||
170 | public sbyte Type; | ||
171 | public string Name; | ||
172 | public string Description; | ||
173 | } | ||
174 | |||
175 | public class SimProfile { | ||
176 | public LLUUID UUID; | ||
177 | public ulong regionhandle; | ||
178 | public string regionname; | ||
179 | public string sim_ip; | ||
180 | public uint sim_port; | ||
181 | public string caps_url; | ||
182 | public uint RegionLocX; | ||
183 | public uint RegionLocY; | ||
184 | public string sendkey; | ||
185 | public string recvkey; | ||
186 | |||
187 | |||
188 | public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey) { | ||
189 | try { | ||
190 | Hashtable GridReqParams = new Hashtable(); | ||
191 | GridReqParams["region_handle"]=region_handle.ToString(); | ||
192 | GridReqParams["caller"]="userserver"; | ||
193 | GridReqParams["authkey"]=SendKey; | ||
194 | ArrayList SendParams = new ArrayList(); | ||
195 | SendParams.Add(GridReqParams); | ||
196 | XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info",SendParams); | ||
197 | |||
198 | XmlRpcResponse GridResp = GridReq.Send(GridURL,3000); | ||
199 | |||
200 | Hashtable RespData=(Hashtable)GridResp.Value; | ||
201 | this.UUID = new LLUUID((string)RespData["UUID"]); | ||
202 | this.regionhandle = (ulong)Convert.ToUInt64(RespData["regionhandle"]); | ||
203 | this.regionname=(string)RespData["regionname"]; | ||
204 | this.sim_ip=(string)RespData["sim_ip"]; | ||
205 | this.sim_port=(uint)Convert.ToUInt16(RespData["sim_port"]); | ||
206 | this.caps_url=(string)RespData["caps_url"]; | ||
207 | this.RegionLocX=(uint)Convert.ToUInt32(RespData["RegionLocX"]); | ||
208 | this.RegionLocY=(uint)Convert.ToUInt32(RespData["RegionLocY"]); | ||
209 | this.sendkey=(string)RespData["sendkey"]; | ||
210 | this.recvkey=(string)RespData["recvkey"]; | ||
211 | } catch(Exception e) { | ||
212 | Console.WriteLine(e.ToString()); | ||
213 | } | ||
214 | return this; | ||
215 | } | ||
216 | |||
217 | public SimProfile() { | ||
218 | } | ||
219 | |||
220 | |||
221 | } | ||
222 | |||
223 | } | ||
diff --git a/ogs/userserver/src/Util.cs b/ogs/userserver/src/Util.cs deleted file mode 100644 index 1efa471..0000000 --- a/ogs/userserver/src/Util.cs +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | /* | ||
2 | Copyright (c) OpenSim project, http://osgrid.org/ | ||
3 | |||
4 | * Copyright (c) <year>, <copyright holder> | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions are met: | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * * Redistributions in binary form must reproduce the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer in the | ||
13 | * documentation and/or other materials provided with the distribution. | ||
14 | * * Neither the name of the <organization> nor the | ||
15 | * names of its contributors may be used to endorse or promote products | ||
16 | * derived from this software without specific prior written permission. | ||
17 | * | ||
18 | * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY | ||
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
21 | * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY | ||
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | using System; | ||
31 | using System.Collections.Generic; | ||
32 | using System.Threading; | ||
33 | using libsecondlife; | ||
34 | using libsecondlife.Packets; | ||
35 | |||
36 | namespace OpenGridServices | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// </summary> | ||
40 | /// | ||
41 | public class Util | ||
42 | { | ||
43 | public static ulong UIntsToLong(uint X, uint Y) | ||
44 | { | ||
45 | return Helpers.UIntsToLong(X,Y); | ||
46 | } | ||
47 | public Util() | ||
48 | { | ||
49 | |||
50 | } | ||
51 | } | ||
52 | |||
53 | public class QueItem { | ||
54 | public QueItem() | ||
55 | { | ||
56 | } | ||
57 | |||
58 | public Packet Packet; | ||
59 | public bool Incoming; | ||
60 | } | ||
61 | |||
62 | |||
63 | public class BlockingQueue< T > { | ||
64 | private Queue< T > _queue = new Queue< T >(); | ||
65 | private object _queueSync = new object(); | ||
66 | |||
67 | public void Enqueue(T value) | ||
68 | { | ||
69 | lock(_queueSync) | ||
70 | { | ||
71 | _queue.Enqueue(value); | ||
72 | Monitor.Pulse(_queueSync); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | public T Dequeue() | ||
77 | { | ||
78 | lock(_queueSync) | ||
79 | { | ||
80 | if( _queue.Count < 1) | ||
81 | Monitor.Wait(_queueSync); | ||
82 | |||
83 | return _queue.Dequeue(); | ||
84 | } | ||
85 | } | ||
86 | } | ||
87 | } | ||