diff options
author | Justin Clarke Casey | 2008-03-28 19:35:01 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-03-28 19:35:01 +0000 |
commit | 0a47a75b8894942e43a132c8479b1b17e7d4e8b5 (patch) | |
tree | 34de4749fe3a83f2335667aabf58537845ecab00 /OpenSim/Framework/Communications | |
parent | * Refactor: Eliminate RequestUsersRoot() redundant method (diff) | |
download | opensim-SC_OLD-0a47a75b8894942e43a132c8479b1b17e7d4e8b5.zip opensim-SC_OLD-0a47a75b8894942e43a132c8479b1b17e7d4e8b5.tar.gz opensim-SC_OLD-0a47a75b8894942e43a132c8479b1b17e7d4e8b5.tar.bz2 opensim-SC_OLD-0a47a75b8894942e43a132c8479b1b17e7d4e8b5.tar.xz |
* Send full inventory folder skeleton to standalone client logins rather than just the root child folders
* This may resolve some current problems with non root child folders on standalone installations.
* A fix for the same problem in grid mode will come soon.
Diffstat (limited to 'OpenSim/Framework/Communications')
5 files changed, 46 insertions, 10 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 077a61d..59e5b6e 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -31,6 +31,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
31 | { | 31 | { |
32 | public class CachedUserInfo | 32 | public class CachedUserInfo |
33 | { | 33 | { |
34 | private static readonly log4net.ILog m_log | ||
35 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
36 | |||
34 | private readonly CommunicationsManager m_parentCommsManager; | 37 | private readonly CommunicationsManager m_parentCommsManager; |
35 | // Fields | 38 | // Fields |
36 | public InventoryFolderImpl RootFolder = null; | 39 | public InventoryFolderImpl RootFolder = null; |
@@ -44,6 +47,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
44 | // Methods | 47 | // Methods |
45 | public void FolderReceive(LLUUID userID, InventoryFolderImpl folderInfo) | 48 | public void FolderReceive(LLUUID userID, InventoryFolderImpl folderInfo) |
46 | { | 49 | { |
50 | //m_log.DebugFormat("[INVENTORY CACHE]: Received folder {0} {1} for user {2}", folderInfo.name, folderInfo.folderID, userID); | ||
51 | |||
47 | if (userID == UserProfile.UUID) | 52 | if (userID == UserProfile.UUID) |
48 | { | 53 | { |
49 | if (RootFolder == null) | 54 | if (RootFolder == null) |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index fcfb53a..67022c7 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
72 | } | 72 | } |
73 | else | 73 | else |
74 | { | 74 | { |
75 | m_log.ErrorFormat("[USERCACHE]: User profile for user {0} not found", userID); | 75 | m_log.ErrorFormat("[USER CACHE]: User profile for user {0} not found", userID); |
76 | } | 76 | } |
77 | } | 77 | } |
78 | } | 78 | } |
@@ -244,15 +244,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
244 | } | 244 | } |
245 | else | 245 | else |
246 | { | 246 | { |
247 | m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name); | 247 | m_log.ErrorFormat("[INVENTORY CACHE]: Could not find root folder for user {0}", remoteClient.Name); |
248 | 248 | ||
249 | return; | 249 | return; |
250 | } | 250 | } |
251 | } | 251 | } |
252 | else | 252 | else |
253 | { | 253 | { |
254 | m_log.ErrorFormat("[INVENTORYCACHE]: " + | 254 | m_log.ErrorFormat("[INVENTORY CACHE]: Could not find user profile for {0} for folder {1}", |
255 | "Could not find user profile for {0} for folder {1}", | ||
256 | remoteClient.Name, folderID); | 255 | remoteClient.Name, folderID); |
257 | 256 | ||
258 | return; | 257 | return; |
@@ -260,8 +259,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
260 | 259 | ||
261 | // If we've reached this point then we couldn't find the folder, even though the client thinks | 260 | // If we've reached this point then we couldn't find the folder, even though the client thinks |
262 | // it exists | 261 | // it exists |
263 | m_log.ErrorFormat("[INVENTORYCACHE]: " + | 262 | m_log.ErrorFormat("[INVENTORY CACHE]: Could not find folder {0} for user {1}", |
264 | "Could not find folder {0} for user {1}", | ||
265 | folderID, remoteClient.Name); | 263 | folderID, remoteClient.Name); |
266 | } | 264 | } |
267 | 265 | ||
@@ -303,14 +301,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
303 | } | 301 | } |
304 | else | 302 | else |
305 | { | 303 | { |
306 | m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", agentID.ToString()); | 304 | m_log.ErrorFormat("[INVENTORY CACHE]: Could not find root folder for user {0}", agentID.ToString()); |
307 | 305 | ||
308 | return new List<InventoryItemBase>(); ; | 306 | return new List<InventoryItemBase>(); ; |
309 | } | 307 | } |
310 | } | 308 | } |
311 | else | 309 | else |
312 | { | 310 | { |
313 | m_log.ErrorFormat("[INVENTORYCACHE]: " + | 311 | m_log.ErrorFormat("[INVENTORY CACHE]: " + |
314 | "Could not find user profile for {0} for folder {1}", | 312 | "Could not find user profile for {0} for folder {1}", |
315 | agentID.ToString(), folderID); | 313 | agentID.ToString(), folderID); |
316 | return new List<InventoryItemBase>(); | 314 | return new List<InventoryItemBase>(); |
@@ -318,7 +316,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
318 | 316 | ||
319 | // If we've reached this point then we couldn't find the folder, even though the client thinks | 317 | // If we've reached this point then we couldn't find the folder, even though the client thinks |
320 | // it exists | 318 | // it exists |
321 | m_log.ErrorFormat("[INVENTORYCACHE]: " + | 319 | m_log.ErrorFormat("[INVENTORY CACHE]: " + |
322 | "Could not find folder {0} for user {1}", | 320 | "Could not find folder {0} for user {1}", |
323 | folderID, agentID.ToString()); | 321 | folderID, agentID.ToString()); |
324 | // } | 322 | // } |
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index bb46777..d824e9d 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs | |||
@@ -87,6 +87,14 @@ namespace OpenSim.Framework.Communications | |||
87 | /// <param name="userID"></param> | 87 | /// <param name="userID"></param> |
88 | /// <returns></returns> | 88 | /// <returns></returns> |
89 | List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID); | 89 | List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID); |
90 | |||
91 | /// <summary> | ||
92 | /// Returns a list of all the folders in a given user's inventory. | ||
93 | /// </summary> | ||
94 | /// <param name="userId"></param> | ||
95 | /// <returns>A flat list of the user's inventory folder tree. | ||
96 | /// Null if there is no inventory for this user</returns> | ||
97 | List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId); | ||
90 | 98 | ||
91 | /// <summary> | 99 | /// <summary> |
92 | /// Returns the named folder in that users inventory, returns null if folder is not found. | 100 | /// Returns the named folder in that users inventory, returns null if folder is not found. |
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 595fa65..d105069 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -108,6 +108,30 @@ namespace OpenSim.Framework.Communications | |||
108 | 108 | ||
109 | return inventoryList; | 109 | return inventoryList; |
110 | } | 110 | } |
111 | |||
112 | // See IInventoryServices | ||
113 | public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) | ||
114 | { | ||
115 | // m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); | ||
116 | |||
117 | List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>(); | ||
118 | |||
119 | InventoryFolderBase rootFolder = RequestRootFolder(userId); | ||
120 | userFolders.Add(rootFolder); | ||
121 | |||
122 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | ||
123 | { | ||
124 | IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.folderID); | ||
125 | userFolders.AddRange(folders); | ||
126 | } | ||
127 | |||
128 | // foreach (InventoryFolderBase folder in userFolders) | ||
129 | // { | ||
130 | // m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); | ||
131 | // } | ||
132 | |||
133 | return userFolders; | ||
134 | } | ||
111 | 135 | ||
112 | // See IInventoryServices | 136 | // See IInventoryServices |
113 | public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder) | 137 | public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder) |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 5ba37e6..332583c 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -43,7 +43,8 @@ namespace OpenSim.Framework.UserManagement | |||
43 | /// </summary> | 43 | /// </summary> |
44 | public abstract class UserManagerBase : IUserService | 44 | public abstract class UserManagerBase : IUserService |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly log4net.ILog m_log |
47 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | 48 | ||
48 | public UserConfig _config; | 49 | public UserConfig _config; |
49 | private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); | 50 | private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); |