From b83efd49475782d7ce65136e7e72f418299cdca6 Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 20 Mar 2007 09:04:49 +0000 Subject: [PATCH] Load XML for neighbourinfo from grid --- VERSION | 2 +- src/Config/SimConfig/AssemblyInfo.cs | 2 +- src/GridInterfaces/AssemblyInfo.cs | 2 +- src/GridInterfaces/IGridServer.cs | 6 ++-- .../LocalGridServers/AssemblyInfo.cs | 2 +- .../LocalGridServers/LocalGrid.cs | 2 +- .../Db4LocalStorage/AssemblyInfo.cs | 2 +- src/OpenSim.Framework/AssemblyInfo.cs | 2 +- .../RemoteGridServers/AssemblyInfo.cs | 2 +- .../RemoteGridServers/RemoteGrid.cs | 35 +++++++++++++++---- .../ServerConsole/AssemblyInfo.cs | 2 +- src/VersionInfo.cs | 2 +- src/physics/AssemblyInfo.cs | 2 +- src/physics/plugins/AssemblyInfo.cs | 2 +- 14 files changed, 44 insertions(+), 21 deletions(-) diff --git a/VERSION b/VERSION index 4e595e493d..153b50b664 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.*.236 \ No newline at end of file +0.1.0.240 \ No newline at end of file diff --git a/src/Config/SimConfig/AssemblyInfo.cs b/src/Config/SimConfig/AssemblyInfo.cs index c97d673cae..7fabd63b2c 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 186934a565..32f1380b05 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 8ab097125f..dcb8ef22d7 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 6dbf0633b6..4b17ba2f03 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 abea888a21..bd377d3431 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 b6afd9921a..0c5ff7559a 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 186934a565..32f1380b05 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 b662c4ede9..7d3f3141c9 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 4f5d3a99b4..adb3d0f751 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 f1c084ba73..e6b64d6f45 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 5fc0fb08ff..5cfd13635a 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 7489b7a311..c6a4efa80b 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 d37a5da79c..4cd5558a20 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")]