aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Services/GridService
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Services/GridService')
-rw-r--r--OpenSim/Services/GridService/GridService.cs42
-rw-r--r--OpenSim/Services/GridService/GridServiceBase.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs16
-rw-r--r--OpenSim/Services/GridService/Properties/AssemblyInfo.cs8
4 files changed, 34 insertions, 34 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index aa13a67..6153f5e 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Services.GridService
72 if (gridConfig != null) 72 if (gridConfig != null)
73 { 73 {
74 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true); 74 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true);
75 75
76 string authService = gridConfig.GetString("AuthenticationService", String.Empty); 76 string authService = gridConfig.GetString("AuthenticationService", String.Empty);
77 77
78 if (authService != String.Empty) 78 if (authService != String.Empty)
@@ -200,7 +200,7 @@ namespace OpenSim.Services.GridService
200 if (regionInfos.RegionLocY <= Constants.MaximumRegionSize) 200 if (regionInfos.RegionLocY <= Constants.MaximumRegionSize)
201 return "Region location reserved for HG links coord Y must be higher than " + (Constants.MaximumRegionSize/256).ToString(); 201 return "Region location reserved for HG links coord Y must be higher than " + (Constants.MaximumRegionSize/256).ToString();
202 202
203 String reason = "Region overlaps another region"; 203 String reason = "Region overlaps another region";
204 204
205 List<RegionData> rdatas = m_Database.Get( 205 List<RegionData> rdatas = m_Database.Get(
206 regionInfos.RegionLocX, 206 regionInfos.RegionLocX,
@@ -272,7 +272,7 @@ namespace OpenSim.Services.GridService
272 { 272 {
273 if (d.RegionID != regionInfos.RegionID) 273 if (d.RegionID != regionInfos.RegionID)
274 { 274 {
275 m_log.WarnFormat("[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).", 275 m_log.WarnFormat("[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).",
276 regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID); 276 regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID);
277 return "Duplicate region name"; 277 return "Duplicate region name";
278 } 278 }
@@ -282,7 +282,7 @@ namespace OpenSim.Services.GridService
282 282
283 // If there is an old record for us, delete it if it is elsewhere. 283 // If there is an old record for us, delete it if it is elsewhere.
284 region = m_Database.Get(regionInfos.RegionID, scopeID); 284 region = m_Database.Get(regionInfos.RegionID, scopeID);
285 if ((region != null) && (region.RegionID == regionInfos.RegionID) && 285 if ((region != null) && (region.RegionID == regionInfos.RegionID) &&
286 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY))) 286 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
287 { 287 {
288 if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.NoMove) != 0) 288 if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.NoMove) != 0)
@@ -308,7 +308,7 @@ namespace OpenSim.Services.GridService
308 // Everything is ok, let's register 308 // Everything is ok, let's register
309 RegionData rdata = RegionInfo2RegionData(regionInfos); 309 RegionData rdata = RegionInfo2RegionData(regionInfos);
310 rdata.ScopeID = scopeID; 310 rdata.ScopeID = scopeID;
311 311
312 if (region != null) 312 if (region != null)
313 { 313 {
314 int oldFlags = Convert.ToInt32(region.Data["flags"]); 314 int oldFlags = Convert.ToInt32(region.Data["flags"]);
@@ -346,9 +346,9 @@ namespace OpenSim.Services.GridService
346 } 346 }
347 347
348 m_log.DebugFormat 348 m_log.DebugFormat
349 ("[GRID SERVICE]: Region {0} ({1}, {2}x{3}) registered at {4},{5} with flags {6}", 349 ("[GRID SERVICE]: Region {0} ({1}, {2}x{3}) registered at {4},{5} with flags {6}",
350 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionSizeX, regionInfos.RegionSizeY, 350 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionSizeX, regionInfos.RegionSizeY,
351 regionInfos.RegionCoordX, regionInfos.RegionCoordY, 351 regionInfos.RegionCoordX, regionInfos.RegionCoordY,
352 (OpenSim.Framework.RegionFlags)flags); 352 (OpenSim.Framework.RegionFlags)flags);
353 353
354 return String.Empty; 354 return String.Empty;
@@ -404,7 +404,7 @@ namespace OpenSim.Services.GridService
404 { 404 {
405 List<GridRegion> rinfos = new List<GridRegion>(); 405 List<GridRegion> rinfos = new List<GridRegion>();
406 RegionData region = m_Database.Get(regionID, scopeID); 406 RegionData region = m_Database.Get(regionID, scopeID);
407 407
408 if (region != null) 408 if (region != null)
409 { 409 {
410 List<RegionData> rdatas = m_Database.Get( 410 List<RegionData> rdatas = m_Database.Get(
@@ -430,10 +430,10 @@ namespace OpenSim.Services.GridService
430 else 430 else
431 { 431 {
432 m_log.WarnFormat( 432 m_log.WarnFormat(
433 "[GRID SERVICE]: GetNeighbours() called for scope {0}, region {1} but no such region found", 433 "[GRID SERVICE]: GetNeighbours() called for scope {0}, region {1} but no such region found",
434 scopeID, regionID); 434 scopeID, regionID);
435 } 435 }
436 436
437 return rinfos; 437 return rinfos;
438 } 438 }
439 439
@@ -451,7 +451,7 @@ namespace OpenSim.Services.GridService
451 // be the base coordinate of the region. 451 // be the base coordinate of the region.
452 // The snapping is technically unnecessary but is harmless because regions are always 452 // The snapping is technically unnecessary but is harmless because regions are always
453 // multiples of the legacy region size (256). 453 // multiples of the legacy region size (256).
454 454
455 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 455 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
456 { 456 {
457 uint regionX = Util.WorldToRegionLoc((uint)x); 457 uint regionX = Util.WorldToRegionLoc((uint)x);
@@ -505,7 +505,7 @@ namespace OpenSim.Services.GridService
505 string regionName = ""; 505 string regionName = "";
506 if(!Util.buildHGRegionURI(name, out regionURI, out regionName)) 506 if(!Util.buildHGRegionURI(name, out regionURI, out regionName))
507 return null; 507 return null;
508 508
509 string mapname; 509 string mapname;
510 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI); 510 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI);
511 if(localGrid) 511 if(localGrid)
@@ -531,11 +531,11 @@ namespace OpenSim.Services.GridService
531 rinfos.Add(RegionData2RegionInfo(rdata)); 531 rinfos.Add(RegionData2RegionInfo(rdata));
532 } 532 }
533 } 533 }
534 } 534 }
535 if(haveMatch) 535 if(haveMatch)
536 return rinfos; 536 return rinfos;
537 } 537 }
538 538
539 rdatas = m_Database.Get(Util.EscapeForLike(mapname)+ "%", scopeID); 539 rdatas = m_Database.Get(Util.EscapeForLike(mapname)+ "%", scopeID);
540 if (rdatas != null && (rdatas.Count > 0)) 540 if (rdatas != null && (rdatas.Count > 0))
541 { 541 {
@@ -554,7 +554,7 @@ namespace OpenSim.Services.GridService
554 break; 554 break;
555 } 555 }
556 } 556 }
557 } 557 }
558 if(haveMatch) 558 if(haveMatch)
559 return rinfos; 559 return rinfos;
560 } 560 }
@@ -597,7 +597,7 @@ namespace OpenSim.Services.GridService
597 string regionName = ""; 597 string regionName = "";
598 if(!Util.buildHGRegionURI(name, out regionURI, out regionName)) 598 if(!Util.buildHGRegionURI(name, out regionURI, out regionName))
599 return null; 599 return null;
600 600
601 string mapname; 601 string mapname;
602 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI); 602 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI);
603 if(localGrid) 603 if(localGrid)
@@ -666,7 +666,7 @@ namespace OpenSim.Services.GridService
666 return rinfo; 666 return rinfo;
667 } 667 }
668 668
669 #endregion 669 #endregion
670 670
671 public List<GridRegion> GetDefaultRegions(UUID scopeID) 671 public List<GridRegion> GetDefaultRegions(UUID scopeID)
672 { 672 {
@@ -705,7 +705,7 @@ namespace OpenSim.Services.GridService
705 int normalDefaultRegionsFoundOnline = ret.Count - hgDefaultRegionsFoundOnline; 705 int normalDefaultRegionsFoundOnline = ret.Count - hgDefaultRegionsFoundOnline;
706 706
707 m_log.DebugFormat( 707 m_log.DebugFormat(
708 "[GRID SERVICE]: GetDefaultHypergridRegions returning {0} hypergrid default and {1} normal default regions", 708 "[GRID SERVICE]: GetDefaultHypergridRegions returning {0} hypergrid default and {1} normal default regions",
709 hgDefaultRegionsFoundOnline, normalDefaultRegionsFoundOnline); 709 hgDefaultRegionsFoundOnline, normalDefaultRegionsFoundOnline);
710 710
711 return ret; 711 return ret;
@@ -742,7 +742,7 @@ namespace OpenSim.Services.GridService
742 m_log.DebugFormat("[GRID SERVICE]: Hyperlinks returned {0} regions", ret.Count); 742 m_log.DebugFormat("[GRID SERVICE]: Hyperlinks returned {0} regions", ret.Count);
743 return ret; 743 return ret;
744 } 744 }
745 745
746 public int GetRegionFlags(UUID scopeID, UUID regionID) 746 public int GetRegionFlags(UUID scopeID, UUID regionID)
747 { 747 {
748 RegionData region = m_Database.Get(regionID, scopeID); 748 RegionData region = m_Database.Get(regionID, scopeID);
@@ -994,7 +994,7 @@ namespace OpenSim.Services.GridService
994 } 994 }
995 995
996 /// <summary> 996 /// <summary>
997 /// Gets the grid extra service URls we wish for the region to send in OpenSimExtras to dynamically refresh 997 /// Gets the grid extra service URls we wish for the region to send in OpenSimExtras to dynamically refresh
998 /// parameters in the viewer used to access services like map, search and destination guides. 998 /// parameters in the viewer used to access services like map, search and destination guides.
999 /// <para>see "SimulatorFeaturesModule" </para> 999 /// <para>see "SimulatorFeaturesModule" </para>
1000 /// </summary> 1000 /// </summary>
diff --git a/OpenSim/Services/GridService/GridServiceBase.cs b/OpenSim/Services/GridService/GridServiceBase.cs
index 444f79b..7522e64 100644
--- a/OpenSim/Services/GridService/GridServiceBase.cs
+++ b/OpenSim/Services/GridService/GridServiceBase.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.GridService
68 connString = gridConfig.GetString("ConnectionString", connString); 68 connString = gridConfig.GetString("ConnectionString", connString);
69 realm = gridConfig.GetString("Realm", realm); 69 realm = gridConfig.GetString("Realm", realm);
70 } 70 }
71 71
72 // 72 //
73 // We tried, but this doesn't exist. We can't proceed. 73 // We tried, but this doesn't exist. We can't proceed.
74 // 74 //
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index aa394ce..dabfd3b 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -196,7 +196,7 @@ namespace OpenSim.Services.GridService
196 { 196 {
197 return TryLinkRegionToCoords(scopeID, mapName, xloc, yloc, UUID.Zero, out reason); 197 return TryLinkRegionToCoords(scopeID, mapName, xloc, yloc, UUID.Zero, out reason);
198 } 198 }
199 199
200 public bool IsLocalGrid(string serverURI) 200 public bool IsLocalGrid(string serverURI)
201 { 201 {
202 return serverURI == m_ThisGatekeeper; 202 return serverURI == m_ThisGatekeeper;
@@ -240,7 +240,7 @@ namespace OpenSim.Services.GridService
240 240
241 private bool TryCreateLinkImpl(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason) 241 private bool TryCreateLinkImpl(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason)
242 { 242 {
243 m_log.InfoFormat("[HYPERGRID LINKER]: Link to {0} {1}, in <{2},{3}>", 243 m_log.InfoFormat("[HYPERGRID LINKER]: Link to {0} {1}, in <{2},{3}>",
244 ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI), 244 ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI),
245 remoteRegionName, Util.WorldToRegionLoc((uint)xloc), Util.WorldToRegionLoc((uint)yloc)); 245 remoteRegionName, Util.WorldToRegionLoc((uint)xloc), Util.WorldToRegionLoc((uint)yloc));
246 246
@@ -270,7 +270,7 @@ namespace OpenSim.Services.GridService
270 270
271 if (remoteRegionName != string.Empty) 271 if (remoteRegionName != string.Empty)
272 regInfo.RegionName = remoteRegionName; 272 regInfo.RegionName = remoteRegionName;
273 273
274 regInfo.RegionLocX = xloc; 274 regInfo.RegionLocX = xloc;
275 regInfo.RegionLocY = yloc; 275 regInfo.RegionLocY = yloc;
276 regInfo.ScopeID = scopeID; 276 regInfo.ScopeID = scopeID;
@@ -359,7 +359,7 @@ namespace OpenSim.Services.GridService
359 regInfo.RegionName = externalName; 359 regInfo.RegionName = externalName;
360 360
361 m_log.DebugFormat("[HYPERGRID LINKER]: naming linked region {0}, handle {1}", regInfo.RegionName, handle.ToString()); 361 m_log.DebugFormat("[HYPERGRID LINKER]: naming linked region {0}, handle {1}", regInfo.RegionName, handle.ToString());
362 362
363 // Get the map image 363 // Get the map image
364 regInfo.TerrainImage = GetMapImage(regionID, imageURL); 364 regInfo.TerrainImage = GetMapImage(regionID, imageURL);
365 365
@@ -383,7 +383,7 @@ namespace OpenSim.Services.GridService
383 OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]); 383 OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]);
384 if ((rflags & OpenSim.Framework.RegionFlags.Hyperlink) != 0) 384 if ((rflags & OpenSim.Framework.RegionFlags.Hyperlink) != 0)
385 { 385 {
386 regInfo = new GridRegion(); 386 regInfo = new GridRegion();
387 regInfo.RegionID = regions[0].RegionID; 387 regInfo.RegionID = regions[0].RegionID;
388 regInfo.ScopeID = m_ScopeID; 388 regInfo.ScopeID = m_ScopeID;
389 } 389 }
@@ -491,7 +491,7 @@ namespace OpenSim.Services.GridService
491 { 491 {
492 MainConsole.Instance.Output( 492 MainConsole.Instance.Output(
493 String.Format("{0}\n{2,-32} {1}\n", 493 String.Format("{0}\n{2,-32} {1}\n",
494 r.RegionName, r.RegionID, 494 r.RegionName, r.RegionID,
495 String.Format("{0},{1} ({2},{3})", r.posX, r.posY, 495 String.Format("{0},{1} ({2},{3})", r.posX, r.posY,
496 Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY) 496 Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY)
497 ) 497 )
@@ -515,7 +515,7 @@ namespace OpenSim.Services.GridService
515 RunHGCommand(command, cmdparams); 515 RunHGCommand(command, cmdparams);
516 516
517 } 517 }
518 518
519 private void RunLinkRegionCommand(string[] cmdparams) 519 private void RunLinkRegionCommand(string[] cmdparams)
520 { 520 {
521 int xloc, yloc; 521 int xloc, yloc;
@@ -573,7 +573,7 @@ namespace OpenSim.Services.GridService
573 if (cmdparams[2].StartsWith("http")) 573 if (cmdparams[2].StartsWith("http"))
574 { 574 {
575 RunLinkRegionCommand(cmdparams); 575 RunLinkRegionCommand(cmdparams);
576 } 576 }
577 else if (cmdparams[2].Contains(":")) 577 else if (cmdparams[2].Contains(":"))
578 { 578 {
579 // New format 579 // New format
diff --git a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
index 40a29b3..69a3c44 100644
--- a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.GridService")] 8[assembly: AssemblyTitle("OpenSim.Services.GridService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//