Richard Nyberg
e33b8a57e6
Move the td_* functions to their own file. Remove lots of unneeded includes.
18 years ago
Richard Nyberg
fd7d7fca08
Implement the "key" tracker extension.
18 years ago
Richard Nyberg
0c9cc2aa1d
Enable printf format type checking.
18 years ago
Richard Nyberg
1911f326a6
Implement the multitracker extension. Removed checks for URLs that
btpd can handle for now, so if no such URLs exists there will be a
lot of tracker errors reported.
18 years ago
Richard Nyberg
fa6de9c8a5
btinfo output tweaks.
18 years ago
Richard Nyberg
2c15b5701f
No need to have the net structs on a list. Fix a test for finding a torrent
with active net.
18 years ago
Richard Nyberg
86754d7d53
btpd now has a library of torrents indexed by number and info hash.
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.
18 years ago
Richard Nyberg
763cbbb59f
Hook the new files to the build.
18 years ago
Richard Nyberg
8695ecdf18
Pointers to different things need not be represented in the same way.
Use the fact that we only can store structs in the table to make the
complex pointer use safe. Unfortunately the equal and hash functions
need to take void * arguments.
18 years ago
Richard Nyberg
848de36107
This file contains the definitions of the constants used in the btpd
interface.
18 years ago
Richard Nyberg
a162d34982
Moved from ../cli.
18 years ago
Richard Nyberg
28380064b7
Moved to ../misc.
18 years ago
Richard Nyberg
d3f404c07e
The btpd interface now consists of these commands:
add - adds a torrent to btpd's library
del - removes a torrent from btpd's library
start - activates a torrent from the library
stop - deactivates an active torrent
tget - get data from torrents
tget obsoletes stat and list.
Commands for setting values and query other data will be
added later.
18 years ago
Richard Nyberg
13607e007a
Remove unused function bts_hashes.
18 years ago
Richard Nyberg
334c94db46
There is no spoon^H^H^H^Htruct metainfo. Use struct mi_file instead.
18 years ago
Richard Nyberg
cd0eb82f20
The metainfo code provided a load -> test -> struct metainfo interface.
The metainfo struct has been replaced by functions for qeurying specific
items from the torrent. In addition, the tests of the torrent data has
been improved.
18 years ago
Richard Nyberg
fc20273a80
Moved to ../misc/queue.h
18 years ago
Richard Nyberg
c41c08adca
Moved from ../btpd/queue.h
18 years ago
Richard Nyberg
a27913a47d
Add functions for conversions between binary data and ascii hex.
Add function for reading a whole file.
Enable printf format checking for some functions.
18 years ago
Richard Nyberg
203d4148e4
Add a hashtable implementation.
18 years ago
Richard Nyberg
c9ea09b1ad
Enable printf format type checking for buf_print.
18 years ago
Richard Nyberg
47358cf420
Add function benc_strlen.
18 years ago
Richard Nyberg
c4379cdfb9
Send keepalives.
18 years ago
Richard Nyberg
1f4ef6cb15
Reduce the number of HAVE messages sent by only sending them to peers missing
the piece. Remove seeder peers when our download is finished and remove peers
who doesn't show any interest for a long time when we're seeding.
18 years ago
Richard Nyberg
e0877d2870
Torrents that were active when btpd was last killed will now be automatically
started when btpd starts. The new '--empty-start' option turns this off.
18 years ago
Richard Nyberg
251b5d2e18
Add a delay for contacting the same announce url. This way we don't spam
a tracker with connections even if we add a lot of torrents with the same
tracker at the same time.
18 years ago
Richard Nyberg
eb1581a673
Change version to 0.11 and document the changes.
18 years ago
Richard Nyberg
7ce1098dff
Remove the events for a peer's socket before closing it. At least the epoll
libevent backend didn't like the fd to be closed. Reported by Ludvig Omholt.
18 years ago
Richard Nyberg
45ceb46c42
Change version to 0.10 and document the changes.
18 years ago
Richard Nyberg
336a4d4c02
Changed the help for the '--ipcprot' option.
18 years ago
Richard Nyberg
2e073c13f2
Truncate the pid file when opening it. Now it actually will contain the pid
of the btpd process :)
18 years ago
Richard Nyberg
2285473192
Make sure btpd_dir contains an absolute path. If btpd was started with
'-d some/releative/path' it would fail to set up the ipc socket correctly.
Reported by Arnaud Bergeron.
18 years ago
Richard Nyberg
7810b15cfd
Add the '--ipcprot' option to change the protection mode of the command
socket. From Arnaud Bergeron.
18 years ago
Richard Nyberg
2a462baead
Btpd could be DOS'ed by incoming connections that never send any data.
Strangely such connections are not entirely uncommon. Added a hand shake
time out of 60 seconds to resolve this.
Added a peer_on_tick function which is used to monitor peers for different
timeouts. Timestamps are compared against the reborn btpd_seconds.
The issue has been reported by Ludvig Omholt and Arnaud Bergeron.
18 years ago
Richard Nyberg
cfb37a5227
Split out common code for btpd_log and btpd_err.
18 years ago
Richard Nyberg
ed56df9e56
Use the new functions btpd_ev_(add|del) instead of calling event_(add|del)
directly. Failure to add or delete an event is treated as a fatal error.
18 years ago
Richard Nyberg
368bafd8a6
Fix type mismath. From Arnaud Bergeron.
18 years ago
Richard Nyberg
3c5beeaa0e
Changes for 0.9.
19 years ago
Richard Nyberg
a0985012a1
Version 0.9.
19 years ago
Richard Nyberg
4e6f095c41
Cut off decimals after the first tenth percent so printf doesn't round
the percentage upwards. Ie. Display 99.9%, not 100.0%, even if we have
99.98% of the content.
19 years ago
Richard Nyberg
db49763849
The previous commit was a bit over zealous; the block field should not be
cleared for a failed piece in the full torrent test. This also fixes a bug
where the content byte count wasn't decreased for failed pieces.
19 years ago
Richard Nyberg
b72b6bb8ba
The code for testing content that has potentially been modified between btpd
runs was quite broken. Pieces stayed marked as ok event though the hash test
failed for pieces in modified files. Oops!
19 years ago
Richard Nyberg
cdb471d0ac
Fix a bug from the last commit: shared messages for endgame requests could
be placed at the wrong index in the array.
19 years ago
Richard Nyberg
9f4070eeb8
There's now one list with requests per piece instead of one per block. The
network buffers for requests are now allocated as they're needed. Before
they were allocated at the same time as their corresponding piece. This
lowers btpd's memory consumption.
19 years ago
Richard Nyberg
6214255bbb
Safer code for net_read32 and net_write32. It may have been possible for them
to cause failure on some architectures because of unaligned fetch/write of
integers.
19 years ago
Richard Nyberg
a1f2f9faae
Two changes to stat output:
1. Show the number of torrents with tracker errors on the total status line.
2. Show the torrent status character on the status line instead of the name
line. This only has effect when the '-i' flag is given.
19 years ago
Richard Nyberg
f219b47a33
Set default value of cm_alloc_size to 2MB.
19 years ago
Richard Nyberg
1b3c4e7c05
Set its rates to zero when stopping a torrent.
19 years ago
Richard Nyberg
4382442f11
Rewrote the README with changes for 0.8..
19 years ago
Richard Nyberg
2d696edbb6
Changes for 0.8.
19 years ago