From 342126b7b9ca386f9160daecb51ecc14487a5f9f Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 22 Apr 2009 22:19:43 +0000
Subject: * Resolve http://opensimulator.org/mantis/view.php?id=3509 by putting
some service initialization into CommsManager * What is really needed is a
plugin and interface request system as being done for region modules
---
.../Hypergrid/HGCommunicationsStandalone.cs | 37 +++++++++++++++++-----
.../Communications/Hypergrid/HGUserServices.cs | 8 -----
2 files changed, 29 insertions(+), 16 deletions(-)
(limited to 'OpenSim/Region/Communications/Hypergrid')
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
index b649a91..126f42b 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
@@ -25,32 +25,53 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Communications.Local;
+using OpenSim.Region.Communications.OGS1;
namespace OpenSim.Region.Communications.Hypergrid
{
- public class HGCommunicationsStandalone : CommunicationsLocal
+ public class HGCommunicationsStandalone : CommunicationsManager
{
public HGCommunicationsStandalone(
+ ConfigSettings configSettings,
NetworkServersInfo serversInfo,
BaseHttpServer httpServer,
IAssetCache assetCache,
- IUserService userService,
- IUserAdminService userServiceAdmin,
LocalInventoryService inventoryService,
- HGGridServices gridService, IMessagingService messageService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile)
- : base(serversInfo, httpServer, assetCache, userService, userServiceAdmin, inventoryService, gridService, messageService, libraryRootFolder, dumpAssetsToFile)
- {
- gridService.UserProfileCache = m_userProfileCacheService;
+ HGGridServices gridService,
+ LibraryRootFolder libraryRootFolder,
+ bool dumpAssetsToFile)
+ : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
+ {
+ LocalUserServices localUserService =
+ new LocalUserServices(
+ serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
+ localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource);
+
+ AddInventoryService(inventoryService);
+ m_defaultInventoryHost = inventoryService.Host;
+ m_interServiceInventoryService = inventoryService;
+
m_assetCache = assetCache;
// Let's swap to always be secure access to inventory
AddSecureInventoryService((ISecureInventoryService)inventoryService);
m_inventoryServices = null;
+
+ HGUserServices hgUserService = new HGUserServices(this, localUserService);
+ // This plugin arrangement could eventually be configurable rather than hardcoded here.
+ hgUserService.AddPlugin(new OGS1UserDataPlugin(this));
+
+ m_userService = hgUserService;
+ m_userAdminService = hgUserService;
+ m_avatarService = hgUserService;
+ m_messageService = hgUserService;
+
+ gridService.UserProfileCache = m_userProfileCacheService;
+ m_gridService = gridService;
}
}
}
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
index 25c6341..93d5434 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
@@ -47,7 +47,6 @@ namespace OpenSim.Region.Communications.Hypergrid
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- //private CommunicationsManager m_parent;
//private OGS1UserServices m_remoteUserServices;
private LocalUserServices m_localUserServices;
@@ -64,12 +63,6 @@ namespace OpenSim.Region.Communications.Hypergrid
m_localUserServices = local;
}
- // Called for standalone mode only, to set up the communications manager
- public void SetCommunicationsManager(CommunicationsManager parent)
- {
- m_commsManager = parent;
- }
-
///
/// Get a user agent from the user server
///
@@ -84,7 +77,6 @@ namespace OpenSim.Region.Communications.Hypergrid
return base.GetAgentByUUID(userId);
}
-
///
/// Logs off a user on the user server
///
--
cgit v1.1