diff options
author | gareth | 2007-04-03 20:39:28 +0000 |
---|---|---|
committer | gareth | 2007-04-03 20:39:28 +0000 |
commit | 5e81e7ed9d8d1b5be0d5390cab10975bb3b93516 (patch) | |
tree | 674e1df234ac56ccbe92007ea04a3d6711861d65 /OpenSim.GridInterfaces/Remote | |
parent | * lovely. svn doesn't delete the files from disk on svn delete, so they show ... (diff) | |
download | opensim-SC_OLD-5e81e7ed9d8d1b5be0d5390cab10975bb3b93516.zip opensim-SC_OLD-5e81e7ed9d8d1b5be0d5390cab10975bb3b93516.tar.gz opensim-SC_OLD-5e81e7ed9d8d1b5be0d5390cab10975bb3b93516.tar.bz2 opensim-SC_OLD-5e81e7ed9d8d1b5be0d5390cab10975bb3b93516.tar.xz |
Finished initial sim<>Grid login (kinda)
Can login but no config data sent/updated yet
Diffstat (limited to 'OpenSim.GridInterfaces/Remote')
-rw-r--r-- | OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build | 90 | ||||
-rw-r--r-- | OpenSim.GridInterfaces/Remote/RemoteGridServer.cs | 28 |
2 files changed, 69 insertions, 49 deletions
diff --git a/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build b/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build index dd6db18..4788f32 100644 --- a/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build +++ b/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build | |||
@@ -1,45 +1,45 @@ | |||
1 | <?xml version="1.0" ?> | 1 | <?xml version="1.0" ?> |
2 | <project name="OpenSim.GridInterfaces.Remote" default="build"> | 2 | <project name="OpenSim.GridInterfaces.Remote" default="build"> |
3 | <target name="build"> | 3 | <target name="build"> |
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | 4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> |
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | 5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> |
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | 6 | <copy todir="${project::get-base-directory()}/${build.dir}"> |
7 | <fileset basedir="${project::get-base-directory()}"> | 7 | <fileset basedir="${project::get-base-directory()}"> |
8 | </fileset> | 8 | </fileset> |
9 | </copy> | 9 | </copy> |
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | 10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> |
11 | <resources prefix="OpenSim.GridInterfaces.Remote" dynamicprefix="true" > | 11 | <resources prefix="OpenSim.GridInterfaces.Remote" dynamicprefix="true" > |
12 | </resources> | 12 | </resources> |
13 | <sources failonempty="true"> | 13 | <sources failonempty="true"> |
14 | <include name="AssemblyInfo.cs" /> | 14 | <include name="AssemblyInfo.cs" /> |
15 | <include name="RemoteAssetServer.cs" /> | 15 | <include name="RemoteAssetServer.cs" /> |
16 | <include name="RemoteGridServer.cs" /> | 16 | <include name="RemoteGridServer.cs" /> |
17 | </sources> | 17 | </sources> |
18 | <references basedir="${project::get-base-directory()}"> | 18 | <references basedir="${project::get-base-directory()}"> |
19 | <lib> | 19 | <lib> |
20 | <include name="${project::get-base-directory()}" /> | 20 | <include name="${project::get-base-directory()}" /> |
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | 21 | <include name="${project::get-base-directory()}/${build.dir}" /> |
22 | </lib> | 22 | </lib> |
23 | <include name="System.dll" /> | 23 | <include name="System.dll" /> |
24 | <include name="System.Xml.dll" /> | 24 | <include name="System.Xml.dll" /> |
25 | <include name="../../bin/libsecondlife.dll" /> | 25 | <include name="../../bin/libsecondlife.dll" /> |
26 | <include name="../../bin/OpenSim.Framework.dll" /> | 26 | <include name="../../bin/OpenSim.Framework.dll" /> |
27 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | 27 | <include name="../../bin/OpenSim.Framework.Console.dll" /> |
28 | </references> | 28 | </references> |
29 | </csc> | 29 | </csc> |
30 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | 30 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> |
31 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | 31 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> |
32 | <copy todir="${project::get-base-directory()}/../../bin/"> | 32 | <copy todir="${project::get-base-directory()}/../../bin/"> |
33 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | 33 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > |
34 | <include name="*.dll"/> | 34 | <include name="*.dll"/> |
35 | <include name="*.exe"/> | 35 | <include name="*.exe"/> |
36 | </fileset> | 36 | </fileset> |
37 | </copy> | 37 | </copy> |
38 | </target> | 38 | </target> |
39 | <target name="clean"> | 39 | <target name="clean"> |
40 | <delete dir="${bin.dir}" failonerror="false" /> | 40 | <delete dir="${bin.dir}" failonerror="false" /> |
41 | <delete dir="${obj.dir}" failonerror="false" /> | 41 | <delete dir="${obj.dir}" failonerror="false" /> |
42 | </target> | 42 | </target> |
43 | <target name="doc" description="Creates documentation."> | 43 | <target name="doc" description="Creates documentation."> |
44 | </target> | 44 | </target> |
45 | </project> | 45 | </project> |
diff --git a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs index 5f48916..d51d212 100644 --- a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs +++ b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs | |||
@@ -25,12 +25,14 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | using System; | 27 | using System; |
28 | using System.Collections; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Threading; | 30 | using System.Threading; |
30 | using System.Net; | 31 | using System.Net; |
31 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
32 | using System.IO; | 33 | using System.IO; |
33 | using libsecondlife; | 34 | using libsecondlife; |
35 | using Nwc.XmlRpc; | ||
34 | using OpenSim.Framework.Interfaces; | 36 | using OpenSim.Framework.Interfaces; |
35 | using OpenSim.Framework.Assets; | 37 | using OpenSim.Framework.Assets; |
36 | 38 | ||
@@ -54,10 +56,28 @@ namespace OpenSim.GridInterfaces.Remote | |||
54 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Remote Grid Server class created"); | 56 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Remote Grid Server class created"); |
55 | } | 57 | } |
56 | 58 | ||
57 | public override bool RequestConnection() | 59 | public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) |
58 | { | 60 | { |
59 | return true; | 61 | Hashtable GridParams = new Hashtable(); |
60 | } | 62 | GridParams["authkey"]=GridSendKey; |
63 | GridParams["UUID"]=SimUUID.ToString(); | ||
64 | GridParams["sim_ip"]=sim_ip; | ||
65 | GridParams["sim_port"]=sim_port.ToString(); | ||
66 | ArrayList SendParams = new ArrayList(); | ||
67 | SendParams.Add(GridParams); | ||
68 | |||
69 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | ||
70 | XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000); | ||
71 | Hashtable GridRespData = (Hashtable)GridResp.Value; | ||
72 | |||
73 | if(GridRespData.ContainsKey("error")) { | ||
74 | string errorstring = (string)GridRespData["error"]; | ||
75 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Error connecting to grid:"); | ||
76 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(errorstring); | ||
77 | return false; | ||
78 | } | ||
79 | return true; | ||
80 | } | ||
61 | 81 | ||
62 | public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) | 82 | public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) |
63 | { | 83 | { |
@@ -82,7 +102,7 @@ namespace OpenSim.GridInterfaces.Remote | |||
82 | user.LoginInfo.Agent = agentID; | 102 | user.LoginInfo.Agent = agentID; |
83 | user.LoginInfo.Session = sessionID; | 103 | user.LoginInfo.Session = sessionID; |
84 | user.LoginInfo.SecureSession = validcircuit.SecureSessionID; | 104 | user.LoginInfo.SecureSession = validcircuit.SecureSessionID; |
85 | user.LoginInfo.First = validcircuit.firstname; | 105 | user.LoginInfo.First = validcircuit.firstname; |
86 | user.LoginInfo.Last = validcircuit.lastname; | 106 | user.LoginInfo.Last = validcircuit.lastname; |
87 | } | 107 | } |
88 | else | 108 | else |