mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
* Only allow logins on standalone when the sim has completed it's initial startup (script startup doesn't count here)
* There was a small window where region logins were allowed before modules were loaded - avatars logins that hit this window could have caused bad things to happen. * A similar change will follow for grid mode sometime soon
This commit is contained in:
@@ -51,12 +51,20 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
/// </summary>
|
||||
private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>();
|
||||
|
||||
public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder();
|
||||
/// <summary>
|
||||
/// The root library folder.
|
||||
/// </summary>
|
||||
public readonly LibraryRootFolder LibraryRoot;
|
||||
|
||||
// Methods
|
||||
public UserProfileCacheService(CommunicationsManager commsManager)
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commsManager"></param>
|
||||
/// <param name="libraryRootFolder"></param>
|
||||
public UserProfileCacheService(CommunicationsManager commsManager, LibraryRootFolder libraryRootFolder)
|
||||
{
|
||||
m_commsManager = commsManager;
|
||||
LibraryRoot = libraryRootFolder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -293,10 +301,10 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
// FIXME MAYBE: We're not handling sortOrder!
|
||||
|
||||
InventoryFolderImpl fold = null;
|
||||
if ((fold = libraryRoot.FindFolder(folderID)) != null)
|
||||
if ((fold = LibraryRoot.FindFolder(folderID)) != null)
|
||||
{
|
||||
remoteClient.SendInventoryFolderDetails(
|
||||
libraryRoot.Owner, folderID, fold.RequestListOfItems(),
|
||||
LibraryRoot.Owner, folderID, fold.RequestListOfItems(),
|
||||
fold.RequestListOfFolders(), fetchFolders, fetchItems);
|
||||
|
||||
return;
|
||||
@@ -337,7 +345,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
// FIXME MAYBE: We're not handling sortOrder!
|
||||
|
||||
InventoryFolderImpl fold;
|
||||
if ((fold = libraryRoot.FindFolder(folderID)) != null)
|
||||
if ((fold = LibraryRoot.FindFolder(folderID)) != null)
|
||||
{
|
||||
return fold.RequestListOfItems();
|
||||
}
|
||||
@@ -428,7 +436,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
|
||||
public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
|
||||
{
|
||||
if (ownerID == libraryRoot.Owner)
|
||||
if (ownerID == LibraryRoot.Owner)
|
||||
{
|
||||
//Console.WriteLine("request info for library item");
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications
|
||||
/// <param name="assetCache"></param>
|
||||
/// <param name="dumpAssetsToFile"></param>
|
||||
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache,
|
||||
bool dumpAssetsToFile)
|
||||
bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder)
|
||||
{
|
||||
m_networkServersInfo = serversInfo;
|
||||
m_assetCache = assetCache;
|
||||
m_userProfileCacheService = new UserProfileCacheService(this);
|
||||
m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder);
|
||||
// m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile);
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace OpenSim.Framework.Communications
|
||||
|
||||
public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client)
|
||||
{
|
||||
if (uuid == m_userProfileCacheService.libraryRoot.Owner)
|
||||
if (uuid == m_userProfileCacheService.LibraryRoot.Owner)
|
||||
{
|
||||
remote_client.SendNameReply(uuid, "Mr", "OpenSim");
|
||||
}
|
||||
@@ -376,7 +376,6 @@ namespace OpenSim.Framework.Communications
|
||||
string[] returnstring = new string[0];
|
||||
bool doLookup = false;
|
||||
|
||||
|
||||
lock (m_nameRequestCache)
|
||||
{
|
||||
if (m_nameRequestCache.ContainsKey(uuid))
|
||||
@@ -405,8 +404,8 @@ namespace OpenSim.Framework.Communications
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnstring;
|
||||
|
||||
}
|
||||
|
||||
public bool UUIDNameCachedTest(UUID uuid)
|
||||
|
||||
@@ -33,6 +33,11 @@ namespace OpenSim.Framework.Communications
|
||||
public interface IGridServices
|
||||
{
|
||||
string gdebugRegionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, then regions will accept logins from the user service. If false, then they will not.
|
||||
/// </summary>
|
||||
bool RegionLoginsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Register a region with the grid service.
|
||||
@@ -42,7 +47,7 @@ namespace OpenSim.Framework.Communications
|
||||
/// <exception cref="System.Exception">Thrown if region registration failed</exception>
|
||||
RegionCommsListener RegisterRegion(RegionInfo regionInfos);
|
||||
|
||||
bool DeregisterRegion(RegionInfo regionInfo);
|
||||
bool DeregisterRegion(RegionInfo regionInfo);
|
||||
|
||||
/// <summary>
|
||||
/// Get information about the regions neighbouring the given co-ordinates.
|
||||
|
||||
@@ -239,8 +239,8 @@ namespace OpenSim.Framework.Communications
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[LOGIN END]: XMLRPC Error retrieving inventory skeleton of agent {0}, {1} - {2}",
|
||||
agentID, e.GetType(), e.Message);
|
||||
"[LOGIN END]: Error retrieving inventory skeleton of agent {0} - {1}",
|
||||
agentID, e);
|
||||
|
||||
return logResponse.CreateLoginInventoryFailedResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user