diff options
Diffstat (limited to 'OpenSim/Services/InventoryService/InventoryService.cs')
-rw-r--r-- | OpenSim/Services/InventoryService/InventoryService.cs | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index f2a7b41..9dbd591 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs | |||
@@ -46,6 +46,7 @@ namespace OpenSim.Services.InventoryService | |||
46 | 46 | ||
47 | public InventoryService(IConfigSource config) : base(config) | 47 | public InventoryService(IConfigSource config) : base(config) |
48 | { | 48 | { |
49 | m_log.Debug("[INVENTORY SERVICE]: Initialized."); | ||
49 | } | 50 | } |
50 | 51 | ||
51 | #region IInventoryServices methods | 52 | #region IInventoryServices methods |
@@ -57,7 +58,7 @@ namespace OpenSim.Services.InventoryService | |||
57 | 58 | ||
58 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) | 59 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) |
59 | { | 60 | { |
60 | // m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); | 61 | m_log.DebugFormat("[INVENTORY SERVICE]: Getting inventory skeleton for {0}", userId); |
61 | 62 | ||
62 | InventoryFolderBase rootFolder = RequestRootFolder(userId); | 63 | InventoryFolderBase rootFolder = RequestRootFolder(userId); |
63 | 64 | ||
@@ -79,7 +80,7 @@ namespace OpenSim.Services.InventoryService | |||
79 | 80 | ||
80 | // foreach (InventoryFolderBase folder in userFolders) | 81 | // foreach (InventoryFolderBase folder in userFolders) |
81 | // { | 82 | // { |
82 | // m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); | 83 | // m_log.DebugFormat("[INVENTORY SERVICE]: Got folder {0} {1}", folder.name, folder.folderID); |
83 | // } | 84 | // } |
84 | 85 | ||
85 | return userFolders; | 86 | return userFolders; |
@@ -113,7 +114,7 @@ namespace OpenSim.Services.InventoryService | |||
113 | if (null != existingRootFolder) | 114 | if (null != existingRootFolder) |
114 | { | 115 | { |
115 | m_log.WarnFormat( | 116 | m_log.WarnFormat( |
116 | "[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have " | 117 | "[INVENTORY SERVICE]: Did not create a new inventory for user {0} since they already have " |
117 | + "a root inventory folder with id {1}", | 118 | + "a root inventory folder with id {1}", |
118 | user, existingRootFolder.ID); | 119 | user, existingRootFolder.ID); |
119 | } | 120 | } |
@@ -138,7 +139,7 @@ namespace OpenSim.Services.InventoryService | |||
138 | /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns> | 139 | /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns> |
139 | public InventoryCollection GetUserInventory(UUID userID) | 140 | public InventoryCollection GetUserInventory(UUID userID) |
140 | { | 141 | { |
141 | m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Processing request for inventory of {0}", userID); | 142 | m_log.InfoFormat("[INVENTORY SERVICE]: Processing request for inventory of {0}", userID); |
142 | 143 | ||
143 | // Uncomment me to simulate a slow responding inventory server | 144 | // Uncomment me to simulate a slow responding inventory server |
144 | //Thread.Sleep(16000); | 145 | //Thread.Sleep(16000); |
@@ -149,7 +150,7 @@ namespace OpenSim.Services.InventoryService | |||
149 | 150 | ||
150 | if (null == allFolders) | 151 | if (null == allFolders) |
151 | { | 152 | { |
152 | m_log.WarnFormat("[LOCAL INVENTORY SERVICE]: No inventory found for user {0}", userID); | 153 | m_log.WarnFormat("[INVENTORY SERVICE]: No inventory found for user {0}", userID); |
153 | 154 | ||
154 | return invCollection; | 155 | return invCollection; |
155 | } | 156 | } |
@@ -172,16 +173,16 @@ namespace OpenSim.Services.InventoryService | |||
172 | 173 | ||
173 | // foreach (InventoryFolderBase folder in invCollection.Folders) | 174 | // foreach (InventoryFolderBase folder in invCollection.Folders) |
174 | // { | 175 | // { |
175 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); | 176 | // m_log.DebugFormat("[GRID INVENTORY SERVICE]: Sending back folder {0} {1}", folder.Name, folder.ID); |
176 | // } | 177 | // } |
177 | // | 178 | // |
178 | // foreach (InventoryItemBase item in invCollection.Items) | 179 | // foreach (InventoryItemBase item in invCollection.Items) |
179 | // { | 180 | // { |
180 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); | 181 | // m_log.DebugFormat("[GRID INVENTORY SERVICE]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); |
181 | // } | 182 | // } |
182 | 183 | ||
183 | m_log.InfoFormat( | 184 | m_log.InfoFormat( |
184 | "[LOCAL INVENTORY SERVICE]: Sending back inventory response to user {0} containing {1} folders and {2} items", | 185 | "[INVENTORY SERVICE]: Sending back inventory response to user {0} containing {1} folders and {2} items", |
185 | invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); | 186 | invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); |
186 | 187 | ||
187 | return invCollection; | 188 | return invCollection; |
@@ -194,7 +195,7 @@ namespace OpenSim.Services.InventoryService | |||
194 | /// <param name="callback"></param> | 195 | /// <param name="callback"></param> |
195 | public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) | 196 | public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) |
196 | { | 197 | { |
197 | m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); | 198 | m_log.InfoFormat("[INVENTORY SERVICE]: Requesting inventory for user {0}", userID); |
198 | 199 | ||
199 | List<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); | 200 | List<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); |
200 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | 201 | List<InventoryItemBase> items = new List<InventoryItemBase>(); |
@@ -231,15 +232,15 @@ namespace OpenSim.Services.InventoryService | |||
231 | } | 232 | } |
232 | 233 | ||
233 | m_log.InfoFormat( | 234 | m_log.InfoFormat( |
234 | "[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", | 235 | "[INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", |
235 | userID, folders.Count, items.Count); | 236 | userID, folders.Count, items.Count); |
236 | } | 237 | } |
237 | else | 238 | else |
238 | { | 239 | { |
239 | m_log.WarnFormat("[LOCAL INVENTORY SERVICE]: User {0} inventory not available", userID); | 240 | m_log.WarnFormat("[INVENTORY SERVICE]: User {0} inventory not available", userID); |
240 | } | 241 | } |
241 | 242 | ||
242 | callback(folders, items); | 243 | callback.BeginInvoke(folders, items, null, null); |
243 | } | 244 | } |
244 | 245 | ||
245 | public List<InventoryItemBase> GetActiveGestures(UUID userId) | 246 | public List<InventoryItemBase> GetActiveGestures(UUID userId) |
@@ -287,7 +288,7 @@ namespace OpenSim.Services.InventoryService | |||
287 | public virtual bool AddFolder(InventoryFolderBase folder) | 288 | public virtual bool AddFolder(InventoryFolderBase folder) |
288 | { | 289 | { |
289 | m_log.DebugFormat( | 290 | m_log.DebugFormat( |
290 | "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); | 291 | "[INVENTORY SERVICE]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); |
291 | 292 | ||
292 | foreach (IInventoryDataPlugin plugin in m_plugins) | 293 | foreach (IInventoryDataPlugin plugin in m_plugins) |
293 | { | 294 | { |
@@ -302,7 +303,7 @@ namespace OpenSim.Services.InventoryService | |||
302 | public virtual bool UpdateFolder(InventoryFolderBase folder) | 303 | public virtual bool UpdateFolder(InventoryFolderBase folder) |
303 | { | 304 | { |
304 | m_log.DebugFormat( | 305 | m_log.DebugFormat( |
305 | "[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); | 306 | "[INVENTORY SERVICE]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); |
306 | 307 | ||
307 | foreach (IInventoryDataPlugin plugin in m_plugins) | 308 | foreach (IInventoryDataPlugin plugin in m_plugins) |
308 | { | 309 | { |
@@ -317,7 +318,7 @@ namespace OpenSim.Services.InventoryService | |||
317 | public virtual bool MoveFolder(InventoryFolderBase folder) | 318 | public virtual bool MoveFolder(InventoryFolderBase folder) |
318 | { | 319 | { |
319 | m_log.DebugFormat( | 320 | m_log.DebugFormat( |
320 | "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); | 321 | "[INVENTORY SERVICE]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); |
321 | 322 | ||
322 | foreach (IInventoryDataPlugin plugin in m_plugins) | 323 | foreach (IInventoryDataPlugin plugin in m_plugins) |
323 | { | 324 | { |
@@ -332,7 +333,7 @@ namespace OpenSim.Services.InventoryService | |||
332 | public virtual bool AddItem(InventoryItemBase item) | 333 | public virtual bool AddItem(InventoryItemBase item) |
333 | { | 334 | { |
334 | m_log.DebugFormat( | 335 | m_log.DebugFormat( |
335 | "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); | 336 | "[INVENTORY SERVICE]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); |
336 | 337 | ||
337 | foreach (IInventoryDataPlugin plugin in m_plugins) | 338 | foreach (IInventoryDataPlugin plugin in m_plugins) |
338 | { | 339 | { |
@@ -347,7 +348,7 @@ namespace OpenSim.Services.InventoryService | |||
347 | public virtual bool UpdateItem(InventoryItemBase item) | 348 | public virtual bool UpdateItem(InventoryItemBase item) |
348 | { | 349 | { |
349 | m_log.InfoFormat( | 350 | m_log.InfoFormat( |
350 | "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); | 351 | "[INVENTORY SERVICE]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); |
351 | 352 | ||
352 | foreach (IInventoryDataPlugin plugin in m_plugins) | 353 | foreach (IInventoryDataPlugin plugin in m_plugins) |
353 | { | 354 | { |
@@ -362,7 +363,7 @@ namespace OpenSim.Services.InventoryService | |||
362 | public virtual bool DeleteItem(InventoryItemBase item) | 363 | public virtual bool DeleteItem(InventoryItemBase item) |
363 | { | 364 | { |
364 | m_log.InfoFormat( | 365 | m_log.InfoFormat( |
365 | "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); | 366 | "[INVENTORY SERVICE]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); |
366 | 367 | ||
367 | foreach (IInventoryDataPlugin plugin in m_plugins) | 368 | foreach (IInventoryDataPlugin plugin in m_plugins) |
368 | { | 369 | { |
@@ -407,13 +408,13 @@ namespace OpenSim.Services.InventoryService | |||
407 | public virtual bool PurgeFolder(InventoryFolderBase folder) | 408 | public virtual bool PurgeFolder(InventoryFolderBase folder) |
408 | { | 409 | { |
409 | m_log.DebugFormat( | 410 | m_log.DebugFormat( |
410 | "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); | 411 | "[INVENTORY SERVICE]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); |
411 | 412 | ||
412 | List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID); | 413 | List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID); |
413 | 414 | ||
414 | foreach (InventoryFolderBase subFolder in subFolders) | 415 | foreach (InventoryFolderBase subFolder in subFolders) |
415 | { | 416 | { |
416 | // m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); | 417 | // m_log.DebugFormat("[INVENTORY SERVICE]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); |
417 | 418 | ||
418 | foreach (IInventoryDataPlugin plugin in m_plugins) | 419 | foreach (IInventoryDataPlugin plugin in m_plugins) |
419 | { | 420 | { |