diff options
author | Dan Lake | 2012-01-03 16:52:53 -0800 |
---|---|---|
committer | Dan Lake | 2012-01-03 16:52:53 -0800 |
commit | ecf9824b63d181bd4e64bd5cb0ff37b952669bb9 (patch) | |
tree | 269207a773c6bd1fd8383885e0c5649d70b34a62 /OpenSim/Capabilities/Handlers | |
parent | Access to these static methods to serialize objects are useful outside of ser... (diff) | |
parent | Update C5.dll to version 1.1.1 from 1.1.0 (diff) | |
download | opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.zip opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.tar.gz opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.tar.bz2 opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Capabilities/Handlers')
-rw-r--r-- | OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 148 |
1 files changed, 77 insertions, 71 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index e91a4b8..3ce4e66 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | |||
@@ -240,78 +240,84 @@ namespace OpenSim.Capabilities.Handlers | |||
240 | 240 | ||
241 | if (containingFolder != null) | 241 | if (containingFolder != null) |
242 | { | 242 | { |
243 | version = containingFolder.Version; | 243 | // m_log.DebugFormat( |
244 | // "[WEB FETCH INV DESC HANDLER]: Retrieved folder {0} {1} for agent id {2}", | ||
245 | // containingFolder.Name, containingFolder.ID, agentID); | ||
244 | 246 | ||
245 | if (fetchItems) | 247 | version = containingFolder.Version; |
246 | { | 248 | // |
247 | /* | 249 | // if (fetchItems) |
248 | List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>(); | 250 | // { |
249 | 251 | // List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>(); | |
250 | foreach (InventoryItemBase item in contents.Items) | 252 | // |
251 | { | 253 | // foreach (InventoryItemBase item in contents.Items) |
252 | if (item.AssetType == (int)AssetType.Link) | 254 | // { |
253 | { | 255 | // if (item.AssetType == (int)AssetType.Link) |
254 | InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 256 | // { |
255 | 257 | // InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | |
256 | // Take care of genuinely broken links where the target doesn't exist | 258 | // |
257 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, | 259 | // // Take care of genuinely broken links where the target doesn't exist |
258 | // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles | 260 | // // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, |
259 | // rather than having to keep track of every folder requested in the recursion. | 261 | // // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles |
260 | if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link && linkedItem.AssetType == (int)AssetType.Object) | 262 | // // rather than having to keep track of every folder requested in the recursion. |
261 | linkedItemsToAdd.Add(linkedItem); | 263 | // if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) |
262 | } | 264 | // linkedItemsToAdd.Insert(0, linkedItem); |
263 | } | 265 | // } |
264 | 266 | // } | |
265 | foreach (InventoryItemBase linkedItem in linkedItemsToAdd) | 267 | // |
266 | { | 268 | // foreach (InventoryItemBase linkedItem in linkedItemsToAdd) |
267 | m_log.DebugFormat( | 269 | // { |
268 | "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}", | 270 | // m_log.DebugFormat( |
269 | linkedItem.Name, folderID, agentID); | 271 | // "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}", |
270 | 272 | // linkedItem.Name, folderID, agentID); | |
271 | contents.Items.Insert(0, linkedItem); | 273 | // |
272 | } | 274 | // contents.Items.Add(linkedItem); |
273 | */ | 275 | // } |
274 | 276 | // | |
275 | /* | 277 | // // If the folder requested contains links, then we need to send those folders first, otherwise the links |
276 | // If the folder requested contains links, then we need to send those folders first, otherwise the links | 278 | // // will be broken in the viewer. |
277 | // will be broken in the viewer. | 279 | // HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>(); |
278 | HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>(); | 280 | // foreach (InventoryItemBase item in contents.Items) |
279 | foreach (InventoryItemBase item in contents.Items) | 281 | // { |
280 | { | 282 | // if (item.AssetType == (int)AssetType.Link) |
281 | if (item.AssetType == (int)AssetType.Link) | 283 | // { |
282 | { | 284 | // InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); |
283 | InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 285 | // |
284 | 286 | // // Take care of genuinely broken links where the target doesn't exist | |
285 | // Take care of genuinely broken links where the target doesn't exist | 287 | // // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, |
286 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, | 288 | // // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles |
287 | // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles | 289 | // // rather than having to keep track of every folder requested in the recursion. |
288 | // rather than having to keep track of every folder requested in the recursion. | 290 | // if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) |
289 | if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) | 291 | // { |
290 | { | 292 | // // We don't need to send the folder if source and destination of the link are in the same |
291 | // We don't need to send the folder if source and destination of the link are in the same | 293 | // // folder. |
292 | // folder. | 294 | // if (linkedItem.Folder != containingFolder.ID) |
293 | if (linkedItem.Folder != containingFolder.ID) | 295 | // linkedItemFolderIdsToSend.Add(linkedItem.Folder); |
294 | linkedItemFolderIdsToSend.Add(linkedItem.Folder); | 296 | // } |
295 | } | 297 | // } |
296 | } | 298 | // } |
297 | } | 299 | // |
298 | 300 | // foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) | |
299 | foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) | 301 | // { |
300 | { | 302 | // m_log.DebugFormat( |
301 | m_log.DebugFormat( | 303 | // "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}", |
302 | "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}", | 304 | // linkedItemFolderId, folderID, agentID); |
303 | linkedItemFolderId, folderID, agentID); | 305 | // |
304 | 306 | // int dummyVersion; | |
305 | int dummyVersion; | 307 | // InventoryCollection linkedCollection |
306 | InventoryCollection linkedCollection | 308 | // = Fetch( |
307 | = Fetch( | 309 | // agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion); |
308 | agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion); | 310 | // |
309 | 311 | // InventoryFolderBase linkedFolder = new InventoryFolderBase(linkedItemFolderId); | |
310 | contents.Folders.AddRange(linkedCollection.Folders); | 312 | // linkedFolder.Owner = agentID; |
311 | contents.Items.AddRange(linkedCollection.Items); | 313 | // linkedFolder = m_InventoryService.GetFolder(linkedFolder); |
312 | } | 314 | // |
313 | */ | 315 | //// contents.Folders.AddRange(linkedCollection.Folders); |
314 | } | 316 | // |
317 | // contents.Folders.Add(linkedFolder); | ||
318 | // contents.Items.AddRange(linkedCollection.Items); | ||
319 | // } | ||
320 | // } | ||
315 | } | 321 | } |
316 | } | 322 | } |
317 | else | 323 | else |