From 65c5efe43b68700bad94076d4cd421160203c5de Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Fri, 16 May 2008 01:22:11 +0000
Subject: Formatting cleanup.
---
OpenSim/Grid/GridServer/GridManager.cs | 64 +++++++++++-----------
OpenSim/Grid/GridServer/IGridPlugin.cs | 2 +-
OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs | 8 +--
3 files changed, 37 insertions(+), 37 deletions(-)
(limited to 'OpenSim/Grid/GridServer')
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index c2c212c..83b5319 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -243,22 +243,22 @@ namespace OpenSim.Grid.GridServer
///
/// Checks that it's valid to replace the existing region data with new data
- ///
- /// Currently, this means ensure that the keys passed in by the new region
+ ///
+ /// Currently, this means ensure that the keys passed in by the new region
/// match those in the original region. (XXX Is this correct? Shouldn't we simply check
/// against the keys in the current configuration?)
///
///
- ///
+ ///
protected virtual void ValidateOverwriteKeys(RegionProfileData sim, RegionProfileData existingSim)
- {
+ {
if (!(existingSim.regionRecvKey == sim.regionRecvKey && existingSim.regionSendKey == sim.regionSendKey))
{
throw new LoginException(
String.Format(
"Authentication failed when trying to login existing region {0} at location {1} {2} currently occupied by {3}"
+ " with the region's send key {4} (expected {5}) and the region's receive key {6} (expected {7})",
- sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName,
+ sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName,
sim.regionSendKey, existingSim.regionSendKey, sim.regionRecvKey, existingSim.regionRecvKey),
"The keys required to login your region did not match the grid server keys. Please check your grid send and receive keys.");
}
@@ -266,25 +266,25 @@ namespace OpenSim.Grid.GridServer
///
/// Checks that the new region data is valid.
- ///
- /// Currently, this means checking that the keys passed in by the new region
+ ///
+ /// Currently, this means checking that the keys passed in by the new region
/// match those in the grid server's configuration.
///
- ///
+ ///
///
/// Thrown if region login failed
protected virtual void ValidateNewRegionKeys(RegionProfileData sim)
- {
+ {
if (!(sim.regionRecvKey == Config.SimSendKey && sim.regionSendKey == Config.SimRecvKey))
{
throw new LoginException(
String.Format(
"Authentication failed when trying to login new region {0} at location {1} {2}"
+ " with the region's send key {3} (expected {4}) and the region's receive key {5} (expected {6})",
- sim.regionName, sim.regionLocX, sim.regionLocY,
+ sim.regionName, sim.regionLocX, sim.regionLocY,
sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey),
"The keys required to login your region did not match your existing region keys. Please check your grid send and receive keys.");
- }
+ }
}
///
@@ -295,13 +295,13 @@ namespace OpenSim.Grid.GridServer
protected virtual void ValidateRegionContactable(RegionProfileData sim)
{
string regionStatusUrl = String.Format("{0}{1}", sim.httpServerURI, "simstatus/");
- string regionStatusResponse;
-
+ string regionStatusResponse;
+
RestClient rc = new RestClient(regionStatusUrl);
- rc.RequestMethod = "GET";
-
+ rc.RequestMethod = "GET";
+
m_log.DebugFormat("[LOGIN]: Contacting {0} for status of region {1}", regionStatusUrl, sim.regionName);
-
+
try
{
Stream rs = rc.Request();
@@ -314,21 +314,21 @@ namespace OpenSim.Grid.GridServer
throw new LoginException(
String.Format("Region status request to {0} failed", regionStatusUrl),
String.Format(
- "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service",
+ "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service",
regionStatusUrl),
e);
- }
-
+ }
+
if (!regionStatusResponse.Equals("OK"))
{
throw new LoginException(
String.Format(
- "Region {0} at {1} returned status response {2} rather than {3}",
+ "Region {0} at {1} returned status response {2} rather than {3}",
sim.regionName, regionStatusUrl, regionStatusResponse, "OK"),
String.Format(
"When the grid service asked for the status of your region, it received the response {0} rather than {1}. Please check your status",
regionStatusResponse, "OK"));
- }
+ }
}
///
@@ -373,11 +373,11 @@ 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());
}
-
+
m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName);
existingSim = GetRegion(sim.regionHandle);
-
+
if (existingSim == null || existingSim.UUID == sim.UUID || sim.UUID != sim.originUUID)
{
try
@@ -390,13 +390,13 @@ namespace OpenSim.Grid.GridServer
{
ValidateOverwriteKeys(sim, existingSim);
}
-
+
ValidateRegionContactable(sim);
}
catch (LoginException e)
{
m_log.WarnFormat("[LOGIN END]: {0}", e.Message);
-
+
return e.XmlRpcErrorResponse;
}
@@ -489,7 +489,7 @@ namespace OpenSim.Grid.GridServer
responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines;
// Instead of sending a multitude of message servers to the registering sim
- // we should probably be sending a single one and parhaps it's backup
+ // we should probably be sending a single one and parhaps it's backup
// that has responsibility over routing it's messages.
// The Sim won't be contacting us again about any of the message server stuff during it's time up.
@@ -583,7 +583,7 @@ namespace OpenSim.Grid.GridServer
sim.regionRecvKey = String.Empty;
sim.regionSendKey = String.Empty;
-
+
if (requestData.ContainsKey("region_secret"))
{
string regionsecret = (string)requestData["region_secret"];
@@ -596,8 +596,8 @@ namespace OpenSim.Grid.GridServer
else
{
sim.regionSecret = Config.SimRecvKey;
- }
-
+ }
+
sim.regionDataURI = String.Empty;
sim.regionAssetURI = Config.DefaultAssetServer;
sim.regionAssetRecvKey = Config.AssetRecvKey;
@@ -626,7 +626,7 @@ namespace OpenSim.Grid.GridServer
// not at all. Current strategy is to put the code in place to support the validity of this information
// and to roll forward debugging any issues from that point
//
- // this particular section of the mod attempts to receive a value from the region's xml file by way of
+ // this particular section of the mod attempts to receive a value from the region's xml file by way of
// OSG1GridServices for the region's owner
sim.owner_uuid = (string)requestData["master_avatar_uuid"];
@@ -1120,7 +1120,7 @@ namespace OpenSim.Grid.GridServer
return response;
}
}
-
+
///
/// Exception generated when a simulator fails to login to the grid
///
@@ -1147,6 +1147,6 @@ namespace OpenSim.Grid.GridServer
{
// FIXME: Might be neater to refactor and put the method inside here
m_xmlRpcErrorResponse = GridManager.ErrorResponse(xmlRpcMessage);
- }
+ }
}
}
diff --git a/OpenSim/Grid/GridServer/IGridPlugin.cs b/OpenSim/Grid/GridServer/IGridPlugin.cs
index fbadfce..47273a2 100644
--- a/OpenSim/Grid/GridServer/IGridPlugin.cs
+++ b/OpenSim/Grid/GridServer/IGridPlugin.cs
@@ -23,7 +23,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
+*
*/
using Mono.Addins;
diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
index 1468edd..67cff8f 100644
--- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
--
cgit v1.1