diff options
author | lbsa71 | 2007-03-16 21:06:45 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-16 21:06:45 +0000 |
commit | defa10062a13270a7ff8afd728af852a72c936f6 (patch) | |
tree | 0ff3fea6e0afb2608e58053fe274ee81c6287ece | |
parent | * Extracted request-response handling (diff) | |
download | opensim-SC_OLD-defa10062a13270a7ff8afd728af852a72c936f6.zip opensim-SC_OLD-defa10062a13270a7ff8afd728af852a72c936f6.tar.gz opensim-SC_OLD-defa10062a13270a7ff8afd728af852a72c936f6.tar.bz2 opensim-SC_OLD-defa10062a13270a7ff8afd728af852a72c936f6.tar.xz |
* Removed private memeber _login, replaced with local var.
* Removed Random Class, replaced with LLUUID.Random
-rw-r--r-- | src/GridServers/LoginServer.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/GridServers/LoginServer.cs b/src/GridServers/LoginServer.cs index 4efcd51..dbf211d 100644 --- a/src/GridServers/LoginServer.cs +++ b/src/GridServers/LoginServer.cs | |||
@@ -52,13 +52,12 @@ namespace OpenSim.GridServers | |||
52 | { | 52 | { |
53 | _gridServer = gridServer; | 53 | _gridServer = gridServer; |
54 | } | 54 | } |
55 | private Login _login; | 55 | |
56 | private IGridServer _gridServer; | 56 | private IGridServer _gridServer; |
57 | private ushort _loginPort = 8080; | 57 | private ushort _loginPort = 8080; |
58 | public IPAddress clientAddress = IPAddress.Loopback; | 58 | public IPAddress clientAddress = IPAddress.Loopback; |
59 | public IPAddress remoteAddress = IPAddress.Any; | 59 | public IPAddress remoteAddress = IPAddress.Any; |
60 | private Socket loginServer; | 60 | private Socket loginServer; |
61 | private Random RandomClass = new Random(); | ||
62 | private int NumClients; | 61 | private int NumClients; |
63 | private string _defaultResponse; | 62 | private string _defaultResponse; |
64 | 63 | ||
@@ -240,8 +239,7 @@ namespace OpenSim.GridServers | |||
240 | 239 | ||
241 | //create a agent and session LLUUID | 240 | //create a agent and session LLUUID |
242 | Agent = GetAgentId( first, last ); | 241 | Agent = GetAgentId( first, last ); |
243 | int SessionRand = this.RandomClass.Next(1,999); | 242 | Session = LLUUID.Random(); |
244 | Session = new LLUUID("aaaabbbb-0200-"+SessionRand.ToString("0000")+"-8664-58f53e442797"); | ||
245 | 243 | ||
246 | //create some login info | 244 | //create some login info |
247 | Hashtable LoginFlagsHash = new Hashtable(); | 245 | Hashtable LoginFlagsHash = new Hashtable(); |
@@ -284,7 +282,7 @@ namespace OpenSim.GridServers | |||
284 | 282 | ||
285 | CustomiseLoginResponse( responseData, first, last ); | 283 | CustomiseLoginResponse( responseData, first, last ); |
286 | 284 | ||
287 | this._login = new Login(); | 285 | Login _login = new Login(); |
288 | //copy data to login object | 286 | //copy data to login object |
289 | _login.First = first; | 287 | _login.First = first; |
290 | _login.Last = last; | 288 | _login.Last = last; |
@@ -308,10 +306,7 @@ namespace OpenSim.GridServers | |||
308 | 306 | ||
309 | protected virtual LLUUID GetAgentId(string firstName, string lastName) | 307 | protected virtual LLUUID GetAgentId(string firstName, string lastName) |
310 | { | 308 | { |
311 | LLUUID Agent; | 309 | return LLUUID.Random(); |
312 | int AgentRand = this.RandomClass.Next(1,9999); | ||
313 | Agent = new LLUUID("99998888-0100-"+AgentRand.ToString("0000")+"-8ec1-0b1d5cd6aead"); | ||
314 | return Agent; | ||
315 | } | 310 | } |
316 | 311 | ||
317 | protected virtual bool Authenticate(string first, string last, string passwd) | 312 | protected virtual bool Authenticate(string first, string last, string passwd) |