diff options
author | Justin Clarke Casey | 2008-10-13 20:35:45 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-13 20:35:45 +0000 |
commit | 97f4226666b5d3525999550e1362180be182cc87 (patch) | |
tree | eb0a19c238f42bf34960f28f92c1c4c1b75aa374 /OpenSim/Grid/GridServer/GridManager.cs | |
parent | Update svn properties. (diff) | |
download | opensim-SC-97f4226666b5d3525999550e1362180be182cc87.zip opensim-SC-97f4226666b5d3525999550e1362180be182cc87.tar.gz opensim-SC-97f4226666b5d3525999550e1362180be182cc87.tar.bz2 opensim-SC-97f4226666b5d3525999550e1362180be182cc87.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Grid/GridServer/GridManager.cs')
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 23 |
1 files changed, 23 insertions, 0 deletions
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 | |||
377 | m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); | 377 | m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); |
378 | return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); | 378 | return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); |
379 | } | 379 | } |
380 | |||
381 | if (!Config.AllowRegionRegistration) | ||
382 | { | ||
383 | m_log.InfoFormat( | ||
384 | "[LOGIN END]: Disabled region registration blocked login request from simulator: {0}", | ||
385 | sim.regionName); | ||
386 | |||
387 | return ErrorResponse("The grid is currently not accepting region registrations."); | ||
388 | } | ||
380 | 389 | ||
381 | m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); | 390 | m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); |
382 | 391 | ||
@@ -1206,6 +1215,20 @@ namespace OpenSim.Grid.GridServer | |||
1206 | } | 1215 | } |
1207 | return response; | 1216 | return response; |
1208 | } | 1217 | } |
1218 | |||
1219 | /// <summary> | ||
1220 | /// Construct an XMLRPC registration disabled response | ||
1221 | /// </summary> | ||
1222 | /// <param name="error"></param> | ||
1223 | /// <returns></returns> | ||
1224 | public static XmlRpcResponse XmlRPCRegionRegistrationDisabledResponse(string error) | ||
1225 | { | ||
1226 | XmlRpcResponse errorResponse = new XmlRpcResponse(); | ||
1227 | Hashtable errorResponseData = new Hashtable(); | ||
1228 | errorResponse.Value = errorResponseData; | ||
1229 | errorResponseData["restricted"] = error; | ||
1230 | return errorResponse; | ||
1231 | } | ||
1209 | } | 1232 | } |
1210 | 1233 | ||
1211 | /// <summary> | 1234 | /// <summary> |