From d7121a422a334f20e96d09251cf7382164b590db Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 22 Jun 2007 22:21:08 +0000 Subject: Started work on CAPS support, now we have our first test capability, MapLayer requests are handled by CAPS. --- .../IInterRegionCommunications.cs | 2 +- Common/OpenGrid.Framework.UserManager/LoginResponse.cs | 13 +------------ Common/OpenSim.Servers/BaseHttpServer.cs | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 15 deletions(-) (limited to 'Common') diff --git a/Common/OpenGrid.Framework.Communications/IInterRegionCommunications.cs b/Common/OpenGrid.Framework.Communications/IInterRegionCommunications.cs index 27e6fc7..4cb8a38 100644 --- a/Common/OpenGrid.Framework.Communications/IInterRegionCommunications.cs +++ b/Common/OpenGrid.Framework.Communications/IInterRegionCommunications.cs @@ -35,7 +35,7 @@ namespace OpenGrid.Framework.Communications { public interface IInterRegionCommunications { - bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData); + bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position); } } diff --git a/Common/OpenGrid.Framework.UserManager/LoginResponse.cs b/Common/OpenGrid.Framework.UserManager/LoginResponse.cs index 1c51aeb..514ebef 100644 --- a/Common/OpenGrid.Framework.UserManager/LoginResponse.cs +++ b/Common/OpenGrid.Framework.UserManager/LoginResponse.cs @@ -40,8 +40,6 @@ namespace OpenGrid.Framework.UserManagement private LLUUID agentID; private LLUUID sessionID; private LLUUID secureSessionID; - private LLUUID baseFolderID; - private LLUUID inventoryFolderID; // Login Flags private string dst; @@ -107,8 +105,6 @@ namespace OpenGrid.Framework.UserManagement public void SetDefaultValues() { - try - { this.DST = "N"; this.StipendSinceLogin = "N"; this.Gendered = "Y"; @@ -153,14 +149,7 @@ namespace OpenGrid.Framework.UserManagement InitialOutfitHash["folder_name"] = "Nightclub Female"; InitialOutfitHash["gender"] = "female"; this.initialOutfit.Add(InitialOutfitHash); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainLog.Instance.WriteLine( - OpenSim.Framework.Console.LogPriority.LOW, - "LoginResponse: Unable to set default values: " + e.Message - ); - } + } // SetDefaultValues diff --git a/Common/OpenSim.Servers/BaseHttpServer.cs b/Common/OpenSim.Servers/BaseHttpServer.cs index 3daec8d..71c36a7 100644 --- a/Common/OpenSim.Servers/BaseHttpServer.cs +++ b/Common/OpenSim.Servers/BaseHttpServer.cs @@ -66,6 +66,7 @@ namespace OpenSim.Servers protected Dictionary m_restHandlers = new Dictionary(); protected Dictionary m_rpcHandlers = new Dictionary(); protected int m_port; + protected bool firstcaps = true; public BaseHttpServer(int port) { @@ -74,6 +75,7 @@ namespace OpenSim.Servers public bool AddRestHandler(string method, string path, RestMethod handler) { + Console.WriteLine("adding new REST handler for path " + path); string methodKey = String.Format("{0}: {1}", method, path); if (!this.m_restHandlers.ContainsKey(methodKey)) @@ -158,7 +160,14 @@ namespace OpenSim.Servers protected virtual string ParseLLSDXML(string requestBody) { // dummy function for now - IMPLEMENT ME! - return ""; + Console.WriteLine("LLSD request "+requestBody); + string resp = ""; + if (firstcaps) + { + resp = "MapLayerhttp://127.0.0.1:9000/CAPS/"; + firstcaps = false; + } + return resp; } protected virtual string ParseXMLRPC(string requestBody) @@ -204,6 +213,7 @@ namespace OpenSim.Servers //Console.WriteLine(requestBody); string responseString = ""; + Console.WriteLine("new request " + request.ContentType); switch (request.ContentType) { case "text/xml": @@ -217,7 +227,9 @@ namespace OpenSim.Servers case "application/xml": // probably LLSD we hope, otherwise it should be ignored by the parser - responseString = ParseLLSDXML(requestBody); + // responseString = ParseLLSDXML(requestBody); + Console.WriteLine(" request " + request.HttpMethod + " to " + request.RawUrl); + responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); response.AddHeader("Content-type", "application/xml"); break; -- cgit v1.1