mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merged master into prioritization
This commit is contained in:
@@ -26,17 +26,36 @@
|
||||
*/
|
||||
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class MainServer
|
||||
{
|
||||
private static BaseHttpServer instance;
|
||||
private static Dictionary<uint, BaseHttpServer> m_Servers =
|
||||
new Dictionary<uint, BaseHttpServer>();
|
||||
|
||||
public static BaseHttpServer Instance
|
||||
{
|
||||
get { return instance; }
|
||||
set { instance = value; }
|
||||
}
|
||||
|
||||
public static IHttpServer GetHttpServer(uint port)
|
||||
{
|
||||
if (port == 0)
|
||||
return Instance;
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user