*Removed GridInfo class as it has been previously replaced with the much better NetworkServersInfo class
*Got the GridServer in OGS1 to go through with registering the region, but the actual storage of the region isnt working right now. **After this is fixed, grid mode should work!Sugilite
parent
898b48464a
commit
e06ffb3981
|
@ -31,16 +31,11 @@ using OpenSim.Framework.Types;
|
|||
|
||||
namespace OpenSim.Framework.Communications
|
||||
{
|
||||
public class GridInfo
|
||||
{
|
||||
public string GridServerURI = "http://grid.deepgrid.com:8001/"; // Temporarily hardcoded.
|
||||
public string GridServerSendKey = "badger";
|
||||
public string GridServerRecvKey = "badger";
|
||||
}
|
||||
|
||||
|
||||
public interface IGridServices
|
||||
{
|
||||
RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo);
|
||||
RegionCommsListener RegisterRegion(RegionInfo regionInfos);
|
||||
List<RegionInfo> RequestNeighbours(RegionInfo regionInfo);
|
||||
RegionInfo RequestNeighbourInfo(ulong regionHandle);
|
||||
List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenSim.Framework.Types
|
|||
attri = configData.GetAttribute("GridServerURL");
|
||||
if (attri == "")
|
||||
{
|
||||
this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
|
||||
this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:13801/");
|
||||
configData.SetAttribute("GridServerURL", this.GridURL);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -217,7 +217,6 @@ namespace OpenSim.Grid.GridServer
|
|||
/// <returns>Startup parameters</returns>
|
||||
public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request)
|
||||
{
|
||||
Console.WriteLine("XMLRPC SIMULATOR LOGIN METHOD CALLED");
|
||||
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
@ -229,7 +228,6 @@ namespace OpenSim.Grid.GridServer
|
|||
Console.WriteLine(requestData.ToString());
|
||||
if (requestData.ContainsKey("UUID"))
|
||||
{
|
||||
Console.WriteLine("...VIA UUID");
|
||||
TheSim = getRegion(new LLUUID((string)requestData["UUID"]));
|
||||
logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID.");
|
||||
}
|
||||
|
@ -248,7 +246,6 @@ namespace OpenSim.Grid.GridServer
|
|||
if (TheSim == null)
|
||||
{
|
||||
//NEW REGION
|
||||
Console.WriteLine("THIS IS A NEW REGION...ADDING");
|
||||
TheSim = new SimProfileData();
|
||||
|
||||
TheSim.regionRecvKey = config.SimRecvKey;
|
||||
|
@ -277,7 +274,23 @@ namespace OpenSim.Grid.GridServer
|
|||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine("ADDED");kvp.Value.AddProfile(TheSim);
|
||||
DataResponse insertResponse = kvp.Value.AddProfile(TheSim);
|
||||
switch(insertResponse)
|
||||
{
|
||||
case DataResponse.RESPONSE_OK:
|
||||
Console.WriteLine("New sim creation successful: " + TheSim.regionName);
|
||||
break;
|
||||
case DataResponse.RESPONSE_ERROR:
|
||||
Console.WriteLine("New sim creation failed (Error): " + TheSim.regionName);
|
||||
break;
|
||||
case DataResponse.RESPONSE_INVALIDCREDENTIALS:
|
||||
Console.WriteLine("New sim creation failed (Invalid Credentials): " + TheSim.regionName);
|
||||
break;
|
||||
case DataResponse.RESPONSE_AUTHREQUIRED:
|
||||
Console.WriteLine("New sim creation failed (Authentication Required): " + TheSim.regionName);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
@ -76,10 +76,11 @@ namespace OpenSim.Grid.GridServer
|
|||
|
||||
private void Work()
|
||||
{
|
||||
m_console.Notice("Enter help for a list of commands\n");
|
||||
|
||||
while (true)
|
||||
{
|
||||
Thread.Sleep(5000);
|
||||
// should flush the DB etc here
|
||||
m_console.MainLogPrompt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +121,7 @@ namespace OpenSim.Grid.GridServer
|
|||
m_gridManager.config = Cfg;
|
||||
|
||||
m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
|
||||
BaseHttpServer httpServer = new BaseHttpServer(8001);
|
||||
BaseHttpServer httpServer = new BaseHttpServer(13801);
|
||||
//GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
|
||||
|
||||
httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod);
|
||||
|
@ -142,9 +143,9 @@ namespace OpenSim.Grid.GridServer
|
|||
//break;
|
||||
|
||||
// lbsa71 : I guess these were never used?
|
||||
//Listener.Prefixes.Add("http://+:8001/gods/");
|
||||
//Listener.Prefixes.Add("http://+:8001/highestuuid/");
|
||||
//Listener.Prefixes.Add("http://+:8001/uuidblocks/");
|
||||
//Listener.Prefixes.Add("http://+:13801/gods/");
|
||||
//Listener.Prefixes.Add("http://+:13801/highestuuid/");
|
||||
//Listener.Prefixes.Add("http://+:13801/uuidblocks/");
|
||||
|
||||
httpServer.Start();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenUser.Config.UserConfigDb4o
|
|||
|
||||
this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
|
||||
|
||||
this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
|
||||
this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:13801/");
|
||||
this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null");
|
||||
this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
/// </summary>
|
||||
/// <param name="regionInfo"></param>
|
||||
/// <returns></returns>
|
||||
public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
|
||||
public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
|
||||
{
|
||||
//Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
|
||||
if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
|
||||
|
|
|
@ -5,9 +5,10 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
{
|
||||
public class CommunicationsOGS1 : CommunicationsManager
|
||||
{
|
||||
private OGS1GridServices gridInterComms = new OGS1GridServices();
|
||||
|
||||
public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo)
|
||||
{
|
||||
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo);
|
||||
GridServer = gridInterComms;
|
||||
InterRegion = gridInterComms;
|
||||
UserServer = new OGS1UserServices(this);
|
||||
|
|
|
@ -18,20 +18,28 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
public class OGS1GridServices : IGridServices, IInterRegionCommunications
|
||||
{
|
||||
public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>();
|
||||
public GridInfo grid;
|
||||
public BaseHttpServer httpListener;
|
||||
public NetworkServersInfo serversInfo;
|
||||
|
||||
public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
|
||||
public OGS1GridServices(NetworkServersInfo servers_info)
|
||||
{
|
||||
serversInfo = servers_info;
|
||||
}
|
||||
|
||||
public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
|
||||
{
|
||||
Hashtable GridParams = new Hashtable();
|
||||
|
||||
grid = gridInfo;
|
||||
|
||||
// Login / Authentication
|
||||
GridParams["authkey"] = gridInfo.GridServerSendKey;
|
||||
|
||||
GridParams["authkey"] = serversInfo.GridSendKey;
|
||||
GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated();
|
||||
GridParams["sim_ip"] = regionInfo.InternalEndPoint.Address.ToString();
|
||||
GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
|
||||
GridParams["region_locx"] = regionInfo.RegionLocX.ToString();
|
||||
GridParams["region_locy"] = regionInfo.RegionLocY.ToString();
|
||||
GridParams["sim_name"] = regionInfo.RegionName;
|
||||
|
||||
// Package into an XMLRPC Request
|
||||
ArrayList SendParams = new ArrayList();
|
||||
|
@ -41,7 +49,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
// Send Request
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
|
||||
XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000);
|
||||
XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000);
|
||||
Hashtable GridRespData = (Hashtable)GridResp.Value;
|
||||
|
||||
Hashtable griddatahash = GridRespData;
|
||||
|
@ -149,7 +157,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
IList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
XmlRpcRequest req = new XmlRpcRequest("map_block", parameters);
|
||||
XmlRpcResponse resp = req.Send(grid.GridServerURI, 3000);
|
||||
XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000);
|
||||
Hashtable respData = (Hashtable)resp.Value;
|
||||
return respData;
|
||||
}
|
||||
|
|
|
@ -603,8 +603,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// </summary>
|
||||
public void RegisterRegionWithComms()
|
||||
{
|
||||
GridInfo gridSettings = new GridInfo();
|
||||
this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo, gridSettings);
|
||||
|
||||
this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo);
|
||||
if (this.regionCommsHost != null)
|
||||
{
|
||||
this.regionCommsHost.OnExpectUser += this.NewUserConnection;
|
||||
|
|
Loading…
Reference in New Issue