From 5e81e7ed9d8d1b5be0d5390cab10975bb3b93516 Mon Sep 17 00:00:00 2001
From: gareth
Date: Tue, 3 Apr 2007 20:39:28 +0000
Subject: Finished initial sim<>Grid login (kinda) Can login but no config data
sent/updated yet
---
.../Remote/OpenSim.GridInterfaces.Remote.dll.build | 90 +++++++++++-----------
OpenSim.GridInterfaces/Remote/RemoteGridServer.cs | 28 ++++++-
2 files changed, 69 insertions(+), 49 deletions(-)
(limited to 'OpenSim.GridInterfaces/Remote')
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
*
*/
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.IO;
using libsecondlife;
+using Nwc.XmlRpc;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
@@ -54,10 +56,28 @@ namespace OpenSim.GridInterfaces.Remote
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Remote Grid Server class created");
}
- public override bool RequestConnection()
+ public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port)
{
- return true;
- }
+ Hashtable GridParams = new Hashtable();
+ GridParams["authkey"]=GridSendKey;
+ GridParams["UUID"]=SimUUID.ToString();
+ GridParams["sim_ip"]=sim_ip;
+ GridParams["sim_port"]=sim_port.ToString();
+ ArrayList SendParams = new ArrayList();
+ SendParams.Add(GridParams);
+
+ XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
+ XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000);
+ Hashtable GridRespData = (Hashtable)GridResp.Value;
+
+ if(GridRespData.ContainsKey("error")) {
+ string errorstring = (string)GridRespData["error"];
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Error connecting to grid:");
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine(errorstring);
+ return false;
+ }
+ return true;
+ }
public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode)
{
@@ -82,7 +102,7 @@ namespace OpenSim.GridInterfaces.Remote
user.LoginInfo.Agent = agentID;
user.LoginInfo.Session = sessionID;
user.LoginInfo.SecureSession = validcircuit.SecureSessionID;
- user.LoginInfo.First = validcircuit.firstname;
+ user.LoginInfo.First = validcircuit.firstname;
user.LoginInfo.Last = validcircuit.lastname;
}
else
--
cgit v1.1