diff options
author | Melanie | 2009-11-04 03:07:21 +0000 |
---|---|---|
committer | Melanie | 2009-11-04 03:07:21 +0000 |
commit | 4d2ecd1236f36e0ce6307689cac6e35baed3b73b (patch) | |
tree | 47d14e6902824b56ded1aecb38fc64710260882e | |
parent | Backport the fixes to WebFetchInventoryDescendents to the UDP (diff) | |
download | opensim-SC-4d2ecd1236f36e0ce6307689cac6e35baed3b73b.zip opensim-SC-4d2ecd1236f36e0ce6307689cac6e35baed3b73b.tar.gz opensim-SC-4d2ecd1236f36e0ce6307689cac6e35baed3b73b.tar.bz2 opensim-SC-4d2ecd1236f36e0ce6307689cac6e35baed3b73b.tar.xz |
Correctly set the totall number of descendents in inventory retrieval
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index bd5df19..479da6d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1278,7 +1278,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1278 | // Handle empty folders | 1278 | // Handle empty folders |
1279 | // | 1279 | // |
1280 | if (totalItems == 0 && totalFolders == 0) | 1280 | if (totalItems == 0 && totalFolders == 0) |
1281 | currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, 0, 0); | 1281 | currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, items.Count + folders.Count, 0, 0); |
1282 | 1282 | ||
1283 | // To preserve SL compatibility, we will NOT combine folders and items in one packet | 1283 | // To preserve SL compatibility, we will NOT combine folders and items in one packet |
1284 | // | 1284 | // |
@@ -1297,7 +1297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1297 | itemsToSend = MAX_ITEMS_PER_PACKET; | 1297 | itemsToSend = MAX_ITEMS_PER_PACKET; |
1298 | } | 1298 | } |
1299 | 1299 | ||
1300 | currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, foldersToSend, itemsToSend); | 1300 | currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, items.Count + folders.Count, foldersToSend, itemsToSend); |
1301 | } | 1301 | } |
1302 | 1302 | ||
1303 | if (foldersToSend-- > 0) | 1303 | if (foldersToSend-- > 0) |
@@ -1405,7 +1405,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1405 | // No need to add CRC | 1405 | // No need to add CRC |
1406 | } | 1406 | } |
1407 | 1407 | ||
1408 | private InventoryDescendentsPacket CreateInventoryDescendentsPacket(UUID ownerID, UUID folderID, int version, int folders, int items) | 1408 | private InventoryDescendentsPacket CreateInventoryDescendentsPacket(UUID ownerID, UUID folderID, int version, int descendents, int folders, int items) |
1409 | { | 1409 | { |
1410 | InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); | 1410 | InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); |
1411 | descend.Header.Zerocoded = true; | 1411 | descend.Header.Zerocoded = true; |
@@ -1413,6 +1413,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1413 | descend.AgentData.OwnerID = ownerID; | 1413 | descend.AgentData.OwnerID = ownerID; |
1414 | descend.AgentData.FolderID = folderID; | 1414 | descend.AgentData.FolderID = folderID; |
1415 | descend.AgentData.Version = version; | 1415 | descend.AgentData.Version = version; |
1416 | descend.AgentData.Descendents = descendents; | ||
1416 | 1417 | ||
1417 | if (folders > 0) | 1418 | if (folders > 0) |
1418 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders]; | 1419 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders]; |