From df9845a283d34c65d47b858a1c45934ee2ea6b3b Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 24 Mar 2014 18:00:59 +0200 Subject: When a user logs-in, automatically create the Suitcase folder This is only done if the Suitcase Inventory Service is used. Previously the Suitcase was created at a later time, which meant that it wasn't shown in the viewer until the viewer was restarted. --- OpenSim/Services/LLLoginService/LLLoginService.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs') diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 46a5c18..d8f036a 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -58,6 +58,7 @@ namespace OpenSim.Services.LLLoginService protected IGridUserService m_GridUserService; protected IAuthenticationService m_AuthenticationService; protected IInventoryService m_InventoryService; + protected IInventoryService m_HGInventoryService; protected IGridService m_GridService; protected IPresenceService m_PresenceService; protected ISimulationService m_LocalSimulationService; @@ -165,6 +166,14 @@ namespace OpenSim.Services.LLLoginService if (agentService != string.Empty) m_UserAgentService = ServerUtils.LoadPlugin(agentService, args); + // Get the Hypergrid inventory service (exists only if Hypergrid is enabled) + string hgInvService = Util.GetConfigVarFromSections(config, "LocalServiceModule", new string[] { "HGInventoryService" }, String.Empty); + if (hgInvService != string.Empty) + { + Object[] args2 = new Object[] { config, "HGInventoryService" }; + m_HGInventoryService = ServerUtils.LoadPlugin(hgInvService, args2); + } + // // deal with the services given as argument // @@ -350,6 +359,13 @@ namespace OpenSim.Services.LLLoginService return LLFailedLoginResponse.InventoryProblem; } + if (m_HGInventoryService != null) + { + // Give the Suitcase service a chance to create the suitcase folder. + // (If we're not using the Suitcase inventory service then this won't do anything.) + m_HGInventoryService.GetRootFolder(account.PrincipalID); + } + List inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) { -- cgit v1.1