* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenSim.Framework.Communications
|
||||
|
@ -37,6 +37,7 @@ namespace OpenSim.Framework.Communications
|
|||
bool DeregisterRegion(RegionInfo regionInfo);
|
||||
List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
|
||||
RegionInfo RequestNeighbourInfo(ulong regionHandle);
|
||||
Dictionary<string, string> GetGridSettings();
|
||||
List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
|
||||
|
||||
}
|
||||
|
|
|
@ -44,9 +44,12 @@ namespace OpenSim.Framework
|
|||
|
||||
public string DatabaseProvider = "";
|
||||
|
||||
|
||||
public static uint DefaultHttpPort = 8001;
|
||||
public uint HttpPort = DefaultHttpPort;
|
||||
|
||||
public string AllowForcefulBanlines = "TRUE";
|
||||
|
||||
private ConfigurationMember configMember;
|
||||
|
||||
public GridConfig(string description, string filename)
|
||||
|
@ -89,6 +92,9 @@ namespace OpenSim.Framework
|
|||
|
||||
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||
"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)
|
||||
|
@ -128,6 +134,9 @@ namespace OpenSim.Framework
|
|||
case "http_port":
|
||||
HttpPort = (uint) configuration_result;
|
||||
break;
|
||||
case "allow_forceful_banlines":
|
||||
AllowForcefulBanlines = (string)configuration_result;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace OpenSim.Framework
|
|||
|
||||
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
|
||||
|
||||
|
||||
|
||||
|
||||
public interface IRegionCommsListener
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Framework
|
|||
public event CloseAgentConnection OnCloseAgentConnection;
|
||||
public event RegionUp OnRegionUp;
|
||||
public event ChildAgentUpdate OnChildAgentUpdate;
|
||||
|
||||
|
||||
public string debugRegionName="";
|
||||
|
||||
|
||||
|
@ -62,6 +64,9 @@ namespace OpenSim.Framework
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData)
|
||||
{
|
||||
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)
|
||||
responseData["data_uri"] = TheSim.regionDataURI;
|
||||
|
||||
responseData["allow_forceful_banlines"] = config.AllowForcefulBanlines;
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ namespace OpenSim.Region.Communications.Local
|
|||
|
||||
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
|
||||
|
@ -218,6 +220,26 @@ namespace OpenSim.Region.Communications.Local
|
|||
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)
|
||||
{
|
||||
if (m_regionListeners.ContainsKey(regionhandle))
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
||||
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
||||
private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
||||
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
||||
|
||||
public BaseHttpServer httpListener;
|
||||
public NetworkServersInfo serversInfo;
|
||||
|
@ -134,7 +135,15 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
else
|
||||
{
|
||||
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);
|
||||
|
@ -144,7 +153,23 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
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>
|
||||
|
|
|
@ -818,6 +818,12 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// These two 'commands' *must be* next to each other or sim rebooting fails.
|
||||
m_sceneGridService.RegisterRegion(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>
|
||||
|
@ -1295,6 +1301,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_sceneGridService.OnCloseAgentConnection += CloseConnection;
|
||||
m_sceneGridService.OnRegionUp += OtherRegionUp;
|
||||
m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
|
||||
|
||||
|
||||
m_sceneGridService.KillObject = SendKillObject;
|
||||
}
|
||||
|
@ -1303,15 +1310,29 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
///
|
||||
/// </summary>
|
||||
public void UnRegisterReginWithComms()
|
||||
{
|
||||
{
|
||||
|
||||
m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
|
||||
m_sceneGridService.OnRegionUp -= OtherRegionUp;
|
||||
m_sceneGridService.OnExpectUser -= NewUserConnection;
|
||||
m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing;
|
||||
m_sceneGridService.OnCloseAgentConnection -= CloseConnection;
|
||||
|
||||
|
||||
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>
|
||||
///
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public event PrimCrossing OnPrimCrossingIntoRegion;
|
||||
public event RegionUp OnRegionUp;
|
||||
public event ChildAgentUpdate OnChildAgentUpdate;
|
||||
|
||||
|
||||
public KillObjectDelegate KillObject;
|
||||
public string _debugRegionName = "";
|
||||
|
@ -101,6 +102,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
if (regionCommsHost != null)
|
||||
{
|
||||
|
||||
regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate;
|
||||
regionCommsHost.OnRegionUp -= newRegionUp;
|
||||
regionCommsHost.OnExpectUser -= NewUserConnection;
|
||||
|
@ -168,6 +170,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
OnCloseAgentConnection(regionHandle, agentID);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Inform Client of Neighbours
|
||||
|
@ -466,5 +469,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
presence.RemoveNeighbourRegion(regionHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetGridSettings()
|
||||
{
|
||||
return m_commsProvider.GridService.GetGridSettings();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue