diff options
Diffstat (limited to 'OpenSim.GridInterfaces')
4 files changed, 116 insertions, 96 deletions
diff --git a/OpenSim.GridInterfaces/Local/LocalGridServer.cs b/OpenSim.GridInterfaces/Local/LocalGridServer.cs index d70e989..311179b 100644 --- a/OpenSim.GridInterfaces/Local/LocalGridServer.cs +++ b/OpenSim.GridInterfaces/Local/LocalGridServer.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.GridInterfaces.Local | |||
63 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Local Grid Server class created"); | 63 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Local Grid Server class created"); |
64 | } | 64 | } |
65 | 65 | ||
66 | public override bool RequestConnection() | 66 | public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) |
67 | { | 67 | { |
68 | return true; | 68 | return true; |
69 | } | 69 | } |
diff --git a/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build b/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build index 6bf398e..c7a1966 100644 --- a/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build +++ b/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build | |||
@@ -1,46 +1,46 @@ | |||
1 | <?xml version="1.0" ?> | 1 | <?xml version="1.0" ?> |
2 | <project name="OpenSim.GridInterfaces.Local" default="build"> | 2 | <project name="OpenSim.GridInterfaces.Local" 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.Local" dynamicprefix="true" > | 11 | <resources prefix="OpenSim.GridInterfaces.Local" 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="LocalAssetServer.cs" /> | 15 | <include name="LocalAssetServer.cs" /> |
16 | <include name="LocalGridServer.cs" /> | 16 | <include name="LocalGridServer.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/Db4objects.Db4o.dll" /> | 25 | <include name="../../bin/Db4objects.Db4o.dll" /> |
26 | <include name="../../bin/libsecondlife.dll" /> | 26 | <include name="../../bin/libsecondlife.dll" /> |
27 | <include name="../../bin/OpenSim.Framework.dll" /> | 27 | <include name="../../bin/OpenSim.Framework.dll" /> |
28 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | 28 | <include name="../../bin/OpenSim.Framework.Console.dll" /> |
29 | </references> | 29 | </references> |
30 | </csc> | 30 | </csc> |
31 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | 31 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> |
32 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | 32 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> |
33 | <copy todir="${project::get-base-directory()}/../../bin/"> | 33 | <copy todir="${project::get-base-directory()}/../../bin/"> |
34 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | 34 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > |
35 | <include name="*.dll"/> | 35 | <include name="*.dll"/> |
36 | <include name="*.exe"/> | 36 | <include name="*.exe"/> |
37 | </fileset> | 37 | </fileset> |
38 | </copy> | 38 | </copy> |
39 | </target> | 39 | </target> |
40 | <target name="clean"> | 40 | <target name="clean"> |
41 | <delete dir="${bin.dir}" failonerror="false" /> | 41 | <delete dir="${bin.dir}" failonerror="false" /> |
42 | <delete dir="${obj.dir}" failonerror="false" /> | 42 | <delete dir="${obj.dir}" failonerror="false" /> |
43 | </target> | 43 | </target> |
44 | <target name="doc" description="Creates documentation."> | 44 | <target name="doc" description="Creates documentation."> |
45 | </target> | 45 | </target> |
46 | </project> | 46 | </project> |
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 |