diff options
16 files changed, 140 insertions, 175 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 204603d..3c3c247 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1052,7 +1052,7 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1052 | { | 1052 | { |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems) | 1055 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) |
1056 | { | 1056 | { |
1057 | // Need to translate to MXP somehow | 1057 | // Need to translate to MXP somehow |
1058 | } | 1058 | } |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 4a54c67..81ebf31 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -606,7 +606,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
606 | throw new System.NotImplementedException(); | 606 | throw new System.NotImplementedException(); |
607 | } | 607 | } |
608 | 608 | ||
609 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems) | 609 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) |
610 | { | 610 | { |
611 | throw new System.NotImplementedException(); | 611 | throw new System.NotImplementedException(); |
612 | } | 612 | } |
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 1dfb2d4..ccfe800 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs | |||
@@ -208,7 +208,7 @@ namespace OpenSim.Framework.Capabilities | |||
208 | // As of RC 1.22.9 of the Linden client this is | 208 | // As of RC 1.22.9 of the Linden client this is |
209 | // supported | 209 | // supported |
210 | 210 | ||
211 | m_capsHandlers["WebFetchInventoryDescendents"] =new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryDescendentsRequest); | 211 | //m_capsHandlers["WebFetchInventoryDescendents"] =new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryDescendentsRequest); |
212 | 212 | ||
213 | // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and | 213 | // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and |
214 | // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires | 214 | // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires |
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index aa71536..6648c36 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -679,7 +679,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
679 | /// <param name="fetchFolders"></param> | 679 | /// <param name="fetchFolders"></param> |
680 | /// <param name="fetchItems"></param> | 680 | /// <param name="fetchItems"></param> |
681 | /// <returns>true if the request was queued or successfully processed, false otherwise</returns> | 681 | /// <returns>true if the request was queued or successfully processed, false otherwise</returns> |
682 | public bool SendInventoryDecendents(IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems) | 682 | public bool SendInventoryDecendents(IClientAPI client, UUID folderID, int version, bool fetchFolders, bool fetchItems) |
683 | { | 683 | { |
684 | if (m_hasReceivedInventory) | 684 | if (m_hasReceivedInventory) |
685 | { | 685 | { |
@@ -693,7 +693,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
693 | 693 | ||
694 | client.SendInventoryFolderDetails( | 694 | client.SendInventoryFolderDetails( |
695 | client.AgentId, folderID, folder.RequestListOfItems(), | 695 | client.AgentId, folderID, folder.RequestListOfItems(), |
696 | folder.RequestListOfFolders(), fetchFolders, fetchItems); | 696 | folder.RequestListOfFolders(), version, fetchFolders, fetchItems); |
697 | 697 | ||
698 | return true; | 698 | return true; |
699 | } | 699 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d304345..0f88b93 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1124,7 +1124,7 @@ namespace OpenSim.Framework | |||
1124 | void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler); | 1124 | void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler); |
1125 | 1125 | ||
1126 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, | 1126 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, |
1127 | List<InventoryFolderBase> folders, bool fetchFolders, | 1127 | List<InventoryFolderBase> folders, int version, bool fetchFolders, |
1128 | bool fetchItems); | 1128 | bool fetchItems); |
1129 | 1129 | ||
1130 | void FlushPrimUpdates(); | 1130 | void FlushPrimUpdates(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index db0c3b8..2da6d98 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1251,7 +1251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1251 | /// <param name="fetchFolders">Do we need to send folder information?</param> | 1251 | /// <param name="fetchFolders">Do we need to send folder information?</param> |
1252 | /// <param name="fetchItems">Do we need to send item information?</param> | 1252 | /// <param name="fetchItems">Do we need to send item information?</param> |
1253 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, | 1253 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, |
1254 | List<InventoryFolderBase> folders, | 1254 | List<InventoryFolderBase> folders, int version, |
1255 | bool fetchFolders, bool fetchItems) | 1255 | bool fetchFolders, bool fetchItems) |
1256 | { | 1256 | { |
1257 | // An inventory descendents packet consists of a single agent section and an inventory details | 1257 | // An inventory descendents packet consists of a single agent section and an inventory details |
@@ -1266,172 +1266,104 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1266 | // 6 to 7 items at a time, so let's stick with 6 | 1266 | // 6 to 7 items at a time, so let's stick with 6 |
1267 | int MAX_ITEMS_PER_PACKET = 6; | 1267 | int MAX_ITEMS_PER_PACKET = 6; |
1268 | 1268 | ||
1269 | //Ckrinke This variable is not used, so comment out to remove the warning from the compiler (3-21-08) | 1269 | int totalItems = fetchItems ? items.Count : 0; |
1270 | //Ckrinke uint FULL_MASK_PERMISSIONS = 2147483647; | 1270 | int totalFolders = fetchFolders ? folders.Count : 0; |
1271 | |||
1272 | int itemsSent = 0; | 1271 | int itemsSent = 0; |
1273 | if (fetchItems) | 1272 | int foldersSent = 0; |
1274 | { | 1273 | int foldersToSend = 0; |
1275 | InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); | 1274 | int itemsToSend = 0; |
1276 | 1275 | ||
1277 | if (items.Count < MAX_ITEMS_PER_PACKET) | 1276 | InventoryDescendentsPacket currentPacket = null; |
1278 | { | ||
1279 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count]; | ||
1280 | } | ||
1281 | else | ||
1282 | { | ||
1283 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[MAX_ITEMS_PER_PACKET]; | ||
1284 | } | ||
1285 | 1277 | ||
1286 | // Descendents must contain the *total* number of descendents (plus folders, whether we | 1278 | // Handle empty folders |
1287 | // fetch them or not), not the number of entries we send in this packet. For consistency, | 1279 | // |
1288 | // I'll use it for folder-requests, too, although I wasn't able to get one with | 1280 | if (totalItems == 0 && totalFolders == 0) |
1289 | // FetchFolders = true. | 1281 | currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, items.Count + folders.Count, 0, 0); |
1290 | // TODO this should be checked with FetchFolders = true | 1282 | |
1291 | descend.AgentData.Descendents = items.Count + folders.Count; | 1283 | // To preserve SL compatibility, we will NOT combine folders and items in one packet |
1292 | 1284 | // | |
1293 | int count = 0; | 1285 | while(itemsSent < totalItems || foldersSent < totalFolders) |
1294 | int i = 0; | 1286 | { |
1295 | foreach (InventoryItemBase item in items) | 1287 | if (currentPacket == null) // Start a new packet |
1296 | { | 1288 | { |
1297 | descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); | 1289 | foldersToSend = totalFolders - foldersSent; |
1298 | descend.ItemData[i].ItemID = item.ID; | 1290 | if (foldersToSend > MAX_ITEMS_PER_PACKET) |
1299 | descend.ItemData[i].AssetID = item.AssetID; | 1291 | foldersToSend = MAX_ITEMS_PER_PACKET; |
1300 | descend.ItemData[i].CreatorID = item.CreatorIdAsUuid; | 1292 | |
1301 | descend.ItemData[i].BaseMask = item.BasePermissions; | 1293 | if (foldersToSend == 0) |
1302 | descend.ItemData[i].Description = Util.StringToBytes256(item.Description); | 1294 | { |
1303 | descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; | 1295 | itemsToSend = totalItems - itemsSent; |
1304 | descend.ItemData[i].OwnerMask = item.CurrentPermissions; | 1296 | if (itemsToSend > MAX_ITEMS_PER_PACKET) |
1305 | descend.ItemData[i].FolderID = item.Folder; | 1297 | itemsToSend = MAX_ITEMS_PER_PACKET; |
1306 | descend.ItemData[i].InvType = (sbyte)item.InvType; | ||
1307 | descend.ItemData[i].Name = Util.StringToBytes256(item.Name); | ||
1308 | descend.ItemData[i].NextOwnerMask = item.NextPermissions; | ||
1309 | descend.ItemData[i].OwnerID = item.Owner; | ||
1310 | descend.ItemData[i].Type = (sbyte)item.AssetType; | ||
1311 | |||
1312 | descend.ItemData[i].GroupID = item.GroupID; | ||
1313 | descend.ItemData[i].GroupOwned = item.GroupOwned; | ||
1314 | descend.ItemData[i].GroupMask = item.GroupPermissions; | ||
1315 | descend.ItemData[i].CreationDate = item.CreationDate; | ||
1316 | descend.ItemData[i].SalePrice = item.SalePrice; | ||
1317 | descend.ItemData[i].SaleType = item.SaleType; | ||
1318 | descend.ItemData[i].Flags = item.Flags; | ||
1319 | |||
1320 | descend.ItemData[i].CRC = | ||
1321 | Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType, | ||
1322 | descend.ItemData[i].InvType, descend.ItemData[i].Type, | ||
1323 | descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, | ||
1324 | descend.ItemData[i].SalePrice, | ||
1325 | descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, | ||
1326 | descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, | ||
1327 | descend.ItemData[i].EveryoneMask, | ||
1328 | descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask, | ||
1329 | descend.ItemData[i].GroupMask, item.CurrentPermissions); | ||
1330 | |||
1331 | i++; | ||
1332 | count++; | ||
1333 | itemsSent++; | ||
1334 | if (i == MAX_ITEMS_PER_PACKET) | ||
1335 | { | ||
1336 | descend.Header.Zerocoded = true; | ||
1337 | AddNullFolderBlockToDecendentsPacket(ref descend); | ||
1338 | OutPacket(descend, ThrottleOutPacketType.Asset); | ||
1339 | |||
1340 | if ((items.Count - count) > 0) | ||
1341 | { | ||
1342 | descend = CreateInventoryDescendentsPacket(ownerID, folderID); | ||
1343 | if ((items.Count - count) < MAX_ITEMS_PER_PACKET) | ||
1344 | { | ||
1345 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count - count]; | ||
1346 | } | ||
1347 | else | ||
1348 | { | ||
1349 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[MAX_ITEMS_PER_PACKET]; | ||
1350 | } | ||
1351 | descend.AgentData.Descendents = items.Count + folders.Count; | ||
1352 | i = 0; | ||
1353 | } | ||
1354 | } | 1298 | } |
1355 | } | ||
1356 | 1299 | ||
1357 | if (0 < i && i < MAX_ITEMS_PER_PACKET) | 1300 | currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, items.Count + folders.Count, foldersToSend, itemsToSend); |
1358 | { | ||
1359 | AddNullFolderBlockToDecendentsPacket(ref descend); | ||
1360 | OutPacket(descend, ThrottleOutPacketType.Asset); | ||
1361 | } | 1301 | } |
1362 | } | ||
1363 | |||
1364 | //send subfolders | ||
1365 | if (fetchFolders) | ||
1366 | { | ||
1367 | InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); | ||
1368 | 1302 | ||
1369 | if (folders.Count < MAX_ITEMS_PER_PACKET) | 1303 | if (foldersToSend-- > 0) |
1370 | { | 1304 | currentPacket.FolderData[foldersSent % MAX_ITEMS_PER_PACKET] = CreateFolderDataBlock(folders[foldersSent++]); |
1371 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count]; | 1305 | else if(itemsToSend-- > 0) |
1372 | } | 1306 | currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]); |
1373 | else | 1307 | else |
1374 | { | 1308 | { |
1375 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET]; | 1309 | OutPacket(currentPacket, ThrottleOutPacketType.Asset, false); |
1310 | currentPacket = null; | ||
1376 | } | 1311 | } |
1377 | 1312 | ||
1378 | // Not sure if this scenario ever actually occurs, but nonetheless we include the items | 1313 | } |
1379 | // count even if we're not sending item data for the same reasons as above. | ||
1380 | descend.AgentData.Descendents = items.Count + folders.Count; | ||
1381 | 1314 | ||
1382 | int i = 0; | 1315 | if (currentPacket != null) |
1383 | int count = 0; | 1316 | OutPacket(currentPacket, ThrottleOutPacketType.Asset, false); |
1384 | foreach (InventoryFolderBase folder in folders) | 1317 | } |
1385 | { | ||
1386 | descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock(); | ||
1387 | descend.FolderData[i].FolderID = folder.ID; | ||
1388 | descend.FolderData[i].Name = Util.StringToBytes256(folder.Name); | ||
1389 | descend.FolderData[i].ParentID = folder.ParentID; | ||
1390 | descend.FolderData[i].Type = (sbyte)folder.Type; | ||
1391 | 1318 | ||
1392 | i++; | 1319 | private InventoryDescendentsPacket.FolderDataBlock CreateFolderDataBlock(InventoryFolderBase folder) |
1393 | count++; | 1320 | { |
1394 | itemsSent++; | 1321 | InventoryDescendentsPacket.FolderDataBlock newBlock = new InventoryDescendentsPacket.FolderDataBlock(); |
1395 | if (i == MAX_ITEMS_PER_PACKET) | 1322 | newBlock.FolderID = folder.ID; |
1396 | { | 1323 | newBlock.Name = Util.StringToBytes256(folder.Name); |
1397 | AddNullItemBlockToDescendentsPacket(ref descend); | 1324 | newBlock.ParentID = folder.ParentID; |
1398 | OutPacket(descend, ThrottleOutPacketType.Asset); | 1325 | newBlock.Type = (sbyte)folder.Type; |
1399 | 1326 | ||
1400 | if ((folders.Count - count) > 0) | 1327 | return newBlock; |
1401 | { | 1328 | } |
1402 | descend = CreateInventoryDescendentsPacket(ownerID, folderID); | ||
1403 | if ((folders.Count - count) < MAX_ITEMS_PER_PACKET) | ||
1404 | { | ||
1405 | descend.FolderData = | ||
1406 | new InventoryDescendentsPacket.FolderDataBlock[folders.Count - count]; | ||
1407 | } | ||
1408 | else | ||
1409 | { | ||
1410 | descend.FolderData = | ||
1411 | new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET]; | ||
1412 | } | ||
1413 | descend.AgentData.Descendents = items.Count + folders.Count; | ||
1414 | i = 0; | ||
1415 | } | ||
1416 | } | ||
1417 | } | ||
1418 | 1329 | ||
1419 | if (0 < i && i < MAX_ITEMS_PER_PACKET) | 1330 | private InventoryDescendentsPacket.ItemDataBlock CreateItemDataBlock(InventoryItemBase item) |
1420 | { | 1331 | { |
1421 | AddNullItemBlockToDescendentsPacket(ref descend); | 1332 | InventoryDescendentsPacket.ItemDataBlock newBlock = new InventoryDescendentsPacket.ItemDataBlock(); |
1422 | OutPacket(descend, ThrottleOutPacketType.Asset); | 1333 | newBlock.ItemID = item.ID; |
1423 | } | 1334 | newBlock.AssetID = item.AssetID; |
1424 | } | 1335 | newBlock.CreatorID = item.CreatorIdAsUuid; |
1336 | newBlock.BaseMask = item.BasePermissions; | ||
1337 | newBlock.Description = Util.StringToBytes256(item.Description); | ||
1338 | newBlock.EveryoneMask = item.EveryOnePermissions; | ||
1339 | newBlock.OwnerMask = item.CurrentPermissions; | ||
1340 | newBlock.FolderID = item.Folder; | ||
1341 | newBlock.InvType = (sbyte)item.InvType; | ||
1342 | newBlock.Name = Util.StringToBytes256(item.Name); | ||
1343 | newBlock.NextOwnerMask = item.NextPermissions; | ||
1344 | newBlock.OwnerID = item.Owner; | ||
1345 | newBlock.Type = (sbyte)item.AssetType; | ||
1425 | 1346 | ||
1426 | if (itemsSent == 0) | 1347 | newBlock.GroupID = item.GroupID; |
1427 | { | 1348 | newBlock.GroupOwned = item.GroupOwned; |
1428 | // no items found. | 1349 | newBlock.GroupMask = item.GroupPermissions; |
1429 | InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); | 1350 | newBlock.CreationDate = item.CreationDate; |
1430 | descend.AgentData.Descendents = 0; | 1351 | newBlock.SalePrice = item.SalePrice; |
1431 | AddNullItemBlockToDescendentsPacket(ref descend); | 1352 | newBlock.SaleType = item.SaleType; |
1432 | AddNullFolderBlockToDecendentsPacket(ref descend); | 1353 | newBlock.Flags = item.Flags; |
1433 | OutPacket(descend, ThrottleOutPacketType.Asset); | 1354 | |
1434 | } | 1355 | newBlock.CRC = |
1356 | Helpers.InventoryCRC(newBlock.CreationDate, newBlock.SaleType, | ||
1357 | newBlock.InvType, newBlock.Type, | ||
1358 | newBlock.AssetID, newBlock.GroupID, | ||
1359 | newBlock.SalePrice, | ||
1360 | newBlock.OwnerID, newBlock.CreatorID, | ||
1361 | newBlock.ItemID, newBlock.FolderID, | ||
1362 | newBlock.EveryoneMask, | ||
1363 | newBlock.Flags, newBlock.OwnerMask, | ||
1364 | newBlock.GroupMask, newBlock.NextOwnerMask); | ||
1365 | |||
1366 | return newBlock; | ||
1435 | } | 1367 | } |
1436 | 1368 | ||
1437 | private void AddNullFolderBlockToDecendentsPacket(ref InventoryDescendentsPacket packet) | 1369 | private void AddNullFolderBlockToDecendentsPacket(ref InventoryDescendentsPacket packet) |
@@ -1473,14 +1405,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1473 | // No need to add CRC | 1405 | // No need to add CRC |
1474 | } | 1406 | } |
1475 | 1407 | ||
1476 | private InventoryDescendentsPacket CreateInventoryDescendentsPacket(UUID ownerID, UUID folderID) | 1408 | private InventoryDescendentsPacket CreateInventoryDescendentsPacket(UUID ownerID, UUID folderID, int version, int descendents, int folders, int items) |
1477 | { | 1409 | { |
1478 | InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); | 1410 | InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); |
1479 | descend.Header.Zerocoded = true; | 1411 | descend.Header.Zerocoded = true; |
1480 | descend.AgentData.AgentID = AgentId; | 1412 | descend.AgentData.AgentID = AgentId; |
1481 | descend.AgentData.OwnerID = ownerID; | 1413 | descend.AgentData.OwnerID = ownerID; |
1482 | descend.AgentData.FolderID = folderID; | 1414 | descend.AgentData.FolderID = folderID; |
1483 | descend.AgentData.Version = 1; | 1415 | descend.AgentData.Version = version; |
1416 | descend.AgentData.Descendents = descendents; | ||
1417 | |||
1418 | if (folders > 0) | ||
1419 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders]; | ||
1420 | else | ||
1421 | AddNullFolderBlockToDecendentsPacket(ref descend); | ||
1422 | |||
1423 | if (items > 0) | ||
1424 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items]; | ||
1425 | else | ||
1426 | AddNullItemBlockToDescendentsPacket(ref descend); | ||
1484 | 1427 | ||
1485 | return descend; | 1428 | return descend; |
1486 | } | 1429 | } |
@@ -4963,6 +4906,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4963 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true); | 4906 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true); |
4964 | } | 4907 | } |
4965 | 4908 | ||
4909 | /// <summary> | ||
4910 | /// This is the starting point for sending a simulator packet out to the client | ||
4911 | /// </summary> | ||
4912 | /// <param name="packet">Packet to send</param> | ||
4913 | /// <param name="throttlePacketType">Throttling category for the packet</param> | ||
4914 | /// <param name="doAutomaticSplitting">True to automatically split oversized | ||
4915 | /// packets (the default), or false to disable splitting if the calling code | ||
4916 | /// handles splitting manually</param> | ||
4917 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) | ||
4918 | { | ||
4919 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); | ||
4920 | } | ||
4921 | |||
4966 | public bool AddMoney(int debit) | 4922 | public bool AddMoney(int debit) |
4967 | { | 4923 | { |
4968 | if (m_moneyBalance + debit >= 0) | 4924 | if (m_moneyBalance + debit >= 0) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 93946ae..93c3270 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
327 | // The vast majority of packets are less than 200 bytes, although due to asset transfers and packet splitting | 327 | // The vast majority of packets are less than 200 bytes, although due to asset transfers and packet splitting |
328 | // there are a decent number of packets in the 1000-1140 byte range. We allocate one of two sizes of data here | 328 | // there are a decent number of packets in the 1000-1140 byte range. We allocate one of two sizes of data here |
329 | // to accomodate for both common scenarios and provide ample room for ACK appending in both | 329 | // to accomodate for both common scenarios and provide ample room for ACK appending in both |
330 | int bufferSize = (dataLength > 180) ? LLUDPServer.MTU : 200; | 330 | int bufferSize = (dataLength > 180) ? LLUDPServer.MTU + 1000 : 200; |
331 | 331 | ||
332 | UDPPacketBuffer buffer = new UDPPacketBuffer(udpClient.RemoteEndPoint, bufferSize); | 332 | UDPPacketBuffer buffer = new UDPPacketBuffer(udpClient.RemoteEndPoint, bufferSize); |
333 | 333 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 5a5fcfe..5891c7e 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -538,6 +538,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
538 | public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, | 538 | public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, |
539 | List<InventoryItemBase> items, | 539 | List<InventoryItemBase> items, |
540 | List<InventoryFolderBase> folders, | 540 | List<InventoryFolderBase> folders, |
541 | int version, | ||
541 | bool fetchFolders, | 542 | bool fetchFolders, |
542 | bool fetchItems) | 543 | bool fetchItems) |
543 | { | 544 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs index 244ac3b..7a66d23 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs | |||
@@ -77,13 +77,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
77 | 77 | ||
78 | #region Internal functions | 78 | #region Internal functions |
79 | 79 | ||
80 | private string UserAssetURL(UUID userID) | 80 | // private string UserAssetURL(UUID userID) |
81 | { | 81 | // { |
82 | CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); | 82 | // CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); |
83 | if (uinfo != null) | 83 | // if (uinfo != null) |
84 | return (uinfo.UserProfile.UserAssetURI == "") ? null : uinfo.UserProfile.UserAssetURI; | 84 | // return (uinfo.UserProfile.UserAssetURI == "") ? null : uinfo.UserProfile.UserAssetURI; |
85 | return null; | 85 | // return null; |
86 | } | 86 | // } |
87 | 87 | ||
88 | // private string UserInventoryURL(UUID userID) | 88 | // private string UserInventoryURL(UUID userID) |
89 | // { | 89 | // { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 4d76b4ef..00743fc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1175,7 +1175,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1175 | { | 1175 | { |
1176 | m_log.DebugFormat("[AGENT INVENTORY]: Send Inventory Folder {0} Update to {1} {2}", folder.Name, client.FirstName, client.LastName); | 1176 | m_log.DebugFormat("[AGENT INVENTORY]: Send Inventory Folder {0} Update to {1} {2}", folder.Name, client.FirstName, client.LastName); |
1177 | InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); | 1177 | InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); |
1178 | client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, fetchFolders, fetchItems); | 1178 | InventoryFolderBase containingFolder = new InventoryFolderBase(); |
1179 | containingFolder.ID = folder.ID; | ||
1180 | containingFolder.Owner = client.AgentId; | ||
1181 | containingFolder = InventoryService.GetFolder(containingFolder); | ||
1182 | int version = containingFolder.Version; | ||
1183 | |||
1184 | client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, version, fetchFolders, fetchItems); | ||
1179 | } | 1185 | } |
1180 | 1186 | ||
1181 | /// <summary> | 1187 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 1a91f0c..47fbeb4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -462,7 +462,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
462 | { | 462 | { |
463 | remoteClient.SendInventoryFolderDetails( | 463 | remoteClient.SendInventoryFolderDetails( |
464 | fold.Owner, folderID, fold.RequestListOfItems(), | 464 | fold.Owner, folderID, fold.RequestListOfItems(), |
465 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 465 | fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); |
466 | return; | 466 | return; |
467 | } | 467 | } |
468 | 468 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a6ee40a..093ca3e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1043 | TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate; | 1043 | TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate; |
1044 | physicsFPS = 0f; | 1044 | physicsFPS = 0f; |
1045 | 1045 | ||
1046 | maintc = maintc = otherMS = Environment.TickCount; | 1046 | maintc = otherMS = Environment.TickCount; |
1047 | int tmpFrameMS = maintc; | 1047 | int tmpFrameMS = maintc; |
1048 | 1048 | ||
1049 | // Increment the frame counter | 1049 | // Increment the frame counter |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b12eea9..1e9201e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
76 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 76 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
77 | 77 | ||
78 | private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; | 78 | private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; |
79 | private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); | 79 | // private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); |
80 | private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); | 80 | private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); |
81 | private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); | 81 | private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); |
82 | /// <summary> | 82 | /// <summary> |
@@ -181,7 +181,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
181 | private byte m_state; | 181 | private byte m_state; |
182 | 182 | ||
183 | //Reuse the Vector3 instead of creating a new one on the UpdateMovement method | 183 | //Reuse the Vector3 instead of creating a new one on the UpdateMovement method |
184 | private Vector3 movementvector; | 184 | // private Vector3 movementvector; |
185 | 185 | ||
186 | private bool m_autopilotMoving; | 186 | private bool m_autopilotMoving; |
187 | private Vector3 m_autoPilotTarget; | 187 | private Vector3 m_autoPilotTarget; |
@@ -2074,7 +2074,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2074 | if (heldDown) { move.Z -= 1; } | 2074 | if (heldDown) { move.Z -= 1; } |
2075 | 2075 | ||
2076 | // Is the avatar trying to move? | 2076 | // Is the avatar trying to move? |
2077 | bool moving = (move != Vector3.Zero); | 2077 | // bool moving = (move != Vector3.Zero); |
2078 | bool jumping = m_animTickJump != 0; | 2078 | bool jumping = m_animTickJump != 0; |
2079 | 2079 | ||
2080 | #endregion Inputs | 2080 | #endregion Inputs |
@@ -2326,7 +2326,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2326 | 2326 | ||
2327 | if (m_isChildAgent == false) | 2327 | if (m_isChildAgent == false) |
2328 | { | 2328 | { |
2329 | PhysicsActor actor = m_physicsActor; | 2329 | // PhysicsActor actor = m_physicsActor; |
2330 | 2330 | ||
2331 | // NOTE: Velocity is not the same as m_velocity. Velocity will attempt to | 2331 | // NOTE: Velocity is not the same as m_velocity. Velocity will attempt to |
2332 | // grab the latest PhysicsActor velocity, whereas m_velocity is often | 2332 | // grab the latest PhysicsActor velocity, whereas m_velocity is often |
@@ -3262,7 +3262,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3262 | Vector3 force = m_forceToApply.Value; | 3262 | Vector3 force = m_forceToApply.Value; |
3263 | 3263 | ||
3264 | m_updateflag = true; | 3264 | m_updateflag = true; |
3265 | movementvector = force; | 3265 | // movementvector = force; |
3266 | Velocity = force; | 3266 | Velocity = force; |
3267 | 3267 | ||
3268 | m_forceToApply = null; | 3268 | m_forceToApply = null; |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4b0d01a..f1bd705 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1055 | 1055 | ||
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems) | 1058 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) |
1059 | { | 1059 | { |
1060 | 1060 | ||
1061 | } | 1061 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index f7cadaa..cf81198 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -627,6 +627,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
627 | public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, | 627 | public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, |
628 | List<InventoryItemBase> items, | 628 | List<InventoryItemBase> items, |
629 | List<InventoryFolderBase> folders, | 629 | List<InventoryFolderBase> folders, |
630 | int version, | ||
630 | bool fetchFolders, | 631 | bool fetchFolders, |
631 | bool fetchItems) | 632 | bool fetchItems) |
632 | { | 633 | { |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 0f642b9..9ec9311 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -631,6 +631,7 @@ namespace OpenSim.Tests.Common.Mock | |||
631 | public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, | 631 | public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, |
632 | List<InventoryItemBase> items, | 632 | List<InventoryItemBase> items, |
633 | List<InventoryFolderBase> folders, | 633 | List<InventoryFolderBase> folders, |
634 | int version, | ||
634 | bool fetchFolders, | 635 | bool fetchFolders, |
635 | bool fetchItems) | 636 | bool fetchItems) |
636 | { | 637 | { |