Merge branch 'master' into careminster-presence-refactor
commit
3b50066ceb
|
@ -88,8 +88,6 @@ namespace OpenSim.Framework
|
||||||
// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
|
// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
|
||||||
// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
|
// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
|
||||||
|
|
||||||
private static AvatarWearable[] defaultWearables = null;
|
|
||||||
|
|
||||||
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
||||||
protected List<UUID> m_ids = new List<UUID>();
|
protected List<UUID> m_ids = new List<UUID>();
|
||||||
|
|
||||||
|
@ -221,7 +219,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
|
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
|
||||||
for (int i = 0; i < MAX_WEARABLES; i++)
|
for (int i = 0; i < MAX_WEARABLES; i++)
|
||||||
{
|
{
|
||||||
defaultWearables[i] = new AvatarWearable();
|
defaultWearables[i] = new AvatarWearable();
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
|
m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
|
||||||
m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
|
m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX / Constants.RegionSize, otherRegion.RegionLocY / Constants.RegionSize);
|
||||||
|
|
||||||
m_neighbours[otherRegion.RegionHandle] = otherRegion;
|
m_neighbours[otherRegion.RegionHandle] = otherRegion;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ using OpenSim.Framework;
|
||||||
using OpenSim.Services.Connectors;
|
using OpenSim.Services.Connectors;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Server.Base;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
|
@ -97,9 +98,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty);
|
||||||
|
if (networkConnector == string.Empty)
|
||||||
|
{
|
||||||
|
m_log.Error("[REMOTE GRID CONNECTOR]: Please specify a network connector under [GridService]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object[] args = new Object[] { source };
|
||||||
|
m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args);
|
||||||
|
|
||||||
m_LocalGridService = new LocalGridServicesConnector(source);
|
m_LocalGridService = new LocalGridServicesConnector(source);
|
||||||
m_RemoteGridService = new GridServicesConnector(source);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
||||||
regionimage = regionimage.Replace("-", "");
|
regionimage = regionimage.Replace("-", "");
|
||||||
m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/index.php?method=" + regionimage);
|
m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "index.php?method=" + regionimage);
|
||||||
|
|
||||||
MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
|
MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
|
||||||
MainServer.Instance.AddLLSDHandler(
|
MainServer.Instance.AddLLSDHandler(
|
||||||
|
|
|
@ -836,8 +836,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
uint xcell = (uint)((int)otherRegion.RegionLocX / (int)Constants.RegionSize);
|
uint xcell = (uint)((int)otherRegion.RegionLocX / (int)Constants.RegionSize);
|
||||||
uint ycell = (uint)((int)otherRegion.RegionLocY / (int)Constants.RegionSize);
|
uint ycell = (uint)((int)otherRegion.RegionLocY / (int)Constants.RegionSize);
|
||||||
m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}",
|
//m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}",
|
||||||
RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell);
|
// RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell);
|
||||||
|
|
||||||
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
|
||||||
public virtual string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs();
|
Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs();
|
||||||
Dictionary<string, object> sendData = new Dictionary<string,object>();
|
Dictionary<string, object> sendData = new Dictionary<string,object>();
|
||||||
|
@ -140,7 +140,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return "Error communicating with grid service";
|
return "Error communicating with grid service";
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool DeregisterRegion(UUID regionID)
|
public bool DeregisterRegion(UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
|
public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfos;
|
return rinfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
|
public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual 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>();
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfo;
|
return rinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfos;
|
return rinfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
|
public List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return rinfos;
|
return rinfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual int GetRegionFlags(UUID scopeID, UUID regionID)
|
public int GetRegionFlags(UUID scopeID, UUID regionID)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
|
public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
|
||||||
{
|
{
|
||||||
string uri = region.ServerURI + "/region/" + thisRegion.RegionID + "/";
|
string uri = region.ServerURI + "region/" + thisRegion.RegionID + "/";
|
||||||
//m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
|
//m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
|
||||||
|
|
||||||
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
|
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
|
||||||
|
|
|
@ -51,50 +51,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
/// Connects region registration and neighbor lookups to the SimianGrid
|
/// Connects region registration and neighbor lookups to the SimianGrid
|
||||||
/// backend
|
/// backend
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
public class SimianGridServiceConnector : IGridService
|
||||||
public class SimianGridServiceConnector : IGridService, ISharedRegionModule
|
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private string m_serverUrl = String.Empty;
|
private string m_ServerURI = String.Empty;
|
||||||
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
|
||||||
private bool m_Enabled = false;
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
#region ISharedRegionModule
|
|
||||||
|
|
||||||
public Type ReplaceableInterface { get { return null; } }
|
|
||||||
public void RegionLoaded(Scene scene) { }
|
|
||||||
public void PostInitialise() { }
|
|
||||||
public void Close() { }
|
|
||||||
|
|
||||||
public SimianGridServiceConnector() { }
|
public SimianGridServiceConnector() { }
|
||||||
public string Name { get { return "SimianGridServiceConnector"; } }
|
public SimianGridServiceConnector(string serverURI)
|
||||||
public void AddRegion(Scene scene)
|
|
||||||
{
|
{
|
||||||
if (!m_Enabled)
|
m_ServerURI = serverURI.TrimEnd('/');
|
||||||
return;
|
|
||||||
|
|
||||||
// Every shared region module has to maintain an indepedent list of
|
|
||||||
// currently running regions
|
|
||||||
lock (m_scenes)
|
|
||||||
m_scenes[scene.RegionInfo.RegionID] = scene;
|
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IGridService>(this);
|
|
||||||
}
|
}
|
||||||
public void RemoveRegion(Scene scene)
|
|
||||||
{
|
|
||||||
if (!m_Enabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lock (m_scenes)
|
|
||||||
m_scenes.Remove(scene.RegionInfo.RegionID);
|
|
||||||
|
|
||||||
scene.UnregisterModuleInterface<IGridService>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion ISharedRegionModule
|
|
||||||
|
|
||||||
public SimianGridServiceConnector(IConfigSource source)
|
public SimianGridServiceConnector(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
@ -103,32 +73,29 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["Modules"];
|
CommonInit(source);
|
||||||
if (moduleConfig != null)
|
|
||||||
{
|
|
||||||
string name = moduleConfig.GetString("GridServices", "");
|
|
||||||
if (name == Name)
|
|
||||||
CommonInit(source);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CommonInit(IConfigSource source)
|
private void CommonInit(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig gridConfig = source.Configs["GridService"];
|
IConfig gridConfig = source.Configs["GridService"];
|
||||||
if (gridConfig != null)
|
if (gridConfig == null)
|
||||||
{
|
{
|
||||||
string serviceUrl = gridConfig.GetString("GridServerURI");
|
m_log.Error("[SIMIAN GRID CONNECTOR]: GridService missing from OpenSim.ini");
|
||||||
if (!String.IsNullOrEmpty(serviceUrl))
|
throw new Exception("Grid connector init error");
|
||||||
{
|
|
||||||
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
|
||||||
serviceUrl = serviceUrl + '/';
|
|
||||||
m_serverUrl = serviceUrl;
|
|
||||||
m_Enabled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(m_serverUrl))
|
string serviceUrl = gridConfig.GetString("GridServerURI");
|
||||||
m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector");
|
if (String.IsNullOrEmpty(serviceUrl))
|
||||||
|
{
|
||||||
|
m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService");
|
||||||
|
throw new Exception("Grid connector init error");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
|
||||||
|
serviceUrl = serviceUrl + '/';
|
||||||
|
m_ServerURI = serviceUrl;
|
||||||
|
m_Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IGridService
|
#region IGridService
|
||||||
|
@ -138,11 +105,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
IPEndPoint ext = regionInfo.ExternalEndPoint;
|
IPEndPoint ext = regionInfo.ExternalEndPoint;
|
||||||
if (ext == null) return "Region registration for " + regionInfo.RegionName + " failed: Could not resolve EndPoint";
|
if (ext == null) return "Region registration for " + regionInfo.RegionName + " failed: Could not resolve EndPoint";
|
||||||
// Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
|
// Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
|
||||||
Scene scene;
|
// Scene scene;
|
||||||
if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
|
// if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
|
||||||
UploadMapTile(scene);
|
// UploadMapTile(scene);
|
||||||
else
|
// else
|
||||||
m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
|
// m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
|
||||||
|
|
||||||
Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
|
Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
|
||||||
Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
|
Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
|
||||||
|
@ -173,7 +140,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "ExtraData", OSDParser.SerializeJsonString(extraData) }
|
{ "ExtraData", OSDParser.SerializeJsonString(extraData) }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
else
|
else
|
||||||
|
@ -189,7 +156,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "Enabled", "0" }
|
{ "Enabled", "0" }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
bool success = response["Success"].AsBoolean();
|
bool success = response["Success"].AsBoolean();
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
|
@ -234,9 +201,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "SceneID", regionID.ToString() }
|
{ "SceneID", regionID.ToString() }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region with uuid {0}",regionID.ToString());
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] uuid request successful {0}",response["Name"].AsString());
|
||||||
return ResponseToGridRegion(response);
|
return ResponseToGridRegion(response);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -259,15 +229,18 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "Enabled", "1" }
|
{ "Enabled", "1" }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString());
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] position request successful {0}",response["Name"].AsString());
|
||||||
return ResponseToGridRegion(response);
|
return ResponseToGridRegion(response);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}",
|
// m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}",
|
||||||
// x / Constants.RegionSize, y / Constants.RegionSize);
|
// x / Constants.RegionSize, y / Constants.RegionSize);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -297,9 +270,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
if (maxNumber > 0)
|
if (maxNumber > 0)
|
||||||
requestArgs["MaxNumber"] = maxNumber.ToString();
|
requestArgs["MaxNumber"] = maxNumber.ToString();
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions with name {0}",name);
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] found regions with name {0}",name);
|
||||||
|
|
||||||
OSDArray array = response["Scenes"] as OSDArray;
|
OSDArray array = response["Scenes"] as OSDArray;
|
||||||
if (array != null)
|
if (array != null)
|
||||||
{
|
{
|
||||||
|
@ -330,7 +307,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "Enabled", "1" }
|
{ "Enabled", "1" }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
m_log.WarnFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
OSDArray array = response["Scenes"] as OSDArray;
|
OSDArray array = response["Scenes"] as OSDArray;
|
||||||
|
@ -386,7 +366,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{ "SceneID", regionID.ToString() }
|
{ "SceneID", regionID.ToString() }
|
||||||
};
|
};
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString());
|
||||||
|
|
||||||
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0;
|
return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0;
|
||||||
|
@ -432,7 +414,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
// Make the remote storage request
|
// Make the remote storage request
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl);
|
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
|
||||||
|
|
||||||
HttpWebResponse response = MultipartForm.Post(request, postParameters);
|
HttpWebResponse response = MultipartForm.Post(request, postParameters);
|
||||||
using (Stream responseStream = response.GetResponseStream())
|
using (Stream responseStream = response.GetResponseStream())
|
||||||
|
@ -488,7 +470,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
if (onlyEnabled)
|
if (onlyEnabled)
|
||||||
requestArgs["Enabled"] = "1";
|
requestArgs["Enabled"] = "1";
|
||||||
|
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
return ResponseToGridRegion(response);
|
return ResponseToGridRegion(response);
|
||||||
|
|
|
@ -330,10 +330,12 @@ namespace OpenSim.Services.HypergridService
|
||||||
if (parts.Length < 2)
|
if (parts.Length < 2)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
string addressee = parts[0];
|
char[] trailing_slash = new char[] { '/' };
|
||||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, m_ExternalName);
|
string addressee = parts[0].TrimEnd(trailing_slash);
|
||||||
|
string externalname = m_ExternalName.TrimEnd(trailing_slash);
|
||||||
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname);
|
||||||
|
|
||||||
return string.Equals(addressee, m_ExternalName, StringComparison.OrdinalIgnoreCase);
|
return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
; for the LocalGridServicesConnector which is used by the Remote one
|
; for the LocalGridServicesConnector which is used by the Remote one
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector"
|
||||||
|
|
||||||
[LibraryService]
|
[LibraryService]
|
||||||
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector"
|
||||||
|
|
||||||
; Needed to display non-default map tile images for linked regions
|
; Needed to display non-default map tile images for linked regions
|
||||||
AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector"
|
AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
Include-Common = "config-include/GridCommon.ini"
|
Include-Common = "config-include/GridCommon.ini"
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
GridServices = "SimianGridServiceConnector"
|
GridServices = "RemoteGridServicesConnector"
|
||||||
PresenceServices = "SimianPresenceServiceConnector"
|
PresenceServices = "SimianPresenceServiceConnector"
|
||||||
UserAccountServices = "SimianUserAccountServiceConnector"
|
UserAccountServices = "SimianUserAccountServiceConnector"
|
||||||
AuthenticationServices = "SimianAuthenticationServiceConnector"
|
AuthenticationServices = "SimianAuthenticationServiceConnector"
|
||||||
|
@ -53,7 +53,8 @@
|
||||||
[GridService]
|
[GridService]
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:SimianGridServiceConnector"
|
||||||
|
|
||||||
AllowHypergridMapSearch = true
|
AllowHypergridMapSearch = true
|
||||||
|
|
||||||
[LibraryService]
|
[LibraryService]
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
Include-Common = "config-include/GridCommon.ini"
|
Include-Common = "config-include/GridCommon.ini"
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
GridServices = "SimianGridServiceConnector"
|
GridServices = "RemoteGridServicesConnector"
|
||||||
PresenceServices = "SimianPresenceServiceConnector"
|
PresenceServices = "SimianPresenceServiceConnector"
|
||||||
UserAccountServices = "SimianUserAccountServiceConnector"
|
UserAccountServices = "SimianUserAccountServiceConnector"
|
||||||
AuthenticationServices = "SimianAuthenticationServiceConnector"
|
AuthenticationServices = "SimianAuthenticationServiceConnector"
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
[GridService]
|
[GridService]
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
|
||||||
|
NetworkConnector = "OpenSim.Services.Connectors.dll:SimianGridServiceConnector"
|
||||||
|
|
||||||
[LibraryService]
|
[LibraryService]
|
||||||
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
|
||||||
|
|
Loading…
Reference in New Issue