diff options
author | mingchen | 2007-07-05 15:15:28 +0000 |
---|---|---|
committer | mingchen | 2007-07-05 15:15:28 +0000 |
commit | 583f2a9de8e503773a427facd5f81a82b40bd585 (patch) | |
tree | 35d434db32056e7d0b231f56f2732c031c130a1d /OpenSim/Grid/GridServer/GridManager.cs | |
parent | * Tweaks to Java engine (uses less threads). Added support for OnFrame and On... (diff) | |
download | opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.zip opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.gz opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.bz2 opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.xz |
*Removed SimProfile.cs as it is no longer needed (in favor of SimProfileData)
*Added simulator_data_request XMLRPC method to request data from the grid server about a sim instead of faking its login
*Login is progressing, now just getting an XML error (http://pastebin.com/942515) -- if you can fix this, throw MingChen in IRC a Private Message
Diffstat (limited to 'OpenSim/Grid/GridServer/GridManager.cs')
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 1e457b3..422385d 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -268,6 +268,7 @@ namespace OpenSim.Grid.GridServer | |||
268 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); | 268 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); |
269 | TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; | 269 | TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; |
270 | 270 | ||
271 | Console.WriteLine("NEW SIM: " + TheSim.serverURI); | ||
271 | TheSim.regionName = (string)requestData["sim_name"]; | 272 | TheSim.regionName = (string)requestData["sim_name"]; |
272 | TheSim.UUID = new LLUUID((string)requestData["UUID"]); | 273 | TheSim.UUID = new LLUUID((string)requestData["UUID"]); |
273 | 274 | ||
@@ -376,6 +377,40 @@ namespace OpenSim.Grid.GridServer | |||
376 | return response; | 377 | return response; |
377 | } | 378 | } |
378 | 379 | ||
380 | public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request) | ||
381 | { | ||
382 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
383 | Hashtable responseData = new Hashtable(); | ||
384 | SimProfileData simData = null; | ||
385 | if (requestData.ContainsKey("region_UUID")) | ||
386 | { | ||
387 | simData = getRegion(new LLUUID((string)requestData["region_UUID"])); | ||
388 | } | ||
389 | else if (requestData.ContainsKey("region_handle")) | ||
390 | { | ||
391 | simData = getRegion(Convert.ToUInt64((string)requestData["region_handle"])); | ||
392 | } | ||
393 | |||
394 | if (simData == null) | ||
395 | { | ||
396 | //Sim does not exist | ||
397 | responseData["error"] = "Sim does not exist"; | ||
398 | } | ||
399 | else | ||
400 | { | ||
401 | responseData["sim_ip"] = simData.serverIP; | ||
402 | responseData["sim_port"] = simData.serverPort.ToString(); | ||
403 | responseData["region_locx"] = simData.regionLocX; | ||
404 | responseData["region_locy"] = simData.regionLocY; | ||
405 | responseData["region_UUID"] = simData.UUID.UUID.ToString(); | ||
406 | responseData["region_name"] = simData.regionName; | ||
407 | } | ||
408 | |||
409 | XmlRpcResponse response = new XmlRpcResponse(); | ||
410 | response.Value = responseData; | ||
411 | return response; | ||
412 | } | ||
413 | |||
379 | public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request) | 414 | public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request) |
380 | { | 415 | { |
381 | int xmin=980, ymin=980, xmax=1020, ymax=1020; | 416 | int xmin=980, ymin=980, xmax=1020, ymax=1020; |