From 16e1a1eae38ac962e6191b40158aee79db86279f Mon Sep 17 00:00:00 2001 From: Jesper Louis Andersen Date: Tue, 22 Jul 2008 15:05:40 +0200 Subject: [PATCH] Correctly kill chunks from an invalid piece. --- lib/etorrent-1.0/src/etorrent_fs.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/etorrent-1.0/src/etorrent_fs.erl b/lib/etorrent-1.0/src/etorrent_fs.erl index 4ed192b..e17819a 100644 --- a/lib/etorrent-1.0/src/etorrent_fs.erl +++ b/lib/etorrent-1.0/src/etorrent_fs.erl @@ -127,8 +127,8 @@ handle_cast({check_piece, PeerGroupPid, Index}, S) -> etorrent_piece_mgr:statechange(S#state.torrent_id, Index, not_fetched), - %% TODO: Kill the 'fetched' part in the chunk table. - %% TODO: Update 'left' correctly for the piece. + etorrent_chunk_mgr:remove_chunks(S#state.torrent_id, Index), + %% 'left' will be updated when the piece is chunked again. {noreply, NS} end; handle_cast(stop, S) -> -- 2.11.4.GIT