diff options
Diffstat (limited to 'OpenSim/Framework')
4 files changed, 27 insertions, 15 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 3675053..cf6a74d 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -51,12 +51,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
51 | /// </summary> | 51 | /// </summary> |
52 | private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>(); | 52 | private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>(); |
53 | 53 | ||
54 | public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder(); | 54 | /// <summary> |
55 | /// The root library folder. | ||
56 | /// </summary> | ||
57 | public readonly LibraryRootFolder LibraryRoot; | ||
55 | 58 | ||
56 | // Methods | 59 | /// <summary> |
57 | public UserProfileCacheService(CommunicationsManager commsManager) | 60 | /// Constructor |
61 | /// </summary> | ||
62 | /// <param name="commsManager"></param> | ||
63 | /// <param name="libraryRootFolder"></param> | ||
64 | public UserProfileCacheService(CommunicationsManager commsManager, LibraryRootFolder libraryRootFolder) | ||
58 | { | 65 | { |
59 | m_commsManager = commsManager; | 66 | m_commsManager = commsManager; |
67 | LibraryRoot = libraryRootFolder; | ||
60 | } | 68 | } |
61 | 69 | ||
62 | /// <summary> | 70 | /// <summary> |
@@ -293,10 +301,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
293 | // FIXME MAYBE: We're not handling sortOrder! | 301 | // FIXME MAYBE: We're not handling sortOrder! |
294 | 302 | ||
295 | InventoryFolderImpl fold = null; | 303 | InventoryFolderImpl fold = null; |
296 | if ((fold = libraryRoot.FindFolder(folderID)) != null) | 304 | if ((fold = LibraryRoot.FindFolder(folderID)) != null) |
297 | { | 305 | { |
298 | remoteClient.SendInventoryFolderDetails( | 306 | remoteClient.SendInventoryFolderDetails( |
299 | libraryRoot.Owner, folderID, fold.RequestListOfItems(), | 307 | LibraryRoot.Owner, folderID, fold.RequestListOfItems(), |
300 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 308 | fold.RequestListOfFolders(), fetchFolders, fetchItems); |
301 | 309 | ||
302 | return; | 310 | return; |
@@ -337,7 +345,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
337 | // FIXME MAYBE: We're not handling sortOrder! | 345 | // FIXME MAYBE: We're not handling sortOrder! |
338 | 346 | ||
339 | InventoryFolderImpl fold; | 347 | InventoryFolderImpl fold; |
340 | if ((fold = libraryRoot.FindFolder(folderID)) != null) | 348 | if ((fold = LibraryRoot.FindFolder(folderID)) != null) |
341 | { | 349 | { |
342 | return fold.RequestListOfItems(); | 350 | return fold.RequestListOfItems(); |
343 | } | 351 | } |
@@ -428,7 +436,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
428 | 436 | ||
429 | public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID) | 437 | public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID) |
430 | { | 438 | { |
431 | if (ownerID == libraryRoot.Owner) | 439 | if (ownerID == LibraryRoot.Owner) |
432 | { | 440 | { |
433 | //Console.WriteLine("request info for library item"); | 441 | //Console.WriteLine("request info for library item"); |
434 | 442 | ||
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 5bed282..198bd83 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications | |||
112 | /// <param name="assetCache"></param> | 112 | /// <param name="assetCache"></param> |
113 | /// <param name="dumpAssetsToFile"></param> | 113 | /// <param name="dumpAssetsToFile"></param> |
114 | public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, | 114 | public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, |
115 | bool dumpAssetsToFile) | 115 | bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder) |
116 | { | 116 | { |
117 | m_networkServersInfo = serversInfo; | 117 | m_networkServersInfo = serversInfo; |
118 | m_assetCache = assetCache; | 118 | m_assetCache = assetCache; |
119 | m_userProfileCacheService = new UserProfileCacheService(this); | 119 | m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder); |
120 | // m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile); | 120 | // m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile); |
121 | } | 121 | } |
122 | 122 | ||
@@ -356,7 +356,7 @@ namespace OpenSim.Framework.Communications | |||
356 | 356 | ||
357 | public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) | 357 | public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) |
358 | { | 358 | { |
359 | if (uuid == m_userProfileCacheService.libraryRoot.Owner) | 359 | if (uuid == m_userProfileCacheService.LibraryRoot.Owner) |
360 | { | 360 | { |
361 | remote_client.SendNameReply(uuid, "Mr", "OpenSim"); | 361 | remote_client.SendNameReply(uuid, "Mr", "OpenSim"); |
362 | } | 362 | } |
@@ -376,7 +376,6 @@ namespace OpenSim.Framework.Communications | |||
376 | string[] returnstring = new string[0]; | 376 | string[] returnstring = new string[0]; |
377 | bool doLookup = false; | 377 | bool doLookup = false; |
378 | 378 | ||
379 | |||
380 | lock (m_nameRequestCache) | 379 | lock (m_nameRequestCache) |
381 | { | 380 | { |
382 | if (m_nameRequestCache.ContainsKey(uuid)) | 381 | if (m_nameRequestCache.ContainsKey(uuid)) |
@@ -405,8 +404,8 @@ namespace OpenSim.Framework.Communications | |||
405 | } | 404 | } |
406 | } | 405 | } |
407 | } | 406 | } |
407 | |||
408 | return returnstring; | 408 | return returnstring; |
409 | |||
410 | } | 409 | } |
411 | 410 | ||
412 | public bool UUIDNameCachedTest(UUID uuid) | 411 | public bool UUIDNameCachedTest(UUID uuid) |
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index 6c5d2e2..f6a2885 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs | |||
@@ -33,6 +33,11 @@ namespace OpenSim.Framework.Communications | |||
33 | public interface IGridServices | 33 | public interface IGridServices |
34 | { | 34 | { |
35 | string gdebugRegionName { get; set; } | 35 | string gdebugRegionName { get; set; } |
36 | |||
37 | /// <summary> | ||
38 | /// If true, then regions will accept logins from the user service. If false, then they will not. | ||
39 | /// </summary> | ||
40 | bool RegionLoginsEnabled { get; set; } | ||
36 | 41 | ||
37 | /// <summary> | 42 | /// <summary> |
38 | /// Register a region with the grid service. | 43 | /// Register a region with the grid service. |
@@ -42,7 +47,7 @@ namespace OpenSim.Framework.Communications | |||
42 | /// <exception cref="System.Exception">Thrown if region registration failed</exception> | 47 | /// <exception cref="System.Exception">Thrown if region registration failed</exception> |
43 | RegionCommsListener RegisterRegion(RegionInfo regionInfos); | 48 | RegionCommsListener RegisterRegion(RegionInfo regionInfos); |
44 | 49 | ||
45 | bool DeregisterRegion(RegionInfo regionInfo); | 50 | bool DeregisterRegion(RegionInfo regionInfo); |
46 | 51 | ||
47 | /// <summary> | 52 | /// <summary> |
48 | /// Get information about the regions neighbouring the given co-ordinates. | 53 | /// Get information about the regions neighbouring the given co-ordinates. |
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index f4c43ef..8d27a23 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -239,8 +239,8 @@ namespace OpenSim.Framework.Communications | |||
239 | catch (Exception e) | 239 | catch (Exception e) |
240 | { | 240 | { |
241 | m_log.ErrorFormat( | 241 | m_log.ErrorFormat( |
242 | "[LOGIN END]: XMLRPC Error retrieving inventory skeleton of agent {0}, {1} - {2}", | 242 | "[LOGIN END]: Error retrieving inventory skeleton of agent {0} - {1}", |
243 | agentID, e.GetType(), e.Message); | 243 | agentID, e); |
244 | 244 | ||
245 | return logResponse.CreateLoginInventoryFailedResponse(); | 245 | return logResponse.CreateLoginInventoryFailedResponse(); |
246 | } | 246 | } |