aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
diff options
context:
space:
mode:
authorgareth2007-04-03 20:39:28 +0000
committergareth2007-04-03 20:39:28 +0000
commit5e81e7ed9d8d1b5be0d5390cab10975bb3b93516 (patch)
tree674e1df234ac56ccbe92007ea04a3d6711861d65 /OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
parent* lovely. svn doesn't delete the files from disk on svn delete, so they show ... (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim.GridInterfaces/Remote/RemoteGridServer.cs28
1 files changed, 24 insertions, 4 deletions
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*/
27using System; 27using System;
28using System.Collections;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using System.Threading; 30using System.Threading;
30using System.Net; 31using System.Net;
31using System.Net.Sockets; 32using System.Net.Sockets;
32using System.IO; 33using System.IO;
33using libsecondlife; 34using libsecondlife;
35using Nwc.XmlRpc;
34using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Assets; 37using 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