mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] [patch #4500] workaround for torrents that dont finish


From: jave
Subject: [Mldonkey-users] [patch #4500] workaround for torrents that dont finish because of 0 byte file
Date: Sun, 9 Oct 2005 22:59:43 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+

URL:
  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4500>

                 Summary: workaround for torrents that dont finish because of
0 byte file
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: jave
            Submitted on: Sun 10/09/05 at 22:59
                Category: None
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

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







    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4500>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]