From beefbb46d22d318d1964af16b3e4601e7e23709f Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 28 Jan 2008 22:00:38 +0000
Subject: * Add total logouts (and total logins) to server side user stats *
Passing the stats collector through object chains is not ideal - this will
change when more stats come in * This change will need a prebuild
---
OpenSim/Grid/UserServer/Main.cs | 9 ++++-----
OpenSim/Grid/UserServer/UserManager.cs | 13 +++++++++----
2 files changed, 13 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Grid/UserServer')
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 1ae4bee..2650694 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -44,7 +44,6 @@ namespace OpenSim.Grid.UserServer
{
private UserConfig Cfg;
-
public UserManager m_userManager;
public UserLoginService m_loginService;
public MessageServersConnector m_messagesService;
@@ -89,13 +88,13 @@ namespace OpenSim.Grid.UserServer
public void Startup()
{
Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml")));
+
+ m_stats = new UserStatsReporter();
MainLog.Instance.Verbose("REGION", "Establishing data connection");
- m_userManager = new UserManager();
+ m_userManager = new UserManager(m_stats);
m_userManager._config = Cfg;
- m_userManager.AddPlugin(Cfg.DatabaseProvider);
-
- m_stats = new UserStatsReporter();
+ m_userManager.AddPlugin(Cfg.DatabaseProvider);
m_loginService = new UserLoginService(
m_userManager, new LibraryRootFolder(), m_stats, Cfg, Cfg.DefaultStartupMsg);
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 3f2aa5b..778aec1 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -32,16 +32,21 @@ using System.Text.RegularExpressions;
using libsecondlife;
using Nwc.XmlRpc;
using OpenSim.Framework;
+using OpenSim.Framework.Statistics;
using OpenSim.Framework.UserManagement;
namespace OpenSim.Grid.UserServer
{
public class UserManager : UserManagerBase
- {
- public UserManager()
+ {
+ ///
+ /// Constructor.
+ ///
+ /// Can be null if stats collection is not required.
+ ///
+ public UserManager(UserStatsReporter statsCollector) : base(statsCollector)
{
- }
-
+ }
///
/// Deletes an active agent session
--
cgit v1.1