aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/LoginService.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-04 16:22:58 +0000
committerJustin Clarke Casey2008-02-04 16:22:58 +0000
commita1c9349d4765833691e7816d7f4df7bd37b9ee36 (patch)
tree2e108496bc6761f6ed1ec671a97bf6b4ba5e6137 /OpenSim/Framework/Communications/LoginService.cs
parent* Added note in CONTRIBUTORS.txt for _someone/mikkopa - RealXtend (diff)
downloadopensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.zip
opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.gz
opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.bz2
opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.xz
Refactor only: serve stats objects directly through StatsManager singleton
Diffstat (limited to 'OpenSim/Framework/Communications/LoginService.cs')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs18
1 files changed, 6 insertions, 12 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 }