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>0.9.1.1
parent
eabf9a7c04
commit
2f79f463ea
|
@ -71,6 +71,10 @@ namespace OpenSim.Data
|
||||||
{
|
{
|
||||||
RegionData Get(UUID regionID, UUID ScopeID);
|
RegionData Get(UUID regionID, UUID ScopeID);
|
||||||
List<RegionData> Get(string regionName, UUID ScopeID);
|
List<RegionData> Get(string regionName, UUID ScopeID);
|
||||||
|
|
||||||
|
//BA MOD....
|
||||||
|
RegionData GetSpecific(string regionName, UUID ScopeID);
|
||||||
|
|
||||||
RegionData Get(int x, int y, UUID ScopeID);
|
RegionData Get(int x, int y, UUID ScopeID);
|
||||||
List<RegionData> Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID);
|
List<RegionData> Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID);
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,30 @@ namespace OpenSim.Data.MySQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionData Get(int posX, int posY, UUID scopeID)
|
//BA MOD....
|
||||||
|
public RegionData GetSpecific(string regionName, UUID scopeID)
|
||||||
|
{
|
||||||
|
string command = "select * from `" + m_Realm + "` where regionName = ?regionName";
|
||||||
|
if (scopeID != UUID.Zero)
|
||||||
|
command += " and ScopeID = ?scopeID";
|
||||||
|
|
||||||
|
//command += " order by regionName";
|
||||||
|
|
||||||
|
using (MySqlCommand cmd = new MySqlCommand(command))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("?regionName", regionName);
|
||||||
|
cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
|
||||||
|
|
||||||
|
List<RegionData> ret = RunCommand(cmd);
|
||||||
|
if (ret.Count == 0)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return ret[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public RegionData Get(int posX, int posY, UUID scopeID)
|
||||||
{
|
{
|
||||||
/* fixed size regions
|
/* fixed size regions
|
||||||
string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY";
|
string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY";
|
||||||
|
|
|
@ -166,7 +166,13 @@ namespace OpenSim.Data.Null
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID)
|
//BA MOD...
|
||||||
|
public RegionData GetSpecific(string regionName, UUID ScopeID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID)
|
||||||
{
|
{
|
||||||
if (m_useStaticInstance && Instance != this)
|
if (m_useStaticInstance && Instance != this)
|
||||||
return Instance.Get(startX, startY, endX, endY, scopeID);
|
return Instance.Get(startX, startY, endX, endY, scopeID);
|
||||||
|
|
|
@ -114,6 +114,12 @@ namespace OpenSim.Data.PGSQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//BA MOD...
|
||||||
|
public RegionData GetSpecific(string regionName, UUID ScopeID)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public RegionData Get(int posX, int posY, UUID scopeID)
|
public RegionData Get(int posX, int posY, UUID scopeID)
|
||||||
{
|
{
|
||||||
// extend database search for maximum region size area
|
// extend database search for maximum region size area
|
||||||
|
|
|
@ -240,6 +240,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName)
|
||||||
|
{
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
||||||
{
|
{
|
||||||
bool inCache = false;
|
bool inCache = false;
|
||||||
|
|
|
@ -236,6 +236,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName)
|
||||||
|
{
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public GridRegion GetRegionByName(UUID scopeID, string name)
|
public GridRegion GetRegionByName(UUID scopeID, string name)
|
||||||
{
|
{
|
||||||
GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, name);
|
GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, name);
|
||||||
|
|
|
@ -330,6 +330,12 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName)
|
||||||
|
{
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
|
@ -100,6 +100,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
||||||
{
|
{
|
||||||
IPEndPoint ext = regionInfo.ExternalEndPoint;
|
IPEndPoint ext = regionInfo.ExternalEndPoint;
|
||||||
|
@ -245,6 +247,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName)
|
||||||
|
{
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
public GridRegion GetRegionByName(UUID scopeID, string regionName)
|
||||||
{
|
{
|
||||||
List<GridRegion> regions = GetRegionsByName(scopeID, regionName, 1);
|
List<GridRegion> regions = GetRegionsByName(scopeID, regionName, 1);
|
||||||
|
|
|
@ -490,7 +490,18 @@ namespace OpenSim.Services.GridService
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
//BA MOD....
|
||||||
|
public GridRegion GetRegionByNameSpecific(UUID scopeID, string name)
|
||||||
|
{
|
||||||
|
RegionData rdata = m_Database.GetSpecific(name, scopeID);
|
||||||
|
if (rdata != null)
|
||||||
|
{
|
||||||
|
return RegionData2RegionInfo(rdata);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);
|
// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,10 @@ namespace OpenSim.Services.Interfaces
|
||||||
/// <returns>Returns the region information if the name matched. Null otherwise.</returns>
|
/// <returns>Returns the region information if the name matched. Null otherwise.</returns>
|
||||||
GridRegion GetRegionByName(UUID scopeID, string regionName);
|
GridRegion GetRegionByName(UUID scopeID, string regionName);
|
||||||
|
|
||||||
|
|
||||||
|
//BA MOD.....
|
||||||
|
GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get information about regions starting with the provided name.
|
/// Get information about regions starting with the provided name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue