aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/MainServer.cs19
-rw-r--r--OpenSim/Framework/RegionInfo.cs5
2 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs
index b5f947e..7da4893 100644
--- a/OpenSim/Framework/MainServer.cs
+++ b/OpenSim/Framework/MainServer.cs
@@ -26,17 +26,36 @@
26 */ 26 */
27 27
28using OpenSim.Framework.Servers.HttpServer; 28using OpenSim.Framework.Servers.HttpServer;
29using System.Collections.Generic;
29 30
30namespace OpenSim.Framework 31namespace OpenSim.Framework
31{ 32{
32 public class MainServer 33 public class MainServer
33 { 34 {
34 private static BaseHttpServer instance; 35 private static BaseHttpServer instance;
36 private static Dictionary<uint, BaseHttpServer> m_Servers =
37 new Dictionary<uint, BaseHttpServer>();
35 38
36 public static BaseHttpServer Instance 39 public static BaseHttpServer Instance
37 { 40 {
38 get { return instance; } 41 get { return instance; }
39 set { instance = value; } 42 set { instance = value; }
40 } 43 }
44
45 public static IHttpServer GetHttpServer(uint port)
46 {
47 if (port == 0)
48 return Instance;
49 if (port == Instance.Port)
50 return Instance;
51
52 if (m_Servers.ContainsKey(port))
53 return m_Servers[port];
54
55 m_Servers[port] = new BaseHttpServer(port);
56 m_Servers[port].Start();
57
58 return m_Servers[port];
59 }
41 } 60 }
42} 61}
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index fa747c4..721233d 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -978,11 +978,12 @@ namespace OpenSim.Framework
978 978
979 public void SaveLastMapUUID(UUID mapUUID) 979 public void SaveLastMapUUID(UUID mapUUID)
980 { 980 {
981 if (null == configMember) return;
982
983 lastMapUUID = mapUUID; 981 lastMapUUID = mapUUID;
984 lastMapRefresh = Util.UnixTimeSinceEpoch().ToString(); 982 lastMapRefresh = Util.UnixTimeSinceEpoch().ToString();
985 983
984 if (configMember == null)
985 return;
986
986 configMember.forceSetConfigurationOption("lastmap_uuid", mapUUID.ToString()); 987 configMember.forceSetConfigurationOption("lastmap_uuid", mapUUID.ToString());
987 configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh); 988 configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh);
988 } 989 }