* Make RegionProfileData.RequestSimProfileData static
* Minor documentation bitsThreadPoolClientBranch
parent
e292d43b96
commit
b37b71b273
|
@ -182,7 +182,15 @@ namespace OpenSim.Framework.Data
|
||||||
return simData;
|
return simData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url,
|
/// <summary>
|
||||||
|
/// Request sim profile information from a grid server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="region_handle"></param>
|
||||||
|
/// <param name="gridserver_url"></param>
|
||||||
|
/// <param name="gridserver_sendkey"></param>
|
||||||
|
/// <param name="gridserver_recvkey"></param>
|
||||||
|
/// <returns>The sim profile. Null if there was a request failure</returns>
|
||||||
|
public static RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url,
|
||||||
string gridserver_sendkey, string gridserver_recvkey)
|
string gridserver_sendkey, string gridserver_recvkey)
|
||||||
{
|
{
|
||||||
Hashtable requestData = new Hashtable();
|
Hashtable requestData = new Hashtable();
|
||||||
|
|
|
@ -503,6 +503,11 @@ namespace OpenSim.Grid.GridServer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns an XML RPC response to a simulator profile request
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request)
|
public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request)
|
||||||
{
|
{
|
||||||
Hashtable requestData = (Hashtable) request.Params[0];
|
Hashtable requestData = (Hashtable) request.Params[0];
|
||||||
|
|
|
@ -72,12 +72,13 @@ namespace OpenSim.Grid.UserServer
|
||||||
bool tryDefault = false;
|
bool tryDefault = false;
|
||||||
//CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one.
|
//CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one.
|
||||||
//CFK: m_log.Info("[LOGIN]: Load information from the gridserver");
|
//CFK: m_log.Info("[LOGIN]: Load information from the gridserver");
|
||||||
RegionProfileData SimInfo = new RegionProfileData();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SimInfo =
|
RegionProfileData SimInfo =
|
||||||
SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL,
|
RegionProfileData.RequestSimProfileData(
|
||||||
m_config.GridSendKey, m_config.GridRecvKey);
|
theUser.currentAgent.currentHandle, m_config.GridServerURL,
|
||||||
|
m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
|
|
||||||
// Customise the response
|
// Customise the response
|
||||||
//CFK: This is redundant and the next message should always appear.
|
//CFK: This is redundant and the next message should always appear.
|
||||||
|
@ -129,8 +130,9 @@ namespace OpenSim.Grid.UserServer
|
||||||
theUser.currentAgent.currentRegion = SimInfo.UUID;
|
theUser.currentAgent.currentRegion = SimInfo.UUID;
|
||||||
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
|
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
|
||||||
|
|
||||||
m_log.Info("[LOGIN]: " + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
m_log.Info("[LOGIN]: Sending expect user call to "
|
||||||
SimInfo.regionLocX + "," + SimInfo.regionLocY);
|
+ SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
||||||
|
SimInfo.regionLocX + "," + SimInfo.regionLocY);
|
||||||
|
|
||||||
XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
|
XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
|
||||||
XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
|
XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
|
||||||
|
@ -139,6 +141,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
{
|
{
|
||||||
tryDefault = true;
|
tryDefault = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tryDefault)
|
if (tryDefault)
|
||||||
{
|
{
|
||||||
// Send him to default region instead
|
// Send him to default region instead
|
||||||
|
@ -149,12 +152,11 @@ namespace OpenSim.Grid.UserServer
|
||||||
m_log.Warn(
|
m_log.Warn(
|
||||||
"[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString());
|
"[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString());
|
||||||
|
|
||||||
SimInfo = new RegionProfileData();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SimInfo =
|
RegionProfileData SimInfo = RegionProfileData.RequestSimProfileData(
|
||||||
SimInfo.RequestSimProfileData(defaultHandle, m_config.GridServerURL,
|
defaultHandle, m_config.GridServerURL,
|
||||||
m_config.GridSendKey, m_config.GridRecvKey);
|
m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
|
|
||||||
// Customise the response
|
// Customise the response
|
||||||
m_log.Info("[LOGIN]: Home Location");
|
m_log.Info("[LOGIN]: Home Location");
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Contructor. Adds "expect_user" and "check" xmlrpc method handlers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="servers_info"></param>
|
/// <param name="servers_info"></param>
|
||||||
/// <param name="httpServe"></param>
|
/// <param name="httpServe"></param>
|
||||||
|
|
Loading…
Reference in New Issue