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.0.8.0.3
parent
7496d0b0f7
commit
df9845a283
|
@ -215,25 +215,17 @@ namespace OpenSim.Services.HypergridService
|
|||
if (suitcase == null)
|
||||
{
|
||||
m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Database.StoreFolder(suitcase);
|
||||
|
||||
// Create System folders
|
||||
CreateSystemFolders(principalID, suitcase.folderID);
|
||||
m_Database.StoreFolder(suitcase);
|
||||
|
||||
SetAsNormalFolder(suitcase);
|
||||
|
||||
return ConvertToOpenSim(suitcase);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return ConvertToOpenSim(suitcase);
|
||||
CreateSystemFolders(principalID, suitcase.folderID);
|
||||
}
|
||||
|
||||
return null;
|
||||
SetAsNormalFolder(suitcase);
|
||||
|
||||
return ConvertToOpenSim(suitcase);
|
||||
}
|
||||
|
||||
protected void CreateSystemFolders(UUID principalID, UUID rootID)
|
||||
|
|
|
@ -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<IUserAgentService>(agentService, args);
|
||||
|
||||
// Get the Hypergrid inventory service (exists only if Hypergrid is enabled)
|
||||
string hgInvService = Util.GetConfigVarFromSections<string>(config, "LocalServiceModule", new string[] { "HGInventoryService" }, String.Empty);
|
||||
if (hgInvService != string.Empty)
|
||||
{
|
||||
Object[] args2 = new Object[] { config, "HGInventoryService" };
|
||||
m_HGInventoryService = ServerUtils.LoadPlugin<IInventoryService>(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<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
|
||||
if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue