aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorRobert Adams2014-01-03 07:41:06 -0800
committerRobert Adams2014-01-03 07:41:06 -0800
commit9984ecf862ff7362b0caa6c55554c3fd2243873d (patch)
tree3b627cf01886371cc4a625916a3bc6297c4d23b8 /OpenSim/Services
parentvarregion: extract banned region logic into a class for cleanlyness. (diff)
downloadopensim-SC-9984ecf862ff7362b0caa6c55554c3fd2243873d.zip
opensim-SC-9984ecf862ff7362b0caa6c55554c3fd2243873d.tar.gz
opensim-SC-9984ecf862ff7362b0caa6c55554c3fd2243873d.tar.bz2
opensim-SC-9984ecf862ff7362b0caa6c55554c3fd2243873d.tar.xz
varregion: Add region size to teleport event messages (EnableSimulator,
CorssRegion, TeleportFinishEvent). Have Simian grid service return the region size. Many teleport related debug log messages. Can be removed when teleport works (like that's ever going to happen).
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs6
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs14
2 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index fb424dc..6b59f94 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -443,9 +443,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
443 region.RegionName = response["Name"].AsString(); 443 region.RegionName = response["Name"].AsString();
444 444
445 Vector3d minPosition = response["MinPosition"].AsVector3d(); 445 Vector3d minPosition = response["MinPosition"].AsVector3d();
446 Vector3d maxPosition = response["MaxPosition"].AsVector3d();
446 region.RegionLocX = (int)minPosition.X; 447 region.RegionLocX = (int)minPosition.X;
447 region.RegionLocY = (int)minPosition.Y; 448 region.RegionLocY = (int)minPosition.Y;
448 449
450 region.RegionSizeX = (int)maxPosition.X - (int)minPosition.X;
451 region.RegionSizeY = (int)maxPosition.Y - (int)minPosition.Y;
452
449 if ( ! extraData["HyperGrid"] ) { 453 if ( ! extraData["HyperGrid"] ) {
450 Uri httpAddress = response["Address"].AsUri(); 454 Uri httpAddress = response["Address"].AsUri();
451 region.ExternalHostName = httpAddress.Host; 455 region.ExternalHostName = httpAddress.Host;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index adc32df..ed5189a 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -29,9 +29,13 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using System.Reflection;
33
32using OpenSim.Framework; 34using OpenSim.Framework;
33using OpenMetaverse; 35using OpenMetaverse;
34 36
37using log4net;
38
35namespace OpenSim.Services.Interfaces 39namespace OpenSim.Services.Interfaces
36{ 40{
37 public interface IGridService 41 public interface IGridService
@@ -119,6 +123,9 @@ namespace OpenSim.Services.Interfaces
119 123
120 public class GridRegion 124 public class GridRegion
121 { 125 {
126 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
127 private static readonly string LogHeader = "[GRID REGION]";
128
122 /// <summary> 129 /// <summary>
123 /// The port by which http communication occurs with the region 130 /// The port by which http communication occurs with the region
124 /// </summary> 131 /// </summary>
@@ -420,9 +427,13 @@ namespace OpenSim.Services.Interfaces
420 427
421 if (kvp.ContainsKey("sizeX")) 428 if (kvp.ContainsKey("sizeX"))
422 RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]); 429 RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]);
430 else
431 RegionSizeX = (int)Constants.RegionSize;
423 432
424 if (kvp.ContainsKey("sizeY")) 433 if (kvp.ContainsKey("sizeY"))
425 RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]); 434 RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]);
435 else
436 RegionSizeX = (int)Constants.RegionSize;
426 437
427 if (kvp.ContainsKey("regionName")) 438 if (kvp.ContainsKey("regionName"))
428 RegionName = (string)kvp["regionName"]; 439 RegionName = (string)kvp["regionName"];
@@ -471,6 +482,9 @@ namespace OpenSim.Services.Interfaces
471 482
472 if (kvp.ContainsKey("Token")) 483 if (kvp.ContainsKey("Token"))
473 Token = kvp["Token"].ToString(); 484 Token = kvp["Token"].ToString();
485
486 m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>",
487 LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY);
474 } 488 }
475 } 489 }
476} 490}