The add and del commands adds or removes torrents from this library.
The start and stop commands are used to active or deactivate torrents.
Also, a mechanism for qeurying data on torrents has been added. It's
only used by the btcli list and stat commands yet though.
btcli has been split into different files for each command.
Both btpd and btcli now use misc/btpd_if.h for all ipc definitions.
Misc changes:
- struct metainfo is gone. Use the new mi_* functions.
- Add printf format type checking where appropriate.
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 :)
o Since we only use the mtime and size field of the stat struct for resume
info, we now use a struct with only those two fields. This reduces stack
usage.
the resume file and content aren't synchronized. Save the resumefile
every 15 seconds for torrents we're downloading. This way we don't have
to redownload much content because of crash or whatnot. Not that btpd would
crash :)
Also, as there were probably no point in fsync'ing the content when we closed
the write stream, that is not done anymore.
* 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.
pieces we and blocks we have, it'll do the writing and reading from disk
and test pieces against their hashes.
This is only a dummy implementation of the api. I'll flesh it out in
subsequent commits.