aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/SimProfile.cs
diff options
context:
space:
mode:
authorgareth2007-04-11 08:51:39 +0000
committergareth2007-04-11 08:51:39 +0000
commit950389a2633034fa8ff93dfa97dc14db46d40efc (patch)
treedc3b3b79cf90c40eb06be9bfff5cad7f366b6de5 /OpenSim.Framework/SimProfile.cs
parent* nant building again (diff)
downloadopensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.zip
opensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.tar.gz
opensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.tar.bz2
opensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.tar.xz
Added POST handler for /sims/ in the grid server
Removed asset/user config in grid mode in the region server Added "create user" command in the user server console Begun buggy code to send sim details to the grid at startup Drank whole pack of red bull in one night and made stupid jokes in SVN logs and C# comments
Diffstat (limited to 'OpenSim.Framework/SimProfile.cs')
-rw-r--r--OpenSim.Framework/SimProfile.cs35
1 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim.Framework/SimProfile.cs b/OpenSim.Framework/SimProfile.cs
index ac4cf9e..fd130f0 100644
--- a/OpenSim.Framework/SimProfile.cs
+++ b/OpenSim.Framework/SimProfile.cs
@@ -16,11 +16,43 @@ namespace OpenSim.Framework.Sims
16 { 16 {
17 Hashtable GridReqParams = new Hashtable(); 17 Hashtable GridReqParams = new Hashtable();
18 GridReqParams["region_handle"] = region_handle.ToString(); 18 GridReqParams["region_handle"] = region_handle.ToString();
19 GridReqParams["authkey"] = SendKey;
20 ArrayList SendParams = new ArrayList();
21 SendParams.Add(GridReqParams);
22 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
23
24 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
25
26 Hashtable RespData = (Hashtable)GridResp.Value;
27 this.UUID = new LLUUID((string)RespData["UUID"]);
28 this.regionhandle = (ulong)Convert.ToUInt64(RespData["regionhandle"]);
29 this.regionname = (string)RespData["regionname"];
30 this.sim_ip = (string)RespData["sim_ip"];
31 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
32 this.caps_url = (string)RespData["caps_url"];
33 this.RegionLocX = (uint)Convert.ToUInt32(RespData["RegionLocX"]);
34 this.RegionLocY = (uint)Convert.ToUInt32(RespData["RegionLocY"]);
35 this.sendkey = (string)RespData["sendkey"];
36 this.recvkey = (string)RespData["recvkey"];
37 }
38 catch (Exception e)
39 {
40 Console.WriteLine(e.ToString());
41 }
42 return this;
43 }
44
45 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
46 {
47 try
48 {
49 Hashtable GridReqParams = new Hashtable();
50 GridReqParams["UUID"] = UUID.ToString();
19 GridReqParams["caller"] = "userserver"; 51 GridReqParams["caller"] = "userserver";
20 GridReqParams["authkey"] = SendKey; 52 GridReqParams["authkey"] = SendKey;
21 ArrayList SendParams = new ArrayList(); 53 ArrayList SendParams = new ArrayList();
22 SendParams.Add(GridReqParams); 54 SendParams.Add(GridReqParams);
23 XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info", SendParams); 55 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
24 56
25 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000); 57 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
26 58
@@ -42,6 +74,7 @@ namespace OpenSim.Framework.Sims
42 } 74 }
43 return this; 75 return this;
44 } 76 }
77
45 78
46 public SimProfile() 79 public SimProfile()
47 { 80 {