aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Grid/GridServer
parentThank you very much, mjm for : (diff)
downloadopensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Grid/GridServer')
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs64
-rw-r--r--OpenSim/Grid/GridServer/IGridPlugin.cs2
-rw-r--r--OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs8
3 files changed, 37 insertions, 37 deletions
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
243 243
244 /// <summary> 244 /// <summary>
245 /// Checks that it's valid to replace the existing region data with new data 245 /// Checks that it's valid to replace the existing region data with new data
246 /// 246 ///
247 /// Currently, this means ensure that the keys passed in by the new region 247 /// Currently, this means ensure that the keys passed in by the new region
248 /// match those in the original region. (XXX Is this correct? Shouldn't we simply check 248 /// match those in the original region. (XXX Is this correct? Shouldn't we simply check
249 /// against the keys in the current configuration?) 249 /// against the keys in the current configuration?)
250 /// </summary> 250 /// </summary>
251 /// <param name="sim"></param> 251 /// <param name="sim"></param>
252 /// <returns></returns> 252 /// <returns></returns>
253 protected virtual void ValidateOverwriteKeys(RegionProfileData sim, RegionProfileData existingSim) 253 protected virtual void ValidateOverwriteKeys(RegionProfileData sim, RegionProfileData existingSim)
254 { 254 {
255 if (!(existingSim.regionRecvKey == sim.regionRecvKey && existingSim.regionSendKey == sim.regionSendKey)) 255 if (!(existingSim.regionRecvKey == sim.regionRecvKey && existingSim.regionSendKey == sim.regionSendKey))
256 { 256 {
257 throw new LoginException( 257 throw new LoginException(
258 String.Format( 258 String.Format(
259 "Authentication failed when trying to login existing region {0} at location {1} {2} currently occupied by {3}" 259 "Authentication failed when trying to login existing region {0} at location {1} {2} currently occupied by {3}"
260 + " with the region's send key {4} (expected {5}) and the region's receive key {6} (expected {7})", 260 + " with the region's send key {4} (expected {5}) and the region's receive key {6} (expected {7})",
261 sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName, 261 sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName,
262 sim.regionSendKey, existingSim.regionSendKey, sim.regionRecvKey, existingSim.regionRecvKey), 262 sim.regionSendKey, existingSim.regionSendKey, sim.regionRecvKey, existingSim.regionRecvKey),
263 "The keys required to login your region did not match the grid server keys. Please check your grid send and receive keys."); 263 "The keys required to login your region did not match the grid server keys. Please check your grid send and receive keys.");
264 } 264 }
@@ -266,25 +266,25 @@ namespace OpenSim.Grid.GridServer
266 266
267 /// <summary> 267 /// <summary>
268 /// Checks that the new region data is valid. 268 /// Checks that the new region data is valid.
269 /// 269 ///
270 /// Currently, this means checking that the keys passed in by the new region 270 /// Currently, this means checking that the keys passed in by the new region
271 /// match those in the grid server's configuration. 271 /// match those in the grid server's configuration.
272 /// </summary> 272 /// </summary>
273 /// 273 ///
274 /// <param name="sim"></param> 274 /// <param name="sim"></param>
275 /// <exception cref="LoginException">Thrown if region login failed</exception> 275 /// <exception cref="LoginException">Thrown if region login failed</exception>
276 protected virtual void ValidateNewRegionKeys(RegionProfileData sim) 276 protected virtual void ValidateNewRegionKeys(RegionProfileData sim)
277 { 277 {
278 if (!(sim.regionRecvKey == Config.SimSendKey && sim.regionSendKey == Config.SimRecvKey)) 278 if (!(sim.regionRecvKey == Config.SimSendKey && sim.regionSendKey == Config.SimRecvKey))
279 { 279 {
280 throw new LoginException( 280 throw new LoginException(
281 String.Format( 281 String.Format(
282 "Authentication failed when trying to login new region {0} at location {1} {2}" 282 "Authentication failed when trying to login new region {0} at location {1} {2}"
283 + " with the region's send key {3} (expected {4}) and the region's receive key {5} (expected {6})", 283 + " with the region's send key {3} (expected {4}) and the region's receive key {5} (expected {6})",
284 sim.regionName, sim.regionLocX, sim.regionLocY, 284 sim.regionName, sim.regionLocX, sim.regionLocY,
285 sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey), 285 sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey),
286 "The keys required to login your region did not match your existing region keys. Please check your grid send and receive keys."); 286 "The keys required to login your region did not match your existing region keys. Please check your grid send and receive keys.");
287 } 287 }
288 } 288 }
289 289
290 /// <summary> 290 /// <summary>
@@ -295,13 +295,13 @@ namespace OpenSim.Grid.GridServer
295 protected virtual void ValidateRegionContactable(RegionProfileData sim) 295 protected virtual void ValidateRegionContactable(RegionProfileData sim)
296 { 296 {
297 string regionStatusUrl = String.Format("{0}{1}", sim.httpServerURI, "simstatus/"); 297 string regionStatusUrl = String.Format("{0}{1}", sim.httpServerURI, "simstatus/");
298 string regionStatusResponse; 298 string regionStatusResponse;
299 299
300 RestClient rc = new RestClient(regionStatusUrl); 300 RestClient rc = new RestClient(regionStatusUrl);
301 rc.RequestMethod = "GET"; 301 rc.RequestMethod = "GET";
302 302
303 m_log.DebugFormat("[LOGIN]: Contacting {0} for status of region {1}", regionStatusUrl, sim.regionName); 303 m_log.DebugFormat("[LOGIN]: Contacting {0} for status of region {1}", regionStatusUrl, sim.regionName);
304 304
305 try 305 try
306 { 306 {
307 Stream rs = rc.Request(); 307 Stream rs = rc.Request();
@@ -314,21 +314,21 @@ namespace OpenSim.Grid.GridServer
314 throw new LoginException( 314 throw new LoginException(
315 String.Format("Region status request to {0} failed", regionStatusUrl), 315 String.Format("Region status request to {0} failed", regionStatusUrl),
316 String.Format( 316 String.Format(
317 "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service", 317 "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service",
318 regionStatusUrl), 318 regionStatusUrl),
319 e); 319 e);
320 } 320 }
321 321
322 if (!regionStatusResponse.Equals("OK")) 322 if (!regionStatusResponse.Equals("OK"))
323 { 323 {
324 throw new LoginException( 324 throw new LoginException(
325 String.Format( 325 String.Format(
326 "Region {0} at {1} returned status response {2} rather than {3}", 326 "Region {0} at {1} returned status response {2} rather than {3}",
327 sim.regionName, regionStatusUrl, regionStatusResponse, "OK"), 327 sim.regionName, regionStatusUrl, regionStatusResponse, "OK"),
328 String.Format( 328 String.Format(
329 "When the grid service asked for the status of your region, it received the response {0} rather than {1}. Please check your status", 329 "When the grid service asked for the status of your region, it received the response {0} rather than {1}. Please check your status",
330 regionStatusResponse, "OK")); 330 regionStatusResponse, "OK"));
331 } 331 }
332 } 332 }
333 333
334 /// <summary> 334 /// <summary>
@@ -373,11 +373,11 @@ namespace OpenSim.Grid.GridServer
373 m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); 373 m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response.");
374 return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); 374 return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString());
375 } 375 }
376 376
377 m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); 377 m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName);
378 378
379 existingSim = GetRegion(sim.regionHandle); 379 existingSim = GetRegion(sim.regionHandle);
380 380
381 if (existingSim == null || existingSim.UUID == sim.UUID || sim.UUID != sim.originUUID) 381 if (existingSim == null || existingSim.UUID == sim.UUID || sim.UUID != sim.originUUID)
382 { 382 {
383 try 383 try
@@ -390,13 +390,13 @@ namespace OpenSim.Grid.GridServer
390 { 390 {
391 ValidateOverwriteKeys(sim, existingSim); 391 ValidateOverwriteKeys(sim, existingSim);
392 } 392 }
393 393
394 ValidateRegionContactable(sim); 394 ValidateRegionContactable(sim);
395 } 395 }
396 catch (LoginException e) 396 catch (LoginException e)
397 { 397 {
398 m_log.WarnFormat("[LOGIN END]: {0}", e.Message); 398 m_log.WarnFormat("[LOGIN END]: {0}", e.Message);
399 399
400 return e.XmlRpcErrorResponse; 400 return e.XmlRpcErrorResponse;
401 } 401 }
402 402
@@ -489,7 +489,7 @@ namespace OpenSim.Grid.GridServer
489 responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines; 489 responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines;
490 490
491 // Instead of sending a multitude of message servers to the registering sim 491 // Instead of sending a multitude of message servers to the registering sim
492 // we should probably be sending a single one and parhaps it's backup 492 // we should probably be sending a single one and parhaps it's backup
493 // that has responsibility over routing it's messages. 493 // that has responsibility over routing it's messages.
494 494
495 // The Sim won't be contacting us again about any of the message server stuff during it's time up. 495 // 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
583 583
584 sim.regionRecvKey = String.Empty; 584 sim.regionRecvKey = String.Empty;
585 sim.regionSendKey = String.Empty; 585 sim.regionSendKey = String.Empty;
586 586
587 if (requestData.ContainsKey("region_secret")) 587 if (requestData.ContainsKey("region_secret"))
588 { 588 {
589 string regionsecret = (string)requestData["region_secret"]; 589 string regionsecret = (string)requestData["region_secret"];
@@ -596,8 +596,8 @@ namespace OpenSim.Grid.GridServer
596 else 596 else
597 { 597 {
598 sim.regionSecret = Config.SimRecvKey; 598 sim.regionSecret = Config.SimRecvKey;
599 } 599 }
600 600
601 sim.regionDataURI = String.Empty; 601 sim.regionDataURI = String.Empty;
602 sim.regionAssetURI = Config.DefaultAssetServer; 602 sim.regionAssetURI = Config.DefaultAssetServer;
603 sim.regionAssetRecvKey = Config.AssetRecvKey; 603 sim.regionAssetRecvKey = Config.AssetRecvKey;
@@ -626,7 +626,7 @@ namespace OpenSim.Grid.GridServer
626 // not at all. Current strategy is to put the code in place to support the validity of this information 626 // not at all. Current strategy is to put the code in place to support the validity of this information
627 // and to roll forward debugging any issues from that point 627 // and to roll forward debugging any issues from that point
628 // 628 //
629 // this particular section of the mod attempts to receive a value from the region's xml file by way of 629 // this particular section of the mod attempts to receive a value from the region's xml file by way of
630 // OSG1GridServices for the region's owner 630 // OSG1GridServices for the region's owner
631 sim.owner_uuid = (string)requestData["master_avatar_uuid"]; 631 sim.owner_uuid = (string)requestData["master_avatar_uuid"];
632 632
@@ -1120,7 +1120,7 @@ namespace OpenSim.Grid.GridServer
1120 return response; 1120 return response;
1121 } 1121 }
1122 } 1122 }
1123 1123
1124 /// <summary> 1124 /// <summary>
1125 /// Exception generated when a simulator fails to login to the grid 1125 /// Exception generated when a simulator fails to login to the grid
1126 /// </summary> 1126 /// </summary>
@@ -1147,6 +1147,6 @@ namespace OpenSim.Grid.GridServer
1147 { 1147 {
1148 // FIXME: Might be neater to refactor and put the method inside here 1148 // FIXME: Might be neater to refactor and put the method inside here
1149 m_xmlRpcErrorResponse = GridManager.ErrorResponse(xmlRpcMessage); 1149 m_xmlRpcErrorResponse = GridManager.ErrorResponse(xmlRpcMessage);
1150 } 1150 }
1151 } 1151 }
1152} 1152}
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 @@
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
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
29using Mono.Addins; 29using 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 @@
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30 30
31// General Information about an assembly is controlled through the following 31// General information about an assembly is controlled through the following
32// set of attributes. Change these attribute values to modify the information 32// set of attributes. Change these attribute values to modify the information
33// associated with an assembly. 33// associated with an assembly.
34 34
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
41[assembly : AssemblyTrademark("")] 41[assembly : AssemblyTrademark("")]
42[assembly : AssemblyCulture("")] 42[assembly : AssemblyCulture("")]
43 43
44// Setting ComVisible to false makes the types in this assembly not visible 44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from 45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type. 46// COM, set the ComVisible attribute to true on that type.
47 47
48[assembly : ComVisible(false)] 48[assembly : ComVisible(false)]
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
54// Version information for an assembly consists of the following four values: 54// Version information for an assembly consists of the following four values:
55// 55//
56// Major Version 56// Major Version
57// Minor Version 57// Minor Version
58// Build Number 58// Build Number
59// Revision 59// Revision
60// 60//