* Added a configuration parameter on the Grid Server to disallow forceful banlists.
* Added a way for Grid based configuration parameters to (generally used in overriding functionality) to get to the regions on Registration.afrisby
parent
be2ad79e52
commit
8aae909412
|
@ -25,7 +25,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications
|
namespace OpenSim.Framework.Communications
|
||||||
|
@ -37,6 +37,7 @@ namespace OpenSim.Framework.Communications
|
||||||
bool DeregisterRegion(RegionInfo regionInfo);
|
bool DeregisterRegion(RegionInfo regionInfo);
|
||||||
List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
|
List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
|
||||||
RegionInfo RequestNeighbourInfo(ulong regionHandle);
|
RegionInfo RequestNeighbourInfo(ulong regionHandle);
|
||||||
|
Dictionary<string, string> GetGridSettings();
|
||||||
List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
|
List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,9 +44,12 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public string DatabaseProvider = "";
|
public string DatabaseProvider = "";
|
||||||
|
|
||||||
|
|
||||||
public static uint DefaultHttpPort = 8001;
|
public static uint DefaultHttpPort = 8001;
|
||||||
public uint HttpPort = DefaultHttpPort;
|
public uint HttpPort = DefaultHttpPort;
|
||||||
|
|
||||||
|
public string AllowForcefulBanlines = "TRUE";
|
||||||
|
|
||||||
private ConfigurationMember configMember;
|
private ConfigurationMember configMember;
|
||||||
|
|
||||||
public GridConfig(string description, string filename)
|
public GridConfig(string description, string filename)
|
||||||
|
@ -89,6 +92,9 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||||
"Http Listener port", DefaultHttpPort.ToString(), false);
|
"Http Listener port", DefaultHttpPort.ToString(), false);
|
||||||
|
|
||||||
|
configMember.addConfigurationOption("allow_forceful_banlines", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
|
"Allow Forceful Banlines", "TRUE", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
||||||
|
@ -128,6 +134,9 @@ namespace OpenSim.Framework
|
||||||
case "http_port":
|
case "http_port":
|
||||||
HttpPort = (uint) configuration_result;
|
HttpPort = (uint) configuration_result;
|
||||||
break;
|
break;
|
||||||
|
case "allow_forceful_banlines":
|
||||||
|
AllowForcefulBanlines = (string)configuration_result;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -52,6 +52,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IRegionCommsListener
|
public interface IRegionCommsListener
|
||||||
{
|
{
|
||||||
event ExpectUserDelegate OnExpectUser;
|
event ExpectUserDelegate OnExpectUser;
|
||||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Framework
|
||||||
public event CloseAgentConnection OnCloseAgentConnection;
|
public event CloseAgentConnection OnCloseAgentConnection;
|
||||||
public event RegionUp OnRegionUp;
|
public event RegionUp OnRegionUp;
|
||||||
public event ChildAgentUpdate OnChildAgentUpdate;
|
public event ChildAgentUpdate OnChildAgentUpdate;
|
||||||
|
|
||||||
|
|
||||||
public string debugRegionName="";
|
public string debugRegionName="";
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,6 +64,9 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData)
|
public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData)
|
||||||
{
|
{
|
||||||
if (OnExpectUser != null)
|
if (OnExpectUser != null)
|
||||||
|
|
|
@ -404,6 +404,8 @@ namespace OpenSim.Grid.GridServer
|
||||||
// New! If set, use as URL to local sim storage (ie http://remotehost/region.yap)
|
// New! If set, use as URL to local sim storage (ie http://remotehost/region.yap)
|
||||||
responseData["data_uri"] = TheSim.regionDataURI;
|
responseData["data_uri"] = TheSim.regionDataURI;
|
||||||
|
|
||||||
|
responseData["allow_forceful_banlines"] = config.AllowForcefulBanlines;
|
||||||
|
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ namespace OpenSim.Region.Communications.Local
|
||||||
|
|
||||||
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
||||||
|
|
||||||
|
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
||||||
|
|
||||||
public string _gdebugRegionName = "";
|
public string _gdebugRegionName = "";
|
||||||
|
|
||||||
public string gdebugRegionName
|
public string gdebugRegionName
|
||||||
|
@ -218,6 +220,26 @@ namespace OpenSim.Region.Communications.Local
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This function Is only here to keep this class in line with the Grid Interface.
|
||||||
|
// It never gets called.
|
||||||
|
public virtual Dictionary<string, string> GetGridSettings()
|
||||||
|
{
|
||||||
|
Dictionary<string,string> returnGridSettings = new Dictionary<string,string>();
|
||||||
|
lock (m_queuedGridSettings)
|
||||||
|
{
|
||||||
|
returnGridSettings = m_queuedGridSettings;
|
||||||
|
m_queuedGridSettings.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnGridSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle)
|
||||||
|
{
|
||||||
|
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public bool TriggerRegionUp(RegionInfo region, ulong regionhandle)
|
public bool TriggerRegionUp(RegionInfo region, ulong regionhandle)
|
||||||
{
|
{
|
||||||
if (m_regionListeners.ContainsKey(regionhandle))
|
if (m_regionListeners.ContainsKey(regionhandle))
|
||||||
|
|
|
@ -50,6 +50,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
||||||
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
||||||
private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
||||||
|
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
||||||
|
|
||||||
public BaseHttpServer httpListener;
|
public BaseHttpServer httpListener;
|
||||||
public NetworkServersInfo serversInfo;
|
public NetworkServersInfo serversInfo;
|
||||||
|
@ -134,7 +135,15 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
|
m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY);
|
||||||
|
if (GridRespData.ContainsKey("allow_forceful_banlines"))
|
||||||
|
{
|
||||||
|
|
||||||
|
if ((string)GridRespData["allow_forceful_banlines"] != "TRUE")
|
||||||
|
{
|
||||||
|
//m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle);
|
||||||
|
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return m_localBackend.RegisterRegion(regionInfo);
|
return m_localBackend.RegisterRegion(regionInfo);
|
||||||
|
@ -144,7 +153,23 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
public virtual Dictionary<string, string> GetGridSettings()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> returnGridSettings = new Dictionary<string, string>();
|
||||||
|
lock (m_queuedGridSettings)
|
||||||
|
{
|
||||||
|
foreach (string Dictkey in m_queuedGridSettings.Keys)
|
||||||
|
{
|
||||||
|
returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
m_queuedGridSettings.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnGridSettings;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -818,6 +818,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// These two 'commands' *must be* next to each other or sim rebooting fails.
|
// These two 'commands' *must be* next to each other or sim rebooting fails.
|
||||||
m_sceneGridService.RegisterRegion(RegionInfo);
|
m_sceneGridService.RegisterRegion(RegionInfo);
|
||||||
m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo);
|
m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo);
|
||||||
|
Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings();
|
||||||
|
if (dGridSettings.ContainsKey("allow_forceful_banlines"))
|
||||||
|
{
|
||||||
|
if (dGridSettings["allow_forceful_banlines"] != "TRUE")
|
||||||
|
MainLog.Instance.Verbose("GRID","Grid is disabling forceful parcel banlists");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1296,6 +1302,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_sceneGridService.OnRegionUp += OtherRegionUp;
|
m_sceneGridService.OnRegionUp += OtherRegionUp;
|
||||||
m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
|
m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
|
||||||
|
|
||||||
|
|
||||||
m_sceneGridService.KillObject = SendKillObject;
|
m_sceneGridService.KillObject = SendKillObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1304,6 +1311,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void UnRegisterReginWithComms()
|
public void UnRegisterReginWithComms()
|
||||||
{
|
{
|
||||||
|
|
||||||
m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
|
m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
|
||||||
m_sceneGridService.OnRegionUp -= OtherRegionUp;
|
m_sceneGridService.OnRegionUp -= OtherRegionUp;
|
||||||
m_sceneGridService.OnExpectUser -= NewUserConnection;
|
m_sceneGridService.OnExpectUser -= NewUserConnection;
|
||||||
|
@ -1312,6 +1320,19 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
m_sceneGridService.Close();
|
m_sceneGridService.Close();
|
||||||
}
|
}
|
||||||
|
public void NewIncomingGridSetting(ulong regionHandle, string key, string gvalue)
|
||||||
|
{
|
||||||
|
if (key == "allow_forceful_banlines")
|
||||||
|
{
|
||||||
|
if (gvalue == "FALSE")
|
||||||
|
{
|
||||||
|
MainLog.Instance.Verbose("INTERGRID", "Grid is disallowing forcefull banlines");
|
||||||
|
//Ming, Do stuff here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public event RegionUp OnRegionUp;
|
public event RegionUp OnRegionUp;
|
||||||
public event ChildAgentUpdate OnChildAgentUpdate;
|
public event ChildAgentUpdate OnChildAgentUpdate;
|
||||||
|
|
||||||
|
|
||||||
public KillObjectDelegate KillObject;
|
public KillObjectDelegate KillObject;
|
||||||
public string _debugRegionName = "";
|
public string _debugRegionName = "";
|
||||||
|
|
||||||
|
@ -101,6 +102,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (regionCommsHost != null)
|
if (regionCommsHost != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate;
|
regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate;
|
||||||
regionCommsHost.OnRegionUp -= newRegionUp;
|
regionCommsHost.OnRegionUp -= newRegionUp;
|
||||||
regionCommsHost.OnExpectUser -= NewUserConnection;
|
regionCommsHost.OnExpectUser -= NewUserConnection;
|
||||||
|
@ -168,6 +170,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
OnCloseAgentConnection(regionHandle, agentID);
|
OnCloseAgentConnection(regionHandle, agentID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Inform Client of Neighbours
|
#region Inform Client of Neighbours
|
||||||
|
@ -466,5 +469,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
presence.RemoveNeighbourRegion(regionHandle);
|
presence.RemoveNeighbourRegion(regionHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, string> GetGridSettings()
|
||||||
|
{
|
||||||
|
return m_commsProvider.GridService.GetGridSettings();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue