From b83efd49475782d7ce65136e7e72f418299cdca6 Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 20 Mar 2007 09:04:49 +0000 Subject: Load XML for neighbourinfo from grid --- src/Config/SimConfig/AssemblyInfo.cs | 2 +- src/GridInterfaces/AssemblyInfo.cs | 2 +- src/GridInterfaces/IGridServer.cs | 6 ++-- src/LocalServers/LocalGridServers/AssemblyInfo.cs | 2 +- src/LocalServers/LocalGridServers/LocalGrid.cs | 2 +- src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs | 2 +- src/OpenSim.Framework/AssemblyInfo.cs | 2 +- .../RemoteGridServers/AssemblyInfo.cs | 2 +- src/RemoteServers/RemoteGridServers/RemoteGrid.cs | 35 ++++++++++++++++++---- src/ServerConsole/ServerConsole/AssemblyInfo.cs | 2 +- src/VersionInfo.cs | 2 +- src/physics/AssemblyInfo.cs | 2 +- src/physics/plugins/AssemblyInfo.cs | 2 +- 13 files changed, 43 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/Config/SimConfig/AssemblyInfo.cs b/src/Config/SimConfig/AssemblyInfo.cs index c97d673..7fabd63 100644 --- a/src/Config/SimConfig/AssemblyInfo.cs +++ b/src/Config/SimConfig/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-simconfig")] [assembly: AssemblyDescriptionAttribute("The default configuration handler")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/GridInterfaces/AssemblyInfo.cs b/src/GridInterfaces/AssemblyInfo.cs index 186934a..32f1380 100644 --- a/src/GridInterfaces/AssemblyInfo.cs +++ b/src/GridInterfaces/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-gridinterfaces")] [assembly: AssemblyDescriptionAttribute("Definitions for OGS interface")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/GridInterfaces/IGridServer.cs b/src/GridInterfaces/IGridServer.cs index 8ab0971..dcb8ef2 100644 --- a/src/GridInterfaces/IGridServer.cs +++ b/src/GridInterfaces/IGridServer.cs @@ -47,7 +47,7 @@ namespace OpenSim.GridServers public interface IGridServer { UUIDBlock RequestUUIDBlock(); - neighbourinfo[] RequestNeighbours(); //should return a array of neighbouring regions + neighbourinfo[] RequestNeighbours(ulong regionhandle); //should return a array of neighbouring regions AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); string GetName(); @@ -63,7 +63,7 @@ namespace OpenSim.GridServers } public abstract UUIDBlock RequestUUIDBlock(); - public abstract neighbourinfo[] RequestNeighbours(); + public abstract neighbourinfo[] RequestNeighbours(ulong regionhandle); public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); public abstract string GetName(); @@ -74,7 +74,7 @@ namespace OpenSim.GridServers public abstract class LocalGridBase : IGridServer { public abstract UUIDBlock RequestUUIDBlock(); - public abstract neighbourinfo[] RequestNeighbours(); + public abstract neighbourinfo[] RequestNeighbours(ulong regionhandle); public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); public abstract string GetName(); diff --git a/src/LocalServers/LocalGridServers/AssemblyInfo.cs b/src/LocalServers/LocalGridServers/AssemblyInfo.cs index 6dbf063..4b17ba2 100644 --- a/src/LocalServers/LocalGridServers/AssemblyInfo.cs +++ b/src/LocalServers/LocalGridServers/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-localservers")] [assembly: AssemblyDescriptionAttribute("local grid servers")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/LocalServers/LocalGridServers/LocalGrid.cs b/src/LocalServers/LocalGridServers/LocalGrid.cs index abea888..bd377d3 100644 --- a/src/LocalServers/LocalGridServers/LocalGrid.cs +++ b/src/LocalServers/LocalGridServers/LocalGrid.cs @@ -160,7 +160,7 @@ namespace LocalGridServers return(uuidBlock); } - public override neighbourinfo[] RequestNeighbours() + public override neighbourinfo[] RequestNeighbours(ulong regionhandle) { return new neighbourinfo[8]; } diff --git a/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs b/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs index b6afd99..0c5ff75 100644 --- a/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs +++ b/src/LocalStorage/Db4LocalStorage/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-localstorage")] [assembly: AssemblyDescriptionAttribute("The local storage handler")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/OpenSim.Framework/AssemblyInfo.cs b/src/OpenSim.Framework/AssemblyInfo.cs index 186934a..32f1380 100644 --- a/src/OpenSim.Framework/AssemblyInfo.cs +++ b/src/OpenSim.Framework/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-gridinterfaces")] [assembly: AssemblyDescriptionAttribute("Definitions for OGS interface")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs b/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs index b662c4e..7d3f314 100644 --- a/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs +++ b/src/RemoteServers/RemoteGridServers/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-remoteservers")] [assembly: AssemblyDescriptionAttribute("Connects to remote OGS installation")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs index 4f5d3a9..adb3d0f 100644 --- a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs +++ b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs @@ -25,11 +25,13 @@ * */ using System; +using System.Collections; using System.Collections.Generic; using System.Threading; using System.Net; using System.Net.Sockets; using System.IO; +using System.Xml; using libsecondlife; using OpenSim.GridServers; @@ -116,7 +118,7 @@ namespace RemoteGridServers public override bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) { - WebRequest DeleteSession = WebRequest.Create(GridServerUrl + "/usersessions/" + sessionID.ToString()); + WebRequest DeleteSession = WebRequest.Create(UserServerUrl + "/usersessions/" + sessionID.ToString()); DeleteSession.Method="DELETE"; DeleteSession.ContentType="text/plaintext"; DeleteSession.ContentLength=0; @@ -137,16 +139,37 @@ namespace RemoteGridServers return(uuidBlock); } - public override neighbourinfo[] RequestNeighbours() + public override neighbourinfo[] RequestNeighbours(ulong regionhandle) { - neighbourinfo[] neighbours= new neighbourinfo[8]; - return neighbours; + ArrayList neighbourlist = new ArrayList(); + + WebRequest FindNeighbours = WebRequest.Create(GridServerUrl + "/regions/" + regionhandle.ToString() + "/neighbours"); + FindNeighbours.ContentType="text/plaintext"; + FindNeighbours.ContentLength=0; + + StreamWriter stOut = new StreamWriter (FindNeighbours.GetRequestStream(), System.Text.Encoding.ASCII); + stOut.Write(""); + stOut.Close(); + + + XmlDocument GridRespXml = new XmlDocument(); + GridRespXml.Load(FindNeighbours.GetResponse().GetResponseStream()); + + + XmlNode NeighboursRoot = GridRespXml.FirstChild; + if(NeighboursRoot.Name != "neighbours") { + return new neighbourinfo[0]; + } + + FindNeighbours.GetResponse().GetResponseStream().Close(); + + return new neighbourinfo[0]; } - public override void SetServerInfo(string UserServerUrl, string UserSendKey, string UserRecvKey, string GridServerKey, string GridSendKey, string GridRecvKey) + public override void SetServerInfo(string UserServerUrl, string UserSendKey, string UserRecvKey, string GridServerUrl, string GridSendKey, string GridRecvKey) { this.UserServerUrl = UserServerUrl; - this.UserSendKey = UserSendKey; + this.UserSendKey = UserSendKey; this.UserRecvKey = UserRecvKey; this.GridServerUrl = GridServerUrl; this.GridSendKey = GridSendKey; diff --git a/src/ServerConsole/ServerConsole/AssemblyInfo.cs b/src/ServerConsole/ServerConsole/AssemblyInfo.cs index f1c084b..e6b64d6 100644 --- a/src/ServerConsole/ServerConsole/AssemblyInfo.cs +++ b/src/ServerConsole/ServerConsole/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-serverconsole")] [assembly: AssemblyDescriptionAttribute("The default server console")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/VersionInfo.cs b/src/VersionInfo.cs index 5fc0fb0..5cfd136 100644 --- a/src/VersionInfo.cs +++ b/src/VersionInfo.cs @@ -32,6 +32,6 @@ namespace OpenSim /// public class VersionInfo { - public static string Version = "0.1, Build 1174249095, Revision 236M"; + public static string Version = "0.1, Build 1174381410, Revision 240M"; } } diff --git a/src/physics/AssemblyInfo.cs b/src/physics/AssemblyInfo.cs index 7489b7a..c6a4efa 100644 --- a/src/physics/AssemblyInfo.cs +++ b/src/physics/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-physicsmanager")] [assembly: AssemblyDescriptionAttribute("Handles physics plugins")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] diff --git a/src/physics/plugins/AssemblyInfo.cs b/src/physics/plugins/AssemblyInfo.cs index d37a5da..4cd5558 100644 --- a/src/physics/plugins/AssemblyInfo.cs +++ b/src/physics/plugins/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: ComVisibleAttribute(false)] [assembly: CLSCompliantAttribute(false)] -[assembly: AssemblyVersionAttribute("0.1.*.236")] +[assembly: AssemblyVersionAttribute("0.1.0.240")] [assembly: AssemblyTitleAttribute("opensim-physicsmanager-physx")] [assembly: AssemblyDescriptionAttribute("PhysX plugin for OpenSim")] [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] -- cgit v1.1