has moved toward btpd having a library of torrent to wich one may add
or remove torrents, and where interaction on torrents are done by their
assigned number. This commit is a step back from that and it makes life
simpler and better for all :)
* Some options to btpd has changed:
--no-daemon is the old -d.
-d is now used to specify the btpd directory.
--logfile option is reintroduced.
* The ipc code has been improved on both btpd and cli sides.
* All commands have been implemented.
* Various improvements in btpd.
With this commit we're very close to 0.8 :)
* Added fast resume support. A resume file is loaded when a torrent is started
and saved when it's stopped or done. If no resume file is found or the file
information doesn't match whats on disk, the content is tested for existing
pieces.
* cm_prealloc now can allocate several adjacent pieces to the given piece.
This further reduces fragmentation. How many pieces are allocated at a
time is controlled by cm_alloc_size which can be set by the user with
the --prealloc option.
* Some changes were also made to the torrent api.
o Unhook cli_if.c from build temporarily. It needs to be fixed.
o Torrent meta data is now kept in subdirectories to $BTPD_HOME/library.
o Added some very incomplete life cycle logic for torrents.
and net_del_torrent does the opposite (surprise!).
* Some code shuffle has been done to separate net_ and dl_ from torrent_
but there's still much to be done.
* Removed a couple of dead vars from struct torrent.
* Renamed the policy* files to upload* and download*.
* The upload (un)choker is now global instead of per torrent. The algorithm
is not yet implemented however.
To be continued...
rid of the global btpd struct. Some fields in the struct got a corresponding
global variable whereas some was made static and moved to a module.
The bandwidht algorithm also got tweaked. It now tries to fire the event
at specific times. This was to make the code simpler. It'll probably have
to be tweaked again :P
First step to make btpd run from a directory where it'll keep the log,
socket, configuration, data on the known torrents, etc. Btpd now uses
flock on the pidfile instead of connecting to the socket in order to
be reasonably sure that no other btpd runs in the same directory.
be shared by several peers. At least in end game.
* Link blocks with the peers we are loading them from and vice versa.
* Limit the number of requests / peer in end game too.
* Improve end game by using some sort of round robin for block requests.
The net code now calls the peer code when it has read a full message.
This has mostly involved moving code from net.c to peer.c.
* Added torrent_piece_size helper function.