Hypergrid map search back on, this time with a config var in the grid service.

This commit is contained in:
Diva Canto
2010-01-24 16:00:28 -08:00
parent ea3d287f70
commit 8ddf787cfd
3 changed files with 39 additions and 22 deletions

View File

@@ -54,6 +54,7 @@ namespace OpenSim.Services.GridService
protected IAuthenticationService m_AuthenticationService = null;
protected bool m_AllowDuplicateNames = false;
protected bool m_AllowHypergridMapSearch = false;
public GridService(IConfigSource config)
: base(config)
@@ -74,6 +75,7 @@ namespace OpenSim.Services.GridService
m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args);
}
m_AllowDuplicateNames = gridConfig.GetBoolean("AllowDuplicateNames", m_AllowDuplicateNames);
m_AllowHypergridMapSearch = gridConfig.GetBoolean("AllowHypergridMapSearch", m_AllowHypergridMapSearch);
}
if (m_RootInstance == null)
@@ -327,6 +329,13 @@ namespace OpenSim.Services.GridService
}
}
if (m_AllowHypergridMapSearch && rdatas.Count == 0 && name.Contains("."))
{
GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name);
if (r != null)
rinfos.Add(r);
}
return rinfos;
}
@@ -410,9 +419,14 @@ namespace OpenSim.Services.GridService
{
RegionData region = m_Database.Get(regionID, scopeID);
int flags = Convert.ToInt32(region.Data["flags"]);
//m_log.DebugFormat("[GRID SERVICE]: Request for flags of {0}: {1}", regionID, flags);
return flags;
if (region != null)
{
int flags = Convert.ToInt32(region.Data["flags"]);
//m_log.DebugFormat("[GRID SERVICE]: Request for flags of {0}: {1}", regionID, flags);
return flags;
}
else
return -1;
}
private void HandleShowRegion(string module, string[] cmd)