diff options
author | Justin Clarke Casey | 2008-02-18 18:48:55 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-18 18:48:55 +0000 |
commit | 359f84ee43d93b45610eb7fab308b8f1675a4d60 (patch) | |
tree | 2471562467aaac5acaf24a39c96f8fd621ec60f1 | |
parent | * Fixed a land manager exception or two with Math.Max(255,Math.Min(0,val)) (diff) | |
download | opensim-SC_OLD-359f84ee43d93b45610eb7fab308b8f1675a4d60.zip opensim-SC_OLD-359f84ee43d93b45610eb7fab308b8f1675a4d60.tar.gz opensim-SC_OLD-359f84ee43d93b45610eb7fab308b8f1675a4d60.tar.bz2 opensim-SC_OLD-359f84ee43d93b45610eb7fab308b8f1675a4d60.tar.xz |
* 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 message
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 15 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 4 |
3 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 6b576e6..7f9e1a1 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -230,6 +230,13 @@ namespace OpenSim.Framework.Servers | |||
230 | return true; | 230 | return true; |
231 | } | 231 | } |
232 | } | 232 | } |
233 | |||
234 | /// <summary> | ||
235 | /// Try all the registered xmlrpc handlers when an xmlrpc request is received. | ||
236 | /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method. | ||
237 | /// </summary> | ||
238 | /// <param name="request"></param> | ||
239 | /// <param name="response"></param> | ||
233 | private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response) | 240 | private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response) |
234 | { | 241 | { |
235 | Stream requestStream = request.InputStream; | 242 | Stream requestStream = request.InputStream; |
@@ -268,12 +275,8 @@ namespace OpenSim.Framework.Servers | |||
268 | else | 275 | else |
269 | { | 276 | { |
270 | xmlRpcResponse = new XmlRpcResponse(); | 277 | xmlRpcResponse = new XmlRpcResponse(); |
271 | Hashtable unknownMethodError = new Hashtable(); | 278 | // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php |
272 | unknownMethodError["reason"] = "XmlRequest"; | 279 | xmlRpcResponse.SetFault(-32601, String.Format("Requested method [{0}] not found", methodName)); |
273 | ; | ||
274 | unknownMethodError["message"] = "Unknown Rpc Request [" + methodName + "]"; | ||
275 | unknownMethodError["login"] = "false"; | ||
276 | xmlRpcResponse.Value = unknownMethodError; | ||
277 | } | 280 | } |
278 | 281 | ||
279 | responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); | 282 | responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 58e85d8..11eaa5f 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -130,12 +130,19 @@ namespace OpenSim.Grid.UserServer | |||
130 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 130 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
131 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 131 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; |
132 | 132 | ||
133 | m_log.Info("[LOGIN]: Sending expect user call to " | 133 | m_log.Info("[LOGIN]: Telling " |
134 | + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + | 134 | + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + |
135 | SimInfo.regionLocX + "," + SimInfo.regionLocY); | 135 | SimInfo.regionLocX + "," + SimInfo.regionLocY + " to expect user connection"); |
136 | 136 | ||
137 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 137 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
138 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); | 138 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); |
139 | |||
140 | if (GridResp.IsFault) | ||
141 | { | ||
142 | m_log.ErrorFormat( | ||
143 | "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}", | ||
144 | SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString); | ||
145 | } | ||
139 | } | 146 | } |
140 | catch (Exception) | 147 | catch (Exception) |
141 | { | 148 | { |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 0a9a05c..f8cbe0f 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -450,7 +450,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
450 | 450 | ||
451 | // Grid Request Processing | 451 | // Grid Request Processing |
452 | /// <summary> | 452 | /// <summary> |
453 | /// | 453 | /// Received from the user server when a user starts logging in. This call allows |
454 | /// the region to prepare for direct communication from the client. Sends back an empty | ||
455 | /// xmlrpc response on completion. | ||
454 | /// </summary> | 456 | /// </summary> |
455 | /// <param name="request"></param> | 457 | /// <param name="request"></param> |
456 | /// <returns></returns> | 458 | /// <returns></returns> |