From 97f4226666b5d3525999550e1362180be182cc87 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 13 Oct 2008 20:35:45 +0000
Subject: * Apply a modified version of the part of
http://opensimulator.org/mantis/view.php?id=2361 that allows region
registration to be enabled/disabled on the grid server * Region registration
is enabled by default in the configuration unless the user chooses otherwise
* On the console * show status - shows grid status * enable-reg - enables
region registration to the grid * disable-reg - disables region registration
* Enabling or disabling region registration will not affect any other grid functions or regions already on the grid
---
OpenSim/Grid/GridServer/GridManager.cs | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
(limited to 'OpenSim/Grid/GridServer/GridManager.cs')
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 1e8ac00..7739a55 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -377,6 +377,15 @@ namespace OpenSim.Grid.GridServer
m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response.");
return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString());
}
+
+ if (!Config.AllowRegionRegistration)
+ {
+ m_log.InfoFormat(
+ "[LOGIN END]: Disabled region registration blocked login request from simulator: {0}",
+ sim.regionName);
+
+ return ErrorResponse("The grid is currently not accepting region registrations.");
+ }
m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName);
@@ -1206,6 +1215,20 @@ namespace OpenSim.Grid.GridServer
}
return response;
}
+
+ ///
+ /// Construct an XMLRPC registration disabled response
+ ///
+ ///
+ ///
+ public static XmlRpcResponse XmlRPCRegionRegistrationDisabledResponse(string error)
+ {
+ XmlRpcResponse errorResponse = new XmlRpcResponse();
+ Hashtable errorResponseData = new Hashtable();
+ errorResponse.Value = errorResponseData;
+ errorResponseData["restricted"] = error;
+ return errorResponse;
+ }
}
///
--
cgit v1.1