diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 38 |
1 files changed, 36 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"]); |