diff options
author | Terry | 2019-11-12 11:02:10 -0500 |
---|---|---|
committer | UbitUmarov | 2019-11-14 05:26:54 +0000 |
commit | 2f79f463ea07369f6ec154c67b25705cf1a2a616 (patch) | |
tree | da64db8ae91f5dc6364dfb0f3c2cd1a026432cc2 | |
parent | mantis 8627: handle the case constant compareOp constant on Yengine (diff) | |
download | opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.zip opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.tar.gz opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.tar.bz2 opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.tar.xz |
Attempt to fix the issue where, when logging into the grid, the user supplies a region name, but instead of going to the specific region, they are sent to a region "Like" the one specified.
Signed-off-by: Terry <terry@digiworldz.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
10 files changed, 83 insertions, 3 deletions
diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs index c8e38a4..d67b5fa 100644 --- a/OpenSim/Data/IRegionData.cs +++ b/OpenSim/Data/IRegionData.cs | |||
@@ -71,6 +71,10 @@ namespace OpenSim.Data | |||
71 | { | 71 | { |
72 | RegionData Get(UUID regionID, UUID ScopeID); | 72 | RegionData Get(UUID regionID, UUID ScopeID); |
73 | List<RegionData> Get(string regionName, UUID ScopeID); | 73 | List<RegionData> Get(string regionName, UUID ScopeID); |
74 | |||
75 | //BA MOD.... | ||
76 | RegionData GetSpecific(string regionName, UUID ScopeID); | ||
77 | |||
74 | RegionData Get(int x, int y, UUID ScopeID); | 78 | RegionData Get(int x, int y, UUID ScopeID); |
75 | List<RegionData> Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID); | 79 | List<RegionData> Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID); |
76 | 80 | ||
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 46df421..12064a3 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -81,7 +81,30 @@ namespace OpenSim.Data.MySQL | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | public RegionData Get(int posX, int posY, UUID scopeID) | 84 | //BA MOD.... |
85 | public RegionData GetSpecific(string regionName, UUID scopeID) | ||
86 | { | ||
87 | string command = "select * from `" + m_Realm + "` where regionName = ?regionName"; | ||
88 | if (scopeID != UUID.Zero) | ||
89 | command += " and ScopeID = ?scopeID"; | ||
90 | |||
91 | //command += " order by regionName"; | ||
92 | |||
93 | using (MySqlCommand cmd = new MySqlCommand(command)) | ||
94 | { | ||
95 | cmd.Parameters.AddWithValue("?regionName", regionName); | ||
96 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
97 | |||
98 | List<RegionData> ret = RunCommand(cmd); | ||
99 | if (ret.Count == 0) | ||
100 | return null; | ||
101 | |||
102 | return ret[0]; | ||
103 | } | ||
104 | |||
105 | } | ||
106 | |||
107 | public RegionData Get(int posX, int posY, UUID scopeID) | ||
85 | { | 108 | { |
86 | /* fixed size regions | 109 | /* fixed size regions |
87 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; | 110 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; |
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index 595db2f..a4385fe 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs | |||
@@ -166,7 +166,13 @@ namespace OpenSim.Data.Null | |||
166 | return null; | 166 | return null; |
167 | } | 167 | } |
168 | 168 | ||
169 | public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID) | 169 | //BA MOD... |
170 | public RegionData GetSpecific(string regionName, UUID ScopeID) | ||
171 | { | ||
172 | return null; | ||
173 | } | ||
174 | |||
175 | public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID) | ||
170 | { | 176 | { |
171 | if (m_useStaticInstance && Instance != this) | 177 | if (m_useStaticInstance && Instance != this) |
172 | return Instance.Get(startX, startY, endX, endY, scopeID); | 178 | return Instance.Get(startX, startY, endX, endY, scopeID); |
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs index 1272e37..a5d2266 100644 --- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs +++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs | |||
@@ -114,6 +114,12 @@ namespace OpenSim.Data.PGSQL | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | //BA MOD... | ||
118 | public RegionData GetSpecific(string regionName, UUID ScopeID) | ||
119 | { | ||
120 | return null; | ||
121 | } | ||
122 | |||
117 | public RegionData Get(int posX, int posY, UUID scopeID) | 123 | public RegionData Get(int posX, int posY, UUID scopeID) |
118 | { | 124 | { |
119 | // extend database search for maximum region size area | 125 | // extend database search for maximum region size area |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index d220568..4afd0ac 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | |||
@@ -240,6 +240,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
240 | return rinfo; | 240 | return rinfo; |
241 | } | 241 | } |
242 | 242 | ||
243 | public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) | ||
244 | { | ||
245 | |||
246 | return null; | ||
247 | } | ||
248 | |||
243 | public GridRegion GetRegionByName(UUID scopeID, string regionName) | 249 | public GridRegion GetRegionByName(UUID scopeID, string regionName) |
244 | { | 250 | { |
245 | bool inCache = false; | 251 | bool inCache = false; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index d31c7ad..5359e28 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | |||
@@ -236,6 +236,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
236 | return rinfo; | 236 | return rinfo; |
237 | } | 237 | } |
238 | 238 | ||
239 | public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) | ||
240 | { | ||
241 | |||
242 | return null; | ||
243 | } | ||
244 | |||
239 | public GridRegion GetRegionByName(UUID scopeID, string name) | 245 | public GridRegion GetRegionByName(UUID scopeID, string name) |
240 | { | 246 | { |
241 | GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, name); | 247 | GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, name); |
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index ded7806..e863718 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | |||
@@ -330,6 +330,12 @@ namespace OpenSim.Services.Connectors | |||
330 | return rinfo; | 330 | return rinfo; |
331 | } | 331 | } |
332 | 332 | ||
333 | public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) | ||
334 | { | ||
335 | |||
336 | return null; | ||
337 | } | ||
338 | |||
333 | public GridRegion GetRegionByName(UUID scopeID, string regionName) | 339 | public GridRegion GetRegionByName(UUID scopeID, string regionName) |
334 | { | 340 | { |
335 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 341 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index f8eebbe..04de4d7 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -100,6 +100,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
100 | 100 | ||
101 | #region IGridService | 101 | #region IGridService |
102 | 102 | ||
103 | |||
104 | |||
103 | public string RegisterRegion(UUID scopeID, GridRegion regionInfo) | 105 | public string RegisterRegion(UUID scopeID, GridRegion regionInfo) |
104 | { | 106 | { |
105 | IPEndPoint ext = regionInfo.ExternalEndPoint; | 107 | IPEndPoint ext = regionInfo.ExternalEndPoint; |
@@ -245,6 +247,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
245 | } | 247 | } |
246 | } | 248 | } |
247 | 249 | ||
250 | public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) | ||
251 | { | ||
252 | |||
253 | return null; | ||
254 | } | ||
255 | |||
248 | public GridRegion GetRegionByName(UUID scopeID, string regionName) | 256 | public GridRegion GetRegionByName(UUID scopeID, string regionName) |
249 | { | 257 | { |
250 | List<GridRegion> regions = GetRegionsByName(scopeID, regionName, 1); | 258 | List<GridRegion> regions = GetRegionsByName(scopeID, regionName, 1); |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 40893a9..b672e8c 100755 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -490,7 +490,18 @@ namespace OpenSim.Services.GridService | |||
490 | return null; | 490 | return null; |
491 | } | 491 | } |
492 | 492 | ||
493 | public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber) | 493 | //BA MOD.... |
494 | public GridRegion GetRegionByNameSpecific(UUID scopeID, string name) | ||
495 | { | ||
496 | RegionData rdata = m_Database.GetSpecific(name, scopeID); | ||
497 | if (rdata != null) | ||
498 | { | ||
499 | return RegionData2RegionInfo(rdata); | ||
500 | } | ||
501 | return null; | ||
502 | } | ||
503 | |||
504 | public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber) | ||
494 | { | 505 | { |
495 | // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); | 506 | // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); |
496 | 507 | ||
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index ead5d3c..f832d1d 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -84,6 +84,10 @@ namespace OpenSim.Services.Interfaces | |||
84 | /// <returns>Returns the region information if the name matched. Null otherwise.</returns> | 84 | /// <returns>Returns the region information if the name matched. Null otherwise.</returns> |
85 | GridRegion GetRegionByName(UUID scopeID, string regionName); | 85 | GridRegion GetRegionByName(UUID scopeID, string regionName); |
86 | 86 | ||
87 | |||
88 | //BA MOD..... | ||
89 | GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName); | ||
90 | |||
87 | /// <summary> | 91 | /// <summary> |
88 | /// Get information about regions starting with the provided name. | 92 | /// Get information about regions starting with the provided name. |
89 | /// </summary> | 93 | /// </summary> |