aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDr Scofield2008-11-10 17:37:28 +0000
committerDr Scofield2008-11-10 17:37:28 +0000
commit6df113845e5c9cecb69922221f9f2d4c235b1a28 (patch)
tree5157083e8a6ec10f14ca0be6567090ff3c079816 /OpenSim
parentKeep dropped prims from being temp-on-rez and getting cleaned up (diff)
downloadopensim-SC-6df113845e5c9cecb69922221f9f2d4c235b1a28.zip
opensim-SC-6df113845e5c9cecb69922221f9f2d4c235b1a28.tar.gz
opensim-SC-6df113845e5c9cecb69922221f9f2d4c235b1a28.tar.bz2
opensim-SC-6df113845e5c9cecb69922221f9f2d4c235b1a28.tar.xz
this changeset adds an option to RemoteAdmin to limit the number of
regions that XmlRpcCreateRegion will create: if region_limit is != 0 then XmlRpcCreateRegion will only create a new region if the number of regions already existing is below region_limit.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 6f8ec43..1490893 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -378,6 +378,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
378 XmlRpcResponse response = new XmlRpcResponse(); 378 XmlRpcResponse response = new XmlRpcResponse();
379 Hashtable responseData = new Hashtable(); 379 Hashtable responseData = new Hashtable();
380 380
381 int m_regionLimit = m_config.GetInt("region_limit", 0);
382
381 try { 383 try {
382 Hashtable requestData = (Hashtable) request.Params[0]; 384 Hashtable requestData = (Hashtable) request.Params[0];
383 385
@@ -392,6 +394,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
392 if (!String.IsNullOrEmpty(requiredPassword) && 394 if (!String.IsNullOrEmpty(requiredPassword) &&
393 (string)requestData["password"] != requiredPassword) throw new Exception("wrong password"); 395 (string)requestData["password"] != requiredPassword) throw new Exception("wrong password");
394 396
397 // check whether we still have space left (iff we are using limits)
398 if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit)
399 throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first", m_regionLimit));
400
401
395 // extract or generate region ID now 402 // extract or generate region ID now
396 Scene scene = null; 403 Scene scene = null;
397 UUID regionID = UUID.Zero; 404 UUID regionID = UUID.Zero;