aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.GridInterfaces
diff options
context:
space:
mode:
authorMW2007-05-16 17:35:27 +0000
committerMW2007-05-16 17:35:27 +0000
commit1e9a0220e69a62dd45b53753537fb4563e50412c (patch)
treebfe79152761b164dbd437b60dc025aa1f0c8c3fc /OpenSim.GridInterfaces
parent* removed unused new-login.dat (diff)
downloadopensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.zip
opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.tar.gz
opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.tar.bz2
opensim-SC_OLD-1e9a0220e69a62dd45b53753537fb4563e50412c.tar.xz
Quite big change to how Sessions/circuits are Authenticated. Seems to work okay but needs a lot more testing.
Diffstat (limited to 'OpenSim.GridInterfaces')
-rw-r--r--OpenSim.GridInterfaces/Remote/RemoteGridServer.cs49
1 files changed, 25 insertions, 24 deletions
diff --git a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
index 56aa002..6a4484f 100644
--- a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
+++ b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
@@ -44,8 +44,8 @@ namespace OpenSim.GridInterfaces.Remote
44 private string GridSendKey; 44 private string GridSendKey;
45 private string GridRecvKey; 45 private string GridRecvKey;
46 private Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>(); 46 private Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
47 private ArrayList simneighbours = new ArrayList(); 47 private ArrayList simneighbours = new ArrayList();
48 private Hashtable griddatahash; 48 private Hashtable griddatahash;
49 49
50 public override Dictionary<uint, AgentCircuitData> agentcircuits 50 public override Dictionary<uint, AgentCircuitData> agentcircuits
51 { 51 {
@@ -59,7 +59,7 @@ namespace OpenSim.GridInterfaces.Remote
59 set { simneighbours = value; } 59 set { simneighbours = value; }
60 } 60 }
61 61
62 public override Hashtable GridData 62 public override Hashtable GridData
63 { 63 {
64 get { return griddatahash; } 64 get { return griddatahash; }
65 set { griddatahash = value; } 65 set { griddatahash = value; }
@@ -68,34 +68,35 @@ namespace OpenSim.GridInterfaces.Remote
68 68
69 public RemoteGridServer() 69 public RemoteGridServer()
70 { 70 {
71 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Remote Grid Server class created"); 71 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Remote Grid Server class created");
72 } 72 }
73 73
74 public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) 74 public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port)
75 { 75 {
76 Hashtable GridParams = new Hashtable(); 76 Hashtable GridParams = new Hashtable();
77 GridParams["authkey"]=GridSendKey; 77 GridParams["authkey"] = GridSendKey;
78 GridParams["UUID"]=SimUUID.ToString(); 78 GridParams["UUID"] = SimUUID.ToString();
79 GridParams["sim_ip"]=sim_ip; 79 GridParams["sim_ip"] = sim_ip;
80 GridParams["sim_port"]=sim_port.ToString(); 80 GridParams["sim_port"] = sim_port.ToString();
81 ArrayList SendParams = new ArrayList(); 81 ArrayList SendParams = new ArrayList();
82 SendParams.Add(GridParams); 82 SendParams.Add(GridParams);
83 83
84 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); 84 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
85 XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000); 85 XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000);
86 Hashtable GridRespData = (Hashtable)GridResp.Value; 86 Hashtable GridRespData = (Hashtable)GridResp.Value;
87 this.griddatahash=GridRespData; 87 this.griddatahash = GridRespData;
88 88
89 if(GridRespData.ContainsKey("error")) { 89 if (GridRespData.ContainsKey("error"))
90 string errorstring = (string)GridRespData["error"]; 90 {
91 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Error connecting to grid:"); 91 string errorstring = (string)GridRespData["error"];
92 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,errorstring); 92 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "Error connecting to grid:");
93 return false; 93 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, errorstring);
94 } 94 return false;
95 this.neighbours = (ArrayList)GridRespData["neighbours"]; 95 }
96 Console.WriteLine(simneighbours.Count); 96 this.neighbours = (ArrayList)GridRespData["neighbours"];
97 return true; 97 Console.WriteLine(simneighbours.Count);
98 } 98 return true;
99 }
99 100
100 public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) 101 public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode)
101 { 102 {
@@ -120,7 +121,7 @@ namespace OpenSim.GridInterfaces.Remote
120 user.LoginInfo.Agent = agentID; 121 user.LoginInfo.Agent = agentID;
121 user.LoginInfo.Session = sessionID; 122 user.LoginInfo.Session = sessionID;
122 user.LoginInfo.SecureSession = validcircuit.SecureSessionID; 123 user.LoginInfo.SecureSession = validcircuit.SecureSessionID;
123 user.LoginInfo.First = validcircuit.firstname; 124 user.LoginInfo.First = validcircuit.firstname;
124 user.LoginInfo.Last = validcircuit.lastname; 125 user.LoginInfo.Last = validcircuit.lastname;
125 } 126 }
126 else 127 else