aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs18
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs15
2 files changed, 8 insertions, 25 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 1707607..865349f 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -46,9 +46,7 @@ namespace OpenSim.Framework.UserManagement
46 { 46 {
47 protected string m_welcomeMessage = "Welcome to OpenSim"; 47 protected string m_welcomeMessage = "Welcome to OpenSim";
48 protected UserManagerBase m_userManager = null; 48 protected UserManagerBase m_userManager = null;
49 protected Mutex m_loginMutex = new Mutex(false); 49 protected Mutex m_loginMutex = new Mutex(false);
50
51 protected UserStatsReporter m_statsCollector;
52 50
53 /// <summary> 51 /// <summary>
54 /// Used during login to send the skeleton of the OpenSim Library to the client. 52 /// Used during login to send the skeleton of the OpenSim Library to the client.
@@ -60,16 +58,12 @@ namespace OpenSim.Framework.UserManagement
60 /// </summary> 58 /// </summary>
61 /// <param name="userManager"></param> 59 /// <param name="userManager"></param>
62 /// <param name="libraryRootFolder"></param> 60 /// <param name="libraryRootFolder"></param>
63 /// <param name="statsCollector">
64 /// An object for collecting statistical information.
65 /// Can be null if statistics are not required</param>
66 /// <param name="welcomeMess"></param> 61 /// <param name="welcomeMess"></param>
67 public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder, 62 public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
68 UserStatsReporter statsCollector, string welcomeMess) 63 string welcomeMess)
69 { 64 {
70 m_userManager = userManager; 65 m_userManager = userManager;
71 m_libraryRootFolder = libraryRootFolder; 66 m_libraryRootFolder = libraryRootFolder;
72 m_statsCollector = statsCollector;
73 67
74 if (welcomeMess != String.Empty) 68 if (welcomeMess != String.Empty)
75 { 69 {
@@ -226,8 +220,8 @@ namespace OpenSim.Framework.UserManagement
226 CommitAgent(ref userProfile); 220 CommitAgent(ref userProfile);
227 221
228 // If we reach this point, then the login has successfully logged onto the grid 222 // If we reach this point, then the login has successfully logged onto the grid
229 if (m_statsCollector != null) 223 if (StatsManager.UserStats != null)
230 m_statsCollector.AddSuccessfulLogin(); 224 StatsManager.UserStats.AddSuccessfulLogin();
231 225
232 return logResponse.ToXmlRpcResponse(); 226 return logResponse.ToXmlRpcResponse();
233 } 227 }
@@ -358,8 +352,8 @@ namespace OpenSim.Framework.UserManagement
358 CommitAgent(ref userProfile); 352 CommitAgent(ref userProfile);
359 353
360 // If we reach this point, then the login has successfully logged onto the grid 354 // If we reach this point, then the login has successfully logged onto the grid
361 if (m_statsCollector != null) 355 if (StatsManager.UserStats != null)
362 m_statsCollector.AddSuccessfulLogin(); 356 StatsManager.UserStats.AddSuccessfulLogin();
363 357
364 return logResponse.ToLLSDResponse(); 358 return logResponse.ToLLSDResponse();
365 } 359 }
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 4967cd9..3b1d837 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -45,17 +45,6 @@ namespace OpenSim.Framework.UserManagement
45 { 45 {
46 public UserConfig _config; 46 public UserConfig _config;
47 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 47 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
48 protected UserStatsReporter _stats;
49
50 /// <summary>
51 /// Constructor.
52 /// </summary>
53 /// <param name="statsCollector">Can be null if stats collection is not required.
54 /// </param>
55 public UserManagerBase(UserStatsReporter statsCollector)
56 {
57 _stats = statsCollector;
58 }
59 48
60 /// <summary> 49 /// <summary>
61 /// Adds a new user server plugin - user servers will be requested in the order they were loaded. 50 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
@@ -435,8 +424,8 @@ namespace OpenSim.Framework.UserManagement
435 /// <param name="posz"></param> 424 /// <param name="posz"></param>
436 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 425 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz)
437 { 426 {
438 if (_stats != null) 427 if (StatsManager.UserStats != null)
439 _stats.AddLogout(); 428 StatsManager.UserStats.AddLogout();
440 429
441 UserProfileData userProfile; 430 UserProfileData userProfile;
442 UserAgentData userAgent; 431 UserAgentData userAgent;