diff options
author | Teravus Ovares | 2007-12-20 06:31:03 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-20 06:31:03 +0000 |
commit | 8aae9094128069b83fbf11cb77503e29fd381b25 (patch) | |
tree | 96515c224150272c435c6b004d0950fcd4f07509 /OpenSim | |
parent | Added patch from Johan. First attempt to solve the LibSL.Packet GC problem. W... (diff) | |
download | opensim-SC_OLD-8aae9094128069b83fbf11cb77503e29fd381b25.zip opensim-SC_OLD-8aae9094128069b83fbf11cb77503e29fd381b25.tar.gz opensim-SC_OLD-8aae9094128069b83fbf11cb77503e29fd381b25.tar.bz2 opensim-SC_OLD-8aae9094128069b83fbf11cb77503e29fd381b25.tar.xz |
* 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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/IGridServices.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/GridConfig.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/IRegionCommsListener.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/RegionCommsListener.cs | 5 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalBackEndServices.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 27 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 9 |
9 files changed, 99 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index 240d9c0..d51f234 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs | |||
@@ -25,7 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | using System.Collections; | |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | 30 | ||
31 | namespace OpenSim.Framework.Communications | 31 | namespace OpenSim.Framework.Communications |
@@ -37,6 +37,7 @@ namespace OpenSim.Framework.Communications | |||
37 | bool DeregisterRegion(RegionInfo regionInfo); | 37 | bool DeregisterRegion(RegionInfo regionInfo); |
38 | List<SimpleRegionInfo> RequestNeighbours(uint x, uint y); | 38 | List<SimpleRegionInfo> RequestNeighbours(uint x, uint y); |
39 | RegionInfo RequestNeighbourInfo(ulong regionHandle); | 39 | RegionInfo RequestNeighbourInfo(ulong regionHandle); |
40 | Dictionary<string, string> GetGridSettings(); | ||
40 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); | 41 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); |
41 | 42 | ||
42 | } | 43 | } |
diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index 021e6c5..799be46 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs | |||
@@ -44,9 +44,12 @@ namespace OpenSim.Framework | |||
44 | 44 | ||
45 | public string DatabaseProvider = ""; | 45 | public string DatabaseProvider = ""; |
46 | 46 | ||
47 | |||
47 | public static uint DefaultHttpPort = 8001; | 48 | public static uint DefaultHttpPort = 8001; |
48 | public uint HttpPort = DefaultHttpPort; | 49 | public uint HttpPort = DefaultHttpPort; |
49 | 50 | ||
51 | public string AllowForcefulBanlines = "TRUE"; | ||
52 | |||
50 | private ConfigurationMember configMember; | 53 | private ConfigurationMember configMember; |
51 | 54 | ||
52 | public GridConfig(string description, string filename) | 55 | public GridConfig(string description, string filename) |
@@ -89,6 +92,9 @@ namespace OpenSim.Framework | |||
89 | 92 | ||
90 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 93 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
91 | "Http Listener port", DefaultHttpPort.ToString(), false); | 94 | "Http Listener port", DefaultHttpPort.ToString(), false); |
95 | |||
96 | configMember.addConfigurationOption("allow_forceful_banlines", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | ||
97 | "Allow Forceful Banlines", "TRUE", true); | ||
92 | } | 98 | } |
93 | 99 | ||
94 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 100 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
@@ -128,6 +134,9 @@ namespace OpenSim.Framework | |||
128 | case "http_port": | 134 | case "http_port": |
129 | HttpPort = (uint) configuration_result; | 135 | HttpPort = (uint) configuration_result; |
130 | break; | 136 | break; |
137 | case "allow_forceful_banlines": | ||
138 | AllowForcefulBanlines = (string)configuration_result; | ||
139 | break; | ||
131 | } | 140 | } |
132 | 141 | ||
133 | return true; | 142 | return true; |
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs index 7aaeffe..363ab27 100644 --- a/OpenSim/Framework/IRegionCommsListener.cs +++ b/OpenSim/Framework/IRegionCommsListener.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim.Framework | |||
50 | 50 | ||
51 | public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); | 51 | public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); |
52 | 52 | ||
53 | |||
53 | 54 | ||
54 | 55 | ||
55 | public interface IRegionCommsListener | 56 | public interface IRegionCommsListener |
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs index e8752ac..a146778 100644 --- a/OpenSim/Framework/RegionCommsListener.cs +++ b/OpenSim/Framework/RegionCommsListener.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Framework | |||
44 | public event CloseAgentConnection OnCloseAgentConnection; | 44 | public event CloseAgentConnection OnCloseAgentConnection; |
45 | public event RegionUp OnRegionUp; | 45 | public event RegionUp OnRegionUp; |
46 | public event ChildAgentUpdate OnChildAgentUpdate; | 46 | public event ChildAgentUpdate OnChildAgentUpdate; |
47 | |||
48 | |||
47 | public string debugRegionName=""; | 49 | public string debugRegionName=""; |
48 | 50 | ||
49 | 51 | ||
@@ -62,6 +64,9 @@ namespace OpenSim.Framework | |||
62 | 64 | ||
63 | return false; | 65 | return false; |
64 | } | 66 | } |
67 | |||
68 | |||
69 | |||
65 | public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData) | 70 | public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData) |
66 | { | 71 | { |
67 | if (OnExpectUser != null) | 72 | if (OnExpectUser != null) |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 09cbe7f..fad9f0d 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -404,6 +404,8 @@ namespace OpenSim.Grid.GridServer | |||
404 | // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap) | 404 | // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap) |
405 | responseData["data_uri"] = TheSim.regionDataURI; | 405 | responseData["data_uri"] = TheSim.regionDataURI; |
406 | 406 | ||
407 | responseData["allow_forceful_banlines"] = config.AllowForcefulBanlines; | ||
408 | |||
407 | 409 | ||
408 | return response; | 410 | return response; |
409 | } | 411 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index f57de1c..f6137f7 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -43,6 +43,8 @@ namespace OpenSim.Region.Communications.Local | |||
43 | 43 | ||
44 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); | 44 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); |
45 | 45 | ||
46 | private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>(); | ||
47 | |||
46 | public string _gdebugRegionName = ""; | 48 | public string _gdebugRegionName = ""; |
47 | 49 | ||
48 | public string gdebugRegionName | 50 | public string gdebugRegionName |
@@ -218,6 +220,26 @@ namespace OpenSim.Region.Communications.Local | |||
218 | return false; | 220 | return false; |
219 | } | 221 | } |
220 | 222 | ||
223 | // This function Is only here to keep this class in line with the Grid Interface. | ||
224 | // It never gets called. | ||
225 | public virtual Dictionary<string, string> GetGridSettings() | ||
226 | { | ||
227 | Dictionary<string,string> returnGridSettings = new Dictionary<string,string>(); | ||
228 | lock (m_queuedGridSettings) | ||
229 | { | ||
230 | returnGridSettings = m_queuedGridSettings; | ||
231 | m_queuedGridSettings.Clear(); | ||
232 | } | ||
233 | |||
234 | return returnGridSettings; | ||
235 | } | ||
236 | |||
237 | public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle) | ||
238 | { | ||
239 | m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); | ||
240 | |||
241 | } | ||
242 | |||
221 | public bool TriggerRegionUp(RegionInfo region, ulong regionhandle) | 243 | public bool TriggerRegionUp(RegionInfo region, ulong regionhandle) |
222 | { | 244 | { |
223 | if (m_regionListeners.ContainsKey(regionhandle)) | 245 | if (m_regionListeners.ContainsKey(regionhandle)) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 060fe28..7adac58 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
50 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); | 50 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); |
51 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); | 51 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); |
52 | private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>(); | 52 | private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>(); |
53 | private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>(); | ||
53 | 54 | ||
54 | public BaseHttpServer httpListener; | 55 | public BaseHttpServer httpListener; |
55 | public NetworkServersInfo serversInfo; | 56 | public NetworkServersInfo serversInfo; |
@@ -134,7 +135,15 @@ namespace OpenSim.Region.Communications.OGS1 | |||
134 | else | 135 | else |
135 | { | 136 | { |
136 | m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY); | 137 | m_knownRegions = RequestNeighbours(regionInfo.RegionLocX, regionInfo.RegionLocY); |
137 | 138 | if (GridRespData.ContainsKey("allow_forceful_banlines")) | |
139 | { | ||
140 | |||
141 | if ((string)GridRespData["allow_forceful_banlines"] != "TRUE") | ||
142 | { | ||
143 | //m_localBackend.SetForcefulBanlistsDisallowed(regionInfo.RegionHandle); | ||
144 | m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); | ||
145 | } | ||
146 | } | ||
138 | 147 | ||
139 | } | 148 | } |
140 | return m_localBackend.RegisterRegion(regionInfo); | 149 | return m_localBackend.RegisterRegion(regionInfo); |
@@ -144,7 +153,23 @@ namespace OpenSim.Region.Communications.OGS1 | |||
144 | { | 153 | { |
145 | return false; | 154 | return false; |
146 | } | 155 | } |
156 | public virtual Dictionary<string, string> GetGridSettings() | ||
157 | { | ||
158 | Dictionary<string, string> returnGridSettings = new Dictionary<string, string>(); | ||
159 | lock (m_queuedGridSettings) | ||
160 | { | ||
161 | foreach (string Dictkey in m_queuedGridSettings.Keys) | ||
162 | { | ||
163 | returnGridSettings.Add(Dictkey, m_queuedGridSettings[Dictkey]); | ||
164 | |||
165 | } | ||
147 | 166 | ||
167 | |||
168 | m_queuedGridSettings.Clear(); | ||
169 | } | ||
170 | |||
171 | return returnGridSettings; | ||
172 | } | ||
148 | /// <summary> | 173 | /// <summary> |
149 | /// | 174 | /// |
150 | /// </summary> | 175 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 01d6c5a..6d2d31f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -818,6 +818,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
818 | // These two 'commands' *must be* next to each other or sim rebooting fails. | 818 | // These two 'commands' *must be* next to each other or sim rebooting fails. |
819 | m_sceneGridService.RegisterRegion(RegionInfo); | 819 | m_sceneGridService.RegisterRegion(RegionInfo); |
820 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); | 820 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); |
821 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); | ||
822 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) | ||
823 | { | ||
824 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | ||
825 | MainLog.Instance.Verbose("GRID","Grid is disabling forceful parcel banlists"); | ||
826 | } | ||
821 | } | 827 | } |
822 | 828 | ||
823 | /// <summary> | 829 | /// <summary> |
@@ -1295,6 +1301,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1295 | m_sceneGridService.OnCloseAgentConnection += CloseConnection; | 1301 | m_sceneGridService.OnCloseAgentConnection += CloseConnection; |
1296 | m_sceneGridService.OnRegionUp += OtherRegionUp; | 1302 | m_sceneGridService.OnRegionUp += OtherRegionUp; |
1297 | m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; | 1303 | m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; |
1304 | |||
1298 | 1305 | ||
1299 | m_sceneGridService.KillObject = SendKillObject; | 1306 | m_sceneGridService.KillObject = SendKillObject; |
1300 | } | 1307 | } |
@@ -1303,15 +1310,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
1303 | /// | 1310 | /// |
1304 | /// </summary> | 1311 | /// </summary> |
1305 | public void UnRegisterReginWithComms() | 1312 | public void UnRegisterReginWithComms() |
1306 | { | 1313 | { |
1314 | |||
1307 | m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; | 1315 | m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; |
1308 | m_sceneGridService.OnRegionUp -= OtherRegionUp; | 1316 | m_sceneGridService.OnRegionUp -= OtherRegionUp; |
1309 | m_sceneGridService.OnExpectUser -= NewUserConnection; | 1317 | m_sceneGridService.OnExpectUser -= NewUserConnection; |
1310 | m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing; | 1318 | m_sceneGridService.OnAvatarCrossingIntoRegion -= AgentCrossing; |
1311 | m_sceneGridService.OnCloseAgentConnection -= CloseConnection; | 1319 | m_sceneGridService.OnCloseAgentConnection -= CloseConnection; |
1312 | 1320 | ||
1313 | m_sceneGridService.Close(); | 1321 | m_sceneGridService.Close(); |
1314 | } | 1322 | } |
1323 | public void NewIncomingGridSetting(ulong regionHandle, string key, string gvalue) | ||
1324 | { | ||
1325 | if (key == "allow_forceful_banlines") | ||
1326 | { | ||
1327 | if (gvalue == "FALSE") | ||
1328 | { | ||
1329 | MainLog.Instance.Verbose("INTERGRID", "Grid is disallowing forcefull banlines"); | ||
1330 | //Ming, Do stuff here | ||
1331 | } | ||
1332 | } | ||
1333 | |||
1334 | |||
1335 | } | ||
1315 | 1336 | ||
1316 | /// <summary> | 1337 | /// <summary> |
1317 | /// | 1338 | /// |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index c72e344..b184af2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -52,6 +52,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
52 | public event PrimCrossing OnPrimCrossingIntoRegion; | 52 | public event PrimCrossing OnPrimCrossingIntoRegion; |
53 | public event RegionUp OnRegionUp; | 53 | public event RegionUp OnRegionUp; |
54 | public event ChildAgentUpdate OnChildAgentUpdate; | 54 | public event ChildAgentUpdate OnChildAgentUpdate; |
55 | |||
55 | 56 | ||
56 | public KillObjectDelegate KillObject; | 57 | public KillObjectDelegate KillObject; |
57 | public string _debugRegionName = ""; | 58 | public string _debugRegionName = ""; |
@@ -101,6 +102,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
101 | { | 102 | { |
102 | if (regionCommsHost != null) | 103 | if (regionCommsHost != null) |
103 | { | 104 | { |
105 | |||
104 | regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate; | 106 | regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate; |
105 | regionCommsHost.OnRegionUp -= newRegionUp; | 107 | regionCommsHost.OnRegionUp -= newRegionUp; |
106 | regionCommsHost.OnExpectUser -= NewUserConnection; | 108 | regionCommsHost.OnExpectUser -= NewUserConnection; |
@@ -168,6 +170,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | OnCloseAgentConnection(regionHandle, agentID); | 170 | OnCloseAgentConnection(regionHandle, agentID); |
169 | } | 171 | } |
170 | } | 172 | } |
173 | |||
171 | #endregion | 174 | #endregion |
172 | 175 | ||
173 | #region Inform Client of Neighbours | 176 | #region Inform Client of Neighbours |
@@ -466,5 +469,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
466 | presence.RemoveNeighbourRegion(regionHandle); | 469 | presence.RemoveNeighbourRegion(regionHandle); |
467 | } | 470 | } |
468 | } | 471 | } |
472 | |||
473 | public Dictionary<string, string> GetGridSettings() | ||
474 | { | ||
475 | return m_commsProvider.GridService.GetGridSettings(); | ||
476 | } | ||
477 | |||
469 | } | 478 | } |
470 | } | 479 | } |