From 9bc303d2937ab2f62e146f7fdde6444ed8cb50c9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 20 Oct 2009 16:57:22 +0100 Subject: Add MainServer.GetHttpServer(port) method for using multiple listener ports in region modules --- OpenSim/Framework/MainServer.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index b5f947e..21033b3 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -26,17 +26,34 @@ */ using OpenSim.Framework.Servers.HttpServer; +using System.Collections.Generic; namespace OpenSim.Framework { public class MainServer { private static BaseHttpServer instance; + private static Dictionary m_Servers = + new Dictionary(); public static BaseHttpServer Instance { get { return instance; } set { instance = value; } } + + public IHttpServer GetHttpServer(uint port) + { + if (port == Instance.Port) + return Instance; + + if (m_Servers.ContainsKey(port)) + return m_Servers[port]; + + m_Servers[port] = new BaseHttpServer(port); + m_Servers[port].Start(); + + return m_Servers[port]; + } } } -- cgit v1.1 From 2a886fd76c9df972fa3096d19b37047f7eda672f Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 02:19:45 +0100 Subject: Really make module port selection work. Implement port setting in LLProxyLoginModule. --- OpenSim/Framework/MainServer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 21033b3..7da4893 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -42,8 +42,10 @@ namespace OpenSim.Framework set { instance = value; } } - public IHttpServer GetHttpServer(uint port) + public static IHttpServer GetHttpServer(uint port) { + if (port == 0) + return Instance; if (port == Instance.Port) return Instance; -- cgit v1.1 From 93b24b5207356cfbc37d766a01f5f2e3f3a34bae Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 03:44:40 +0100 Subject: Fix web map retrieval for regions configured via .ini --- OpenSim/Framework/RegionInfo.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index a7315f5..c566544 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -978,11 +978,12 @@ namespace OpenSim.Framework public void SaveLastMapUUID(UUID mapUUID) { - if (null == configMember) return; - lastMapUUID = mapUUID; lastMapRefresh = Util.UnixTimeSinceEpoch().ToString(); + if (configMember == null) + return; + configMember.forceSetConfigurationOption("lastmap_uuid", mapUUID.ToString()); configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh); } -- cgit v1.1