diff options
author | UbitUmarov | 2015-09-01 14:54:35 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 14:54:35 +0100 |
commit | 371c9dd2af01a2e7422ec901ee1f80757284a78c (patch) | |
tree | 058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Services/GridService | |
parent | remove lixo (diff) | |
parent | dont change camera on crossings (diff) | |
download | opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2 opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz |
bad merge?
Diffstat (limited to 'OpenSim/Services/GridService')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 38 | ||||
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 31 |
2 files changed, 67 insertions, 2 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 8807397..8293c18 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -57,9 +57,13 @@ namespace OpenSim.Services.GridService | |||
57 | protected bool m_AllowDuplicateNames = false; | 57 | protected bool m_AllowDuplicateNames = false; |
58 | protected bool m_AllowHypergridMapSearch = false; | 58 | protected bool m_AllowHypergridMapSearch = false; |
59 | 59 | ||
60 | <<<<<<< HEAD | ||
60 | protected bool m_SuppressVarregionOverlapCheckOnRegistration = false; | 61 | protected bool m_SuppressVarregionOverlapCheckOnRegistration = false; |
61 | 62 | ||
62 | private static Dictionary<string,object> m_ExtraFeatures = new Dictionary<string, object>(); | 63 | private static Dictionary<string,object> m_ExtraFeatures = new Dictionary<string, object>(); |
64 | ======= | ||
65 | private static Dictionary<string, object> m_ExtraFeatures = new Dictionary<string, object>(); | ||
66 | >>>>>>> avn/ubitvar | ||
63 | 67 | ||
64 | public GridService(IConfigSource config) | 68 | public GridService(IConfigSource config) |
65 | : base(config) | 69 | : base(config) |
@@ -155,9 +159,15 @@ namespace OpenSim.Services.GridService | |||
155 | 159 | ||
156 | if (loginConfig == null || gridConfig == null) | 160 | if (loginConfig == null || gridConfig == null) |
157 | return; | 161 | return; |
162 | <<<<<<< HEAD | ||
158 | 163 | ||
159 | string configVal; | 164 | string configVal; |
160 | 165 | ||
166 | ======= | ||
167 | |||
168 | string configVal; | ||
169 | |||
170 | >>>>>>> avn/ubitvar | ||
161 | configVal = loginConfig.GetString("SearchURL", string.Empty); | 171 | configVal = loginConfig.GetString("SearchURL", string.Empty); |
162 | if (!string.IsNullOrEmpty(configVal)) | 172 | if (!string.IsNullOrEmpty(configVal)) |
163 | m_ExtraFeatures["search-server-url"] = configVal; | 173 | m_ExtraFeatures["search-server-url"] = configVal; |
@@ -201,6 +211,7 @@ namespace OpenSim.Services.GridService | |||
201 | if (regionInfos.RegionID == UUID.Zero) | 211 | if (regionInfos.RegionID == UUID.Zero) |
202 | return "Invalid RegionID - cannot be zero UUID"; | 212 | return "Invalid RegionID - cannot be zero UUID"; |
203 | 213 | ||
214 | <<<<<<< HEAD | ||
204 | String reason = "Region overlaps another region"; | 215 | String reason = "Region overlaps another region"; |
205 | RegionData region = FindAnyConflictingRegion(regionInfos, scopeID, out reason); | 216 | RegionData region = FindAnyConflictingRegion(regionInfos, scopeID, out reason); |
206 | // If there is a conflicting region, if it has the same ID and same coordinates | 217 | // If there is a conflicting region, if it has the same ID and same coordinates |
@@ -210,6 +221,12 @@ namespace OpenSim.Services.GridService | |||
210 | || (region.coordY != regionInfos.RegionCoordY) | 221 | || (region.coordY != regionInfos.RegionCoordY) |
211 | || (region.RegionID != regionInfos.RegionID) ) | 222 | || (region.RegionID != regionInfos.RegionID) ) |
212 | ) | 223 | ) |
224 | ======= | ||
225 | // we should not need to check for overlaps | ||
226 | |||
227 | RegionData region = m_Database.Get(regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID); | ||
228 | if ((region != null) && (region.RegionID != regionInfos.RegionID)) | ||
229 | >>>>>>> avn/ubitvar | ||
213 | { | 230 | { |
214 | // If not same ID and same coordinates, this new region has conflicts and can't be registered. | 231 | // If not same ID and same coordinates, this new region has conflicts and can't be registered. |
215 | m_log.WarnFormat("{0} Register region conflict in scope {1}. {2}", LogHeader, scopeID, reason); | 232 | m_log.WarnFormat("{0} Register region conflict in scope {1}. {2}", LogHeader, scopeID, reason); |
@@ -463,7 +480,7 @@ namespace OpenSim.Services.GridService | |||
463 | 480 | ||
464 | int flags = Convert.ToInt32(region.Data["flags"]); | 481 | int flags = Convert.ToInt32(region.Data["flags"]); |
465 | 482 | ||
466 | if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Framework.RegionFlags.Persistent) != 0) | 483 | if ((!m_DeleteOnUnregister) || ((flags & (int)OpenSim.Framework.RegionFlags.Persistent) != 0)) |
467 | { | 484 | { |
468 | flags &= ~(int)OpenSim.Framework.RegionFlags.RegionOnline; | 485 | flags &= ~(int)OpenSim.Framework.RegionFlags.RegionOnline; |
469 | region.Data["flags"] = flags.ToString(); | 486 | region.Data["flags"] = flags.ToString(); |
@@ -478,7 +495,6 @@ namespace OpenSim.Services.GridService | |||
478 | } | 495 | } |
479 | 496 | ||
480 | return true; | 497 | return true; |
481 | |||
482 | } | 498 | } |
483 | 499 | ||
484 | return m_Database.Delete(regionID); | 500 | return m_Database.Delete(regionID); |
@@ -492,10 +508,19 @@ namespace OpenSim.Services.GridService | |||
492 | if (region != null) | 508 | if (region != null) |
493 | { | 509 | { |
494 | // Not really? Maybe? | 510 | // Not really? Maybe? |
511 | <<<<<<< HEAD | ||
495 | // The adjacent regions are presumed to be the same size as the current region | 512 | // The adjacent regions are presumed to be the same size as the current region |
513 | ======= | ||
514 | /* this fails wiht var regions. My_sql db should now handle var regions | ||
515 | >>>>>>> avn/ubitvar | ||
496 | List<RegionData> rdatas = m_Database.Get( | 516 | List<RegionData> rdatas = m_Database.Get( |
497 | region.posX - region.sizeX - 1, region.posY - region.sizeY - 1, | 517 | region.posX - region.sizeX - 1, region.posY - region.sizeY - 1, |
498 | region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID); | 518 | region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID); |
519 | */ | ||
520 | // so send normal search area | ||
521 | List<RegionData> rdatas = m_Database.Get( | ||
522 | region.posX - 1, region.posY - 1, | ||
523 | region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID); | ||
499 | 524 | ||
500 | foreach (RegionData rdata in rdatas) | 525 | foreach (RegionData rdata in rdatas) |
501 | { | 526 | { |
@@ -537,6 +562,7 @@ namespace OpenSim.Services.GridService | |||
537 | // be the base coordinate of the region. | 562 | // be the base coordinate of the region. |
538 | // The snapping is technically unnecessary but is harmless because regions are always | 563 | // The snapping is technically unnecessary but is harmless because regions are always |
539 | // multiples of the legacy region size (256). | 564 | // multiples of the legacy region size (256). |
565 | |||
540 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) | 566 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) |
541 | { | 567 | { |
542 | uint regionX = Util.WorldToRegionLoc((uint)x); | 568 | uint regionX = Util.WorldToRegionLoc((uint)x); |
@@ -872,7 +898,11 @@ namespace OpenSim.Services.GridService | |||
872 | return; | 898 | return; |
873 | } | 899 | } |
874 | 900 | ||
901 | <<<<<<< HEAD | ||
875 | RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero); | 902 | RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero); |
903 | ======= | ||
904 | RegionData region = m_Database.Get((int)Util.RegionToWorldLoc((uint)x), (int)Util.RegionToWorldLoc((uint)y), UUID.Zero); | ||
905 | >>>>>>> avn/ubitvar | ||
876 | if (region == null) | 906 | if (region == null) |
877 | { | 907 | { |
878 | MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y); | 908 | MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y); |
@@ -889,7 +919,11 @@ namespace OpenSim.Services.GridService | |||
889 | ConsoleDisplayList dispList = new ConsoleDisplayList(); | 919 | ConsoleDisplayList dispList = new ConsoleDisplayList(); |
890 | dispList.AddRow("Region Name", r.RegionName); | 920 | dispList.AddRow("Region Name", r.RegionName); |
891 | dispList.AddRow("Region ID", r.RegionID); | 921 | dispList.AddRow("Region ID", r.RegionID); |
922 | <<<<<<< HEAD | ||
892 | dispList.AddRow("Position", string.Format("{0},{1}", r.coordX, r.coordY)); | 923 | dispList.AddRow("Position", string.Format("{0},{1}", r.coordX, r.coordY)); |
924 | ======= | ||
925 | dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); | ||
926 | >>>>>>> avn/ubitvar | ||
893 | dispList.AddRow("Size", string.Format("{0}x{1}", r.sizeX, r.sizeY)); | 927 | dispList.AddRow("Size", string.Format("{0}x{1}", r.sizeX, r.sizeY)); |
894 | dispList.AddRow("URI", r.Data["serverURI"]); | 928 | dispList.AddRow("URI", r.Data["serverURI"]); |
895 | dispList.AddRow("Owner ID", r.Data["owner_uuid"]); | 929 | dispList.AddRow("Owner ID", r.Data["owner_uuid"]); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 9d016fc..b4577b0 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -343,7 +343,11 @@ namespace OpenSim.Services.GridService | |||
343 | GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); | 343 | GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); |
344 | if (region != null) | 344 | if (region != null) |
345 | { | 345 | { |
346 | <<<<<<< HEAD | ||
346 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates <{0},{1}> are already occupied by region {2} with uuid {3}", | 347 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates <{0},{1}> are already occupied by region {2} with uuid {3}", |
348 | ======= | ||
349 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", | ||
350 | >>>>>>> avn/ubitvar | ||
347 | Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY), | 351 | Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY), |
348 | region.RegionName, region.RegionID); | 352 | region.RegionName, region.RegionID); |
349 | reason = "Coordinates are already in use"; | 353 | reason = "Coordinates are already in use"; |
@@ -379,8 +383,13 @@ namespace OpenSim.Services.GridService | |||
379 | region = m_GridService.GetRegionByUUID(scopeID, regionID); | 383 | region = m_GridService.GetRegionByUUID(scopeID, regionID); |
380 | if (region != null) | 384 | if (region != null) |
381 | { | 385 | { |
386 | <<<<<<< HEAD | ||
382 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates <{0},{1}>", | 387 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates <{0},{1}>", |
383 | Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); | 388 | Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); |
389 | ======= | ||
390 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", | ||
391 | Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY)); | ||
392 | >>>>>>> avn/ubitvar | ||
384 | regInfo = region; | 393 | regInfo = region; |
385 | return true; | 394 | return true; |
386 | } | 395 | } |
@@ -536,6 +545,7 @@ namespace OpenSim.Services.GridService | |||
536 | MainConsole.Instance.Output(new string('-', 72)); | 545 | MainConsole.Instance.Output(new string('-', 72)); |
537 | foreach (RegionData r in regions) | 546 | foreach (RegionData r in regions) |
538 | { | 547 | { |
548 | <<<<<<< HEAD | ||
539 | MainConsole.Instance.Output( | 549 | MainConsole.Instance.Output( |
540 | String.Format("{0}\n{2,-32} {1}\n", | 550 | String.Format("{0}\n{2,-32} {1}\n", |
541 | r.RegionName, r.RegionID, | 551 | r.RegionName, r.RegionID, |
@@ -544,6 +554,12 @@ namespace OpenSim.Services.GridService | |||
544 | ) | 554 | ) |
545 | ) | 555 | ) |
546 | ); | 556 | ); |
557 | ======= | ||
558 | MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n", | ||
559 | r.RegionName, r.RegionID, | ||
560 | String.Format("{0},{1} ({2},{3})", r.posX, r.posY, | ||
561 | Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY))) ); | ||
562 | >>>>>>> avn/ubitvar | ||
547 | } | 563 | } |
548 | return; | 564 | return; |
549 | } | 565 | } |
@@ -645,8 +661,13 @@ namespace OpenSim.Services.GridService | |||
645 | string externalHostName; | 661 | string externalHostName; |
646 | try | 662 | try |
647 | { | 663 | { |
664 | <<<<<<< HEAD | ||
648 | xloc = Convert.ToUInt32(cmdparams[0]); | 665 | xloc = Convert.ToUInt32(cmdparams[0]); |
649 | yloc = Convert.ToUInt32(cmdparams[1]); | 666 | yloc = Convert.ToUInt32(cmdparams[1]); |
667 | ======= | ||
668 | xloc = (uint)Convert.ToInt32(cmdparams[0]); | ||
669 | yloc = (uint)Convert.ToInt32(cmdparams[1]); | ||
670 | >>>>>>> avn/ubitvar | ||
650 | externalPort = Convert.ToUInt32(cmdparams[3]); | 671 | externalPort = Convert.ToUInt32(cmdparams[3]); |
651 | externalHostName = cmdparams[2]; | 672 | externalHostName = cmdparams[2]; |
652 | //internalPort = Convert.ToUInt32(cmdparams[4]); | 673 | //internalPort = Convert.ToUInt32(cmdparams[4]); |
@@ -749,8 +770,13 @@ namespace OpenSim.Services.GridService | |||
749 | string externalHostName; | 770 | string externalHostName; |
750 | uint realXLoc, realYLoc; | 771 | uint realXLoc, realYLoc; |
751 | 772 | ||
773 | <<<<<<< HEAD | ||
752 | xloc = Convert.ToUInt32(config.GetString("xloc", "0")); | 774 | xloc = Convert.ToUInt32(config.GetString("xloc", "0")); |
753 | yloc = Convert.ToUInt32(config.GetString("yloc", "0")); | 775 | yloc = Convert.ToUInt32(config.GetString("yloc", "0")); |
776 | ======= | ||
777 | xloc = (uint)Convert.ToInt32(config.GetString("xloc", "0")); | ||
778 | yloc = (uint)Convert.ToInt32(config.GetString("yloc", "0")); | ||
779 | >>>>>>> avn/ubitvar | ||
754 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); | 780 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); |
755 | externalHostName = config.GetString("externalHostName", ""); | 781 | externalHostName = config.GetString("externalHostName", ""); |
756 | realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0")); | 782 | realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0")); |
@@ -758,8 +784,13 @@ namespace OpenSim.Services.GridService | |||
758 | 784 | ||
759 | if (m_enableAutoMapping) | 785 | if (m_enableAutoMapping) |
760 | { | 786 | { |
787 | <<<<<<< HEAD | ||
761 | xloc = (xloc % 100) + m_autoMappingX; | 788 | xloc = (xloc % 100) + m_autoMappingX; |
762 | yloc = (yloc % 100) + m_autoMappingY; | 789 | yloc = (yloc % 100) + m_autoMappingY; |
790 | ======= | ||
791 | xloc = (uint)((xloc % 100) + m_autoMappingX); | ||
792 | yloc = (uint)((yloc % 100) + m_autoMappingY); | ||
793 | >>>>>>> avn/ubitvar | ||
763 | } | 794 | } |
764 | 795 | ||
765 | if (((realXLoc == 0) && (realYLoc == 0)) || | 796 | if (((realXLoc == 0) && (realYLoc == 0)) || |