diff options
author | Sean Dague | 2008-04-10 14:37:17 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-10 14:37:17 +0000 |
commit | ef7dfae41c728d10cfe835cb256958c354449f1b (patch) | |
tree | 98affd8fd75500ece10eb471ba405709e2d389f4 /OpenSim/Framework/Communications | |
parent | further renaming of properties for clarity (diff) | |
download | opensim-SC_OLD-ef7dfae41c728d10cfe835cb256958c354449f1b.zip opensim-SC_OLD-ef7dfae41c728d10cfe835cb256958c354449f1b.tar.gz opensim-SC_OLD-ef7dfae41c728d10cfe835cb256958c354449f1b.tar.bz2 opensim-SC_OLD-ef7dfae41c728d10cfe835cb256958c354449f1b.tar.xz |
changing UserAgentData to use properties. This caused more
grief than expected, as monodevelop doesn't like to refactor
properties of properties.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 14 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 62 |
2 files changed, 38 insertions, 38 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 4f314bc..afe7359 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -184,13 +184,13 @@ namespace OpenSim.Framework.UserManagement | |||
184 | else | 184 | else |
185 | { | 185 | { |
186 | // If we already have a session... | 186 | // If we already have a session... |
187 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline) | 187 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.AgentOnline) |
188 | { | 188 | { |
189 | //TODO: The following statements can cause trouble: | 189 | //TODO: The following statements can cause trouble: |
190 | // If agentOnline could not turn from true back to false normally | 190 | // If agentOnline could not turn from true back to false normally |
191 | // because of some problem, for instance, the crashment of server or client, | 191 | // because of some problem, for instance, the crashment of server or client, |
192 | // the user cannot log in any longer. | 192 | // the user cannot log in any longer. |
193 | userProfile.CurrentAgent.agentOnline = false; | 193 | userProfile.CurrentAgent.AgentOnline = false; |
194 | m_userManager.CommitAgent(ref userProfile); | 194 | m_userManager.CommitAgent(ref userProfile); |
195 | 195 | ||
196 | // Reject the login | 196 | // Reject the login |
@@ -225,8 +225,8 @@ namespace OpenSim.Framework.UserManagement | |||
225 | logResponse.Lastname = userProfile.SurName; | 225 | logResponse.Lastname = userProfile.SurName; |
226 | logResponse.Firstname = userProfile.FirstName; | 226 | logResponse.Firstname = userProfile.FirstName; |
227 | logResponse.AgentID = agentID.ToString(); | 227 | logResponse.AgentID = agentID.ToString(); |
228 | logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToString(); | 228 | logResponse.SessionID = userProfile.CurrentAgent.SessionID.ToString(); |
229 | logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToString(); | 229 | logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID.ToString(); |
230 | logResponse.InventoryRoot = InventoryRoot; | 230 | logResponse.InventoryRoot = InventoryRoot; |
231 | logResponse.InventorySkeleton = AgentInventoryArray; | 231 | logResponse.InventorySkeleton = AgentInventoryArray; |
232 | logResponse.InventoryLibrary = GetInventoryLibrary(); | 232 | logResponse.InventoryLibrary = GetInventoryLibrary(); |
@@ -334,7 +334,7 @@ namespace OpenSim.Framework.UserManagement | |||
334 | else | 334 | else |
335 | { | 335 | { |
336 | // If we already have a session... | 336 | // If we already have a session... |
337 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline) | 337 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.AgentOnline) |
338 | { | 338 | { |
339 | userProfile.CurrentAgent = null; | 339 | userProfile.CurrentAgent = null; |
340 | m_userManager.CommitAgent(ref userProfile); | 340 | m_userManager.CommitAgent(ref userProfile); |
@@ -367,8 +367,8 @@ namespace OpenSim.Framework.UserManagement | |||
367 | logResponse.Lastname = userProfile.SurName; | 367 | logResponse.Lastname = userProfile.SurName; |
368 | logResponse.Firstname = userProfile.FirstName; | 368 | logResponse.Firstname = userProfile.FirstName; |
369 | logResponse.AgentID = agentID.ToString(); | 369 | logResponse.AgentID = agentID.ToString(); |
370 | logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToString(); | 370 | logResponse.SessionID = userProfile.CurrentAgent.SessionID.ToString(); |
371 | logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToString(); | 371 | logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID.ToString(); |
372 | logResponse.InventoryRoot = InventoryRoot; | 372 | logResponse.InventoryRoot = InventoryRoot; |
373 | logResponse.InventorySkeleton = AgentInventoryArray; | 373 | logResponse.InventorySkeleton = AgentInventoryArray; |
374 | logResponse.InventoryLibrary = GetInventoryLibrary(); | 374 | logResponse.InventoryLibrary = GetInventoryLibrary(); |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 91c284c..0473701 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -342,7 +342,7 @@ namespace OpenSim.Framework.UserManagement | |||
342 | UserAgentData agent = new UserAgentData(); | 342 | UserAgentData agent = new UserAgentData(); |
343 | 343 | ||
344 | // User connection | 344 | // User connection |
345 | agent.agentOnline = true; | 345 | agent.AgentOnline = true; |
346 | 346 | ||
347 | // Generate sessions | 347 | // Generate sessions |
348 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); | 348 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); |
@@ -351,15 +351,15 @@ namespace OpenSim.Framework.UserManagement | |||
351 | rand.GetBytes(randDataS); | 351 | rand.GetBytes(randDataS); |
352 | rand.GetBytes(randDataSS); | 352 | rand.GetBytes(randDataSS); |
353 | 353 | ||
354 | agent.secureSessionID = new LLUUID(randDataSS, 0); | 354 | agent.SecureSessionID = new LLUUID(randDataSS, 0); |
355 | agent.sessionID = new LLUUID(randDataS, 0); | 355 | agent.SessionID = new LLUUID(randDataS, 0); |
356 | 356 | ||
357 | // Profile UUID | 357 | // Profile UUID |
358 | agent.UUID = profile.ID; | 358 | agent.ProfileID = profile.ID; |
359 | 359 | ||
360 | // Current position (from Home) | 360 | // Current position (from Home) |
361 | agent.currentHandle = profile.HomeRegion; | 361 | agent.CurrentHandle = profile.HomeRegion; |
362 | agent.currentPos = profile.HomeLocation; | 362 | agent.CurrentPos = profile.HomeLocation; |
363 | 363 | ||
364 | // If user specified additional start, use that | 364 | // If user specified additional start, use that |
365 | if (requestData.ContainsKey("start")) | 365 | if (requestData.ContainsKey("start")) |
@@ -367,16 +367,16 @@ namespace OpenSim.Framework.UserManagement | |||
367 | string startLoc = ((string)requestData["start"]).Trim(); | 367 | string startLoc = ((string)requestData["start"]).Trim(); |
368 | if (("last" == startLoc) && (profile.CurrentAgent != null)) | 368 | if (("last" == startLoc) && (profile.CurrentAgent != null)) |
369 | { | 369 | { |
370 | if ((profile.CurrentAgent.currentPos.X > 0) | 370 | if ((profile.CurrentAgent.CurrentPos.X > 0) |
371 | && (profile.CurrentAgent.currentPos.Y > 0) | 371 | && (profile.CurrentAgent.CurrentPos.Y > 0) |
372 | && (profile.CurrentAgent.currentPos.Z > 0) | 372 | && (profile.CurrentAgent.CurrentPos.Z > 0) |
373 | ) | 373 | ) |
374 | { | 374 | { |
375 | // TODO: Right now, currentRegion has not been used in GridServer for requesting region. | 375 | // TODO: Right now, currentRegion has not been used in GridServer for requesting region. |
376 | // TODO: It is only using currentHandle. | 376 | // TODO: It is only using currentHandle. |
377 | agent.currentRegion = profile.CurrentAgent.currentRegion; | 377 | agent.CurrentRegion = profile.CurrentAgent.CurrentRegion; |
378 | agent.currentHandle = profile.CurrentAgent.currentHandle; | 378 | agent.CurrentHandle = profile.CurrentAgent.CurrentHandle; |
379 | agent.currentPos = profile.CurrentAgent.currentPos; | 379 | agent.CurrentPos = profile.CurrentAgent.CurrentPos; |
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
@@ -399,12 +399,12 @@ namespace OpenSim.Framework.UserManagement | |||
399 | } | 399 | } |
400 | 400 | ||
401 | // What time did the user login? | 401 | // What time did the user login? |
402 | agent.loginTime = Util.UnixTimeSinceEpoch(); | 402 | agent.LoginTime = Util.UnixTimeSinceEpoch(); |
403 | agent.logoutTime = 0; | 403 | agent.LogoutTime = 0; |
404 | 404 | ||
405 | // Current location | 405 | // Current location |
406 | agent.regionID = LLUUID.Zero; // Fill in later | 406 | agent.RegionID = LLUUID.Zero; // Fill in later |
407 | agent.currentRegion = LLUUID.Zero; // Fill in later | 407 | agent.CurrentRegion = LLUUID.Zero; // Fill in later |
408 | 408 | ||
409 | profile.CurrentAgent = agent; | 409 | profile.CurrentAgent = agent; |
410 | } | 410 | } |
@@ -437,16 +437,16 @@ namespace OpenSim.Framework.UserManagement | |||
437 | userAgent = userProfile.CurrentAgent; | 437 | userAgent = userProfile.CurrentAgent; |
438 | if (userAgent != null) | 438 | if (userAgent != null) |
439 | { | 439 | { |
440 | userAgent.agentOnline = false; | 440 | userAgent.AgentOnline = false; |
441 | userAgent.logoutTime = Util.UnixTimeSinceEpoch(); | 441 | userAgent.LogoutTime = Util.UnixTimeSinceEpoch(); |
442 | //userAgent.sessionID = LLUUID.Zero; | 442 | //userAgent.sessionID = LLUUID.Zero; |
443 | if (regionid != LLUUID.Zero) | 443 | if (regionid != LLUUID.Zero) |
444 | { | 444 | { |
445 | userAgent.currentRegion = regionid; | 445 | userAgent.CurrentRegion = regionid; |
446 | } | 446 | } |
447 | 447 | ||
448 | userAgent.currentHandle = regionhandle; | 448 | userAgent.CurrentHandle = regionhandle; |
449 | userAgent.currentPos = currentPos; | 449 | userAgent.CurrentPos = currentPos; |
450 | userProfile.CurrentAgent = userAgent; | 450 | userProfile.CurrentAgent = userAgent; |
451 | 451 | ||
452 | CommitAgent(ref userProfile); | 452 | CommitAgent(ref userProfile); |
@@ -468,7 +468,7 @@ namespace OpenSim.Framework.UserManagement | |||
468 | UserAgentData agent = new UserAgentData(); | 468 | UserAgentData agent = new UserAgentData(); |
469 | 469 | ||
470 | // User connection | 470 | // User connection |
471 | agent.agentOnline = true; | 471 | agent.AgentOnline = true; |
472 | 472 | ||
473 | // Generate sessions | 473 | // Generate sessions |
474 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); | 474 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); |
@@ -477,23 +477,23 @@ namespace OpenSim.Framework.UserManagement | |||
477 | rand.GetBytes(randDataS); | 477 | rand.GetBytes(randDataS); |
478 | rand.GetBytes(randDataSS); | 478 | rand.GetBytes(randDataSS); |
479 | 479 | ||
480 | agent.secureSessionID = new LLUUID(randDataSS, 0); | 480 | agent.SecureSessionID = new LLUUID(randDataSS, 0); |
481 | agent.sessionID = new LLUUID(randDataS, 0); | 481 | agent.SessionID = new LLUUID(randDataS, 0); |
482 | 482 | ||
483 | // Profile UUID | 483 | // Profile UUID |
484 | agent.UUID = profile.ID; | 484 | agent.ProfileID = profile.ID; |
485 | 485 | ||
486 | // Current position (from Home) | 486 | // Current position (from Home) |
487 | agent.currentHandle = profile.HomeRegion; | 487 | agent.CurrentHandle = profile.HomeRegion; |
488 | agent.currentPos = profile.HomeLocation; | 488 | agent.CurrentPos = profile.HomeLocation; |
489 | 489 | ||
490 | // What time did the user login? | 490 | // What time did the user login? |
491 | agent.loginTime = Util.UnixTimeSinceEpoch(); | 491 | agent.LoginTime = Util.UnixTimeSinceEpoch(); |
492 | agent.logoutTime = 0; | 492 | agent.LogoutTime = 0; |
493 | 493 | ||
494 | // Current location | 494 | // Current location |
495 | agent.regionID = LLUUID.Zero; // Fill in later | 495 | agent.RegionID = LLUUID.Zero; // Fill in later |
496 | agent.currentRegion = LLUUID.Zero; // Fill in later | 496 | agent.CurrentRegion = LLUUID.Zero; // Fill in later |
497 | 497 | ||
498 | profile.CurrentAgent = agent; | 498 | profile.CurrentAgent = agent; |
499 | } | 499 | } |