patchmldonkey, a multi-networks file-sharing client - Patches: patch #4500, BT: Fix multifile download with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4500: BT: Fix multifile download with zero-byte files

Submitter:  Joakim Verona <jave>
Submitted:  Sun 09 Oct 2005 10:59:42 PM UTC
   
 
Category:  Bug fixes Priority:  9 - Immediate
Status:  Done Assigned to:  None
Open/Closed:  Closed

Tue 11 Oct 2005 05:25:42 PM UTC, comment #3: 

Applied 2005/10/11

spiralvoice <spiralvoice>
Group administrator
Tue 11 Oct 2005 05:23:01 PM UTC, comment #2: 

removed logfile message, it only spams logfile

spiralvoice <spiralvoice>
Group administrator
Mon 10 Oct 2005 04:11:29 PM UTC, comment #1: 

Attached patch for current CVS

spiralvoice <spiralvoice>
Group administrator
Sun 09 Oct 2005 10:59:42 PM UTC, original submission:  

When torrents contain 0 byte files they often dont finish.

The workaround below simply doesnt write to 0 byte files.
Its meaningless to write in this case, so the workaround appears safe. on the other hand, this case probalby should be handled further up in the call chain. thats why its a "workaround".

This was spiralvoices idea, I tested it on a problem torrent and it worked.

in unix32.ml
    let file_write file in_file_pos s in_string_pos len =
      if len ≠  0 then  begin2
        let len64 = Int64.of_int len in
        let in_file_len = in_file_pos ++ len64 in
          FDCache.write file.fd in_file_pos s in_string_pos len;
          file.current_len ? max file.current_len in_file_len
      end else begin
         lprintf "debug:0 len file"; (JAVE try to fix 0 file torrent corruption)
      end

Joakim Verona <jave>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #7979:  4500.patch added by spiralvoice (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 8 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-10-11 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2005-10-11 spiralvoice CategoryNone Bug fixes
    Priority5 - Normal 9 - Immediate
2005-10-11 spiralvoice Attached File#5307 Removed
2005-10-11 spiralvoice Attached File- Added 4500.patch, #5313
2005-10-10 spiralvoice Summaryworkaround for torrents that dont finish because of 0 byte file BT: Fix multifile download with zero-byte files
2005-10-10 spiralvoice Attached File- Added 4500.patch, #5307

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code