diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 42 |
1 files changed, 21 insertions, 21 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> |