mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* Upgraded LLStandaloneLoginModule, LLProxyLoginModule and LLClientStackModule to new
region modules. This was needed because the stand alone and grid modules weren't deleting old scenes, which caused an issue when deleting and recreating a region with same name on same x,y coordinates. Tested it on standalone and issue is fixed. Requires prebuild to be run again. Fixes Mantis #3699
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -48,7 +48,7 @@ namespace OpenSim.Client.Linden
|
||||
/// <summary>
|
||||
/// Handles login user (expect user) and logoff user messages from the remote LL login server
|
||||
/// </summary>
|
||||
public class LLProxyLoginModule : IRegionModule
|
||||
public class LLProxyLoginModule : ISharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -74,18 +74,21 @@ namespace OpenSim.Client.Linden
|
||||
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig startupConfig = source.Configs["Startup"];
|
||||
if (startupConfig != null)
|
||||
{
|
||||
m_enabled = startupConfig.GetBoolean("gridmode", false);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_firstScene == null)
|
||||
{
|
||||
m_firstScene = scene;
|
||||
|
||||
IConfig startupConfig = source.Configs["Startup"];
|
||||
if (startupConfig != null)
|
||||
{
|
||||
m_enabled = startupConfig.GetBoolean("gridmode", false);
|
||||
}
|
||||
|
||||
if (m_enabled)
|
||||
{
|
||||
AddHttpHandlers();
|
||||
@@ -96,6 +99,15 @@ namespace OpenSim.Client.Linden
|
||||
{
|
||||
AddScene(scene);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
RemoveScene(scene);
|
||||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
@@ -108,6 +120,11 @@ namespace OpenSim.Client.Linden
|
||||
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "LLProxyLoginModule"; }
|
||||
@@ -140,6 +157,17 @@ namespace OpenSim.Client.Linden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void RemoveScene(Scene scene)
|
||||
{
|
||||
lock (m_scenes)
|
||||
{
|
||||
if (m_scenes.Contains(scene))
|
||||
{
|
||||
m_scenes.Remove(scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Received from the user server when a user starts logging in. This call allows
|
||||
/// the region to prepare for direct communication from the client. Sends back an empty
|
||||
@@ -200,7 +228,7 @@ namespace OpenSim.Client.Linden
|
||||
{
|
||||
bool success = false;
|
||||
string denyMess = "";
|
||||
|
||||
|
||||
Scene scene;
|
||||
if (TryGetRegion(regionHandle, out scene))
|
||||
{
|
||||
@@ -226,7 +254,7 @@ namespace OpenSim.Client.Linden
|
||||
agentData.firstname, agentData.lastname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user