aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMW2007-08-26 17:57:25 +0000
committerMW2007-08-26 17:57:25 +0000
commit291eb48fb0338d80e3baeed65664d7a72fea1892 (patch)
tree8fa18a9474cb998a2e20fa9a124979b01bd41a8f /OpenSim/Region/ClientStack
parentDanxors patch for >30prims with ODE (diff)
downloadopensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.zip
opensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.tar.gz
opensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.tar.bz2
opensim-SC-291eb48fb0338d80e3baeed65664d7a72fea1892.tar.xz
Another attempt to fix the image sending bug (next week, I intend to rewrite the assetcache and asset server).
Attempt to fix bug # 326. (crashing when using save-xml and hollow prims) Attempt to fix bug # 328 (limit of 50 items in a folder)
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs57
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs5
2 files changed, 52 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 6209beb..edc1268 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -531,13 +531,19 @@ namespace OpenSim.Region.ClientStack
531 { 531 {
532 Encoding enc = Encoding.ASCII; 532 Encoding enc = Encoding.ASCII;
533 uint FULL_MASK_PERMISSIONS = 2147483647; 533 uint FULL_MASK_PERMISSIONS = 2147483647;
534 InventoryDescendentsPacket descend = new InventoryDescendentsPacket(); 534 InventoryDescendentsPacket descend = this.CreateInventoryDescendentsPacket(ownerID, folderID);
535 descend.AgentData.AgentID = this.AgentId; 535
536 descend.AgentData.OwnerID = ownerID; 536 int count = 0;
537 descend.AgentData.FolderID = folderID; 537 if (items.Count < 40)
538 descend.AgentData.Descendents = items.Count; 538 {
539 descend.AgentData.Version = 0; 539 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count];
540 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count]; 540 descend.AgentData.Descendents = items.Count;
541 }
542 else
543 {
544 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[40];
545 descend.AgentData.Descendents = 40;
546 }
541 int i = 0; 547 int i = 0;
542 foreach (InventoryItemBase item in items) 548 foreach (InventoryItemBase item in items)
543 { 549 {
@@ -564,10 +570,45 @@ namespace OpenSim.Region.ClientStack
564 descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, descend.ItemData[i].InvType, descend.ItemData[i].Type, descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, 100, descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 570 descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, descend.ItemData[i].InvType, descend.ItemData[i].Type, descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, 100, descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
565 571
566 i++; 572 i++;
573 count++;
574 if (i == 40)
575 {
576 this.OutPacket(descend);
577
578 if ((items.Count - count) > 0)
579 {
580 descend = this.CreateInventoryDescendentsPacket(ownerID, folderID);
581 if ((items.Count - count) < 40)
582 {
583 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count - count];
584 descend.AgentData.Descendents = items.Count - count;
585 }
586 else
587 {
588 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[40];
589 descend.AgentData.Descendents = 40;
590 }
591 i = 0;
592 }
593 }
594 }
595
596 if (i < 40)
597 {
598 this.OutPacket(descend);
567 } 599 }
568 600
569 this.OutPacket(descend); 601 }
602
603 private InventoryDescendentsPacket CreateInventoryDescendentsPacket(LLUUID ownerID, LLUUID folderID)
604 {
605 InventoryDescendentsPacket descend = new InventoryDescendentsPacket();
606 descend.AgentData.AgentID = this.AgentId;
607 descend.AgentData.OwnerID = ownerID;
608 descend.AgentData.FolderID = folderID;
609 descend.AgentData.Version = 0;
570 610
611 return descend;
571 } 612 }
572 613
573 public void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) 614 public void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item)
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index 0163528..ade7a0d 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack
351 #region Inventory/Asset/Other related packets 351 #region Inventory/Asset/Other related packets
352 case PacketType.RequestImage: 352 case PacketType.RequestImage:
353 RequestImagePacket imageRequest = (RequestImagePacket)Pack; 353 RequestImagePacket imageRequest = (RequestImagePacket)Pack;
354 354 //Console.WriteLine("image request: " + Pack.ToString());
355 for (int i = 0; i < imageRequest.RequestImage.Length; i++) 355 for (int i = 0; i < imageRequest.RequestImage.Length; i++)
356 { 356 {
357 m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, imageRequest.RequestImage[i].Packet); 357 m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, imageRequest.RequestImage[i].Packet);
@@ -363,10 +363,11 @@ namespace OpenSim.Region.ClientStack
363 m_assetCache.AddAssetRequest(this, transfer); 363 m_assetCache.AddAssetRequest(this, transfer);
364 break; 364 break;
365 case PacketType.AssetUploadRequest: 365 case PacketType.AssetUploadRequest:
366 //Console.WriteLine("upload request " + Pack.ToString());
366 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 367 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
367 if (OnAssetUploadRequest != null) 368 if (OnAssetUploadRequest != null)
368 { 369 {
369 OnAssetUploadRequest(this, request.AssetBlock.TransactionID.Combine(this.SecureSessionID), request.AssetBlock.TransactionID, request.AssetBlock.Type, request.AssetBlock.AssetData); 370 OnAssetUploadRequest(this, request.AssetBlock.TransactionID.Combine(this.SecureSessionID), request.AssetBlock.TransactionID, request.AssetBlock.Type, request.AssetBlock.AssetData, request.AssetBlock.StoreLocal);
370 } 371 }
371 break; 372 break;
372 case PacketType.RequestXfer: 373 case PacketType.RequestXfer: