* Output XmlRpc error message if user server gets a fault response from the region server on login
* This will make it more obvious if one accidentally starts one's region server in standalone rather than grid mode but then tries to login to a grid (as I am wont to do) * We are now sending back a fault code (-32601) if no xmlrpc method is found rather than an ordinary messageThreadPoolClientBranch
parent
5944d5e7f6
commit
359f84ee43
|
@ -230,6 +230,13 @@ namespace OpenSim.Framework.Servers
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Try all the registered xmlrpc handlers when an xmlrpc request is received.
|
||||||
|
/// Sends back an XMLRPC unknown request response if no handler is registered for the requested method.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="response"></param>
|
||||||
private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response)
|
private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response)
|
||||||
{
|
{
|
||||||
Stream requestStream = request.InputStream;
|
Stream requestStream = request.InputStream;
|
||||||
|
@ -268,12 +275,8 @@ namespace OpenSim.Framework.Servers
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xmlRpcResponse = new XmlRpcResponse();
|
xmlRpcResponse = new XmlRpcResponse();
|
||||||
Hashtable unknownMethodError = new Hashtable();
|
// Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
|
||||||
unknownMethodError["reason"] = "XmlRequest";
|
xmlRpcResponse.SetFault(-32601, String.Format("Requested method [{0}] not found", methodName));
|
||||||
;
|
|
||||||
unknownMethodError["message"] = "Unknown Rpc Request [" + methodName + "]";
|
|
||||||
unknownMethodError["login"] = "false";
|
|
||||||
xmlRpcResponse.Value = unknownMethodError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
|
responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
|
||||||
|
|
|
@ -130,12 +130,19 @@ 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]: Sending expect user call to "
|
m_log.Info("[LOGIN]: Telling "
|
||||||
+ SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
+ SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
|
||||||
SimInfo.regionLocX + "," + SimInfo.regionLocY);
|
SimInfo.regionLocX + "," + SimInfo.regionLocY + " to expect user connection");
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
if (GridResp.IsFault)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}",
|
||||||
|
SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
@ -450,7 +450,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
// Grid Request Processing
|
// Grid Request Processing
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Received from the user server when a user starts logging in. This call allows
|
||||||
|
/// the region to prepare for direct communication from the client. Sends back an empty
|
||||||
|
/// xmlrpc response on completion.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
Loading…
Reference in New Issue