[libopenmetaverse] r3597 committed - Reverting patch fot LIBOMV-929:...

0 views
Skip to first unread message

libopenm...@googlecode.com

unread,
Dec 8, 2011, 6:42:19 PM12/8/11
to libomv-...@googlegroups.com
Revision: 3597
Author: latifer
Date: Thu Dec 8 15:41:39 2011
Log: Reverting patch fot LIBOMV-929:
jhurliman: the reason it used the packet number * 1000 is because packets
can show up out of order. if you get packet number 5 before packet number
4, the old code would correctly put the data at download.AssetData[5000]
where the new code would put it at download.AssetData[4000] (which would
get overwritten by the next packet and leave a gap of empty bytes at
[5000-5999]
http://code.google.com/p/libopenmetaverse/source/detail?r=3597

Modified:
/libopenmetaverse/trunk/OpenMetaverse/AssetManager.cs

=======================================
--- /libopenmetaverse/trunk/OpenMetaverse/AssetManager.cs Fri Dec 2
00:02:47 2011
+++ /libopenmetaverse/trunk/OpenMetaverse/AssetManager.cs Thu Dec 8
15:41:39 2011
@@ -1467,9 +1467,11 @@
}
}

+ // This assumes that every transfer packet except the last
one is exactly 1000 bytes,
+ // hopefully that is a safe assumption to make
try
{
- Buffer.BlockCopy(asset.TransferData.Data, 0,
download.AssetData, download.Transferred,
+ Buffer.BlockCopy(asset.TransferData.Data, 0,
download.AssetData, 1000 * asset.TransferData.Packet,
asset.TransferData.Data.Length);
download.Transferred += asset.TransferData.Data.Length;
}

Reply all
Reply to author
Forward
0 new messages