* Updating sugilite userserver with the same patch
* Added expect_user support to sugilite GridComms manager (needs testing to make sure there's no conflict between httpListener daemons)Sugilite
parent
210e7c931f
commit
e21d27c56d
|
@ -3,11 +3,14 @@ using System.Collections.Generic;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
using OpenSim.Servers;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Types;
|
using OpenSim.Framework.Types;
|
||||||
using OpenGrid.Framework.Communications;
|
using OpenGrid.Framework.Communications;
|
||||||
|
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenGrid.Framework.Communications.OGS1
|
namespace OpenGrid.Framework.Communications.OGS1
|
||||||
{
|
{
|
||||||
|
@ -15,6 +18,8 @@ namespace OpenGrid.Framework.Communications.OGS1
|
||||||
{
|
{
|
||||||
public RegionCommsListener listener;
|
public RegionCommsListener listener;
|
||||||
public GridInfo grid;
|
public GridInfo grid;
|
||||||
|
public BaseHttpServer httpListener;
|
||||||
|
private bool initialised = false;
|
||||||
|
|
||||||
public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
|
public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
|
||||||
{
|
{
|
||||||
|
@ -45,10 +50,18 @@ namespace OpenGrid.Framework.Communications.OGS1
|
||||||
OpenSim.Framework.Console.MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
|
OpenSim.Framework.Console.MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//this.neighbours = (ArrayList)GridRespData["neighbours"];
|
|
||||||
|
// Initialise the background listeners
|
||||||
listener = new RegionCommsListener();
|
listener = new RegionCommsListener();
|
||||||
|
|
||||||
|
if (!initialised)
|
||||||
|
{
|
||||||
|
initialised = true;
|
||||||
|
httpListener = new BaseHttpServer(regionInfo.CommsIPListenPort);
|
||||||
|
httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser);
|
||||||
|
httpListener.Start();
|
||||||
|
}
|
||||||
|
|
||||||
return listener;
|
return listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,5 +139,34 @@ namespace OpenGrid.Framework.Communications.OGS1
|
||||||
|
|
||||||
return neighbours;
|
return neighbours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Grid Request Processing
|
||||||
|
public XmlRpcResponse ExpectUser(XmlRpcRequest request)
|
||||||
|
{
|
||||||
|
Hashtable requestData = (Hashtable)request.Params[0];
|
||||||
|
AgentCircuitData agentData = new AgentCircuitData();
|
||||||
|
agentData.SessionID = new LLUUID((string)requestData["session_id"]);
|
||||||
|
agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]);
|
||||||
|
agentData.firstname = (string)requestData["firstname"];
|
||||||
|
agentData.lastname = (string)requestData["lastname"];
|
||||||
|
agentData.AgentID = new LLUUID((string)requestData["agent_id"]);
|
||||||
|
agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
|
||||||
|
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
||||||
|
{
|
||||||
|
agentData.child = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"]));
|
||||||
|
agentData.child = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.listener.TriggerExpectUser((ulong)requestData["regionhandle"], agentData);
|
||||||
|
|
||||||
|
return new XmlRpcResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,10 @@
|
||||||
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
||||||
<Name>OpenSim.Framework</Name>
|
<Name>OpenSim.Framework</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
|
||||||
|
<Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Name>OpenSim.Servers</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
|
<ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
|
||||||
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
|
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
|
||||||
<Name>XMLRPC</Name>
|
<Name>XMLRPC</Name>
|
||||||
|
|
|
@ -87,6 +87,7 @@ namespace OpenGridServices.UserServer
|
||||||
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
|
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
|
||||||
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
|
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
|
||||||
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
|
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
|
||||||
|
SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
|
||||||
ArrayList SendParams = new ArrayList();
|
ArrayList SendParams = new ArrayList();
|
||||||
SendParams.Add(SimParams);
|
SendParams.Add(SimParams);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue