Author: alanmc Date: 2008-02-20 09:39:58 -0500 (Wed, 20 Feb 2008) New Revision: 96256
Modified: trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/PieceWriter/PieceData.cs Log: Calculate the block index in a safer/faster way. Modified: trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/PieceWriter/PieceData.cs =================================================================== --- trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/PieceWriter/PieceData.cs 2008-02-20 14:37:29 UTC (rev 96255) +++ trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/PieceWriter/PieceData.cs 2008-02-20 14:39:58 UTC (rev 96256) @@ -17,7 +17,7 @@ public int BlockIndex { - get { return PiecePickerBase.GetBlockIndex(piece.Blocks, startOffset, count); } + get { return startOffset / Client.Piece.BlockSize; }// PiecePickerBase.GetBlockIndex(piece.Blocks, startOffset, count); } } public int Count _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches