Richard Nyberg
1a17b22bb3
Don't call mkdirs unnecessarily. Note that this code is only needed because
the content code shuts down btpd on errors. When that is fixed this code can
be removed.
18 年之前
Richard Nyberg
cd8a3d5ecd
Make mkdirs behave more like 'mkdir -p' and make btpd create the directory
hierarchy to a specified torrent content directory if neccessary.
18 年之前
Richard Nyberg
ff3f222885
OpenBSD doesn't have stdint.h. It'd be great if they would implement basic c99
library support some day...
18 年之前
Richard Nyberg
f20c481b11
There's no need to fsync here, so remove the call. This should improve
write performance.
18 年之前
Richard Nyberg
110b1d7e22
Always update the tlib info when a torrent is stopped. Some code shuffle.
18 年之前
Richard Nyberg
29495ab53b
Add and use the function make_abs_path. realpath didn't fit my needs.
make_abs_path doesn't need the directories to actually exist in the
file system.
18 年之前
Richard Nyberg
25788505fa
Forgot to free some memory. Remove some broken code; it wasn't needed
yet anyway. glibc doesn't have the d_namlen field in struct dirent, so
we'll have to use strlen instead.
18 年之前
Richard Nyberg
b306439636
Update for the read_whole_file -> read_file change.
18 年之前
Richard Nyberg
b0b50e29b6
Create all files of a torrent at startup.
18 年之前
Richard Nyberg
0b9d19de09
Add missing include.
18 年之前
Richard Nyberg
11f7e1ce1f
Safer way to initialize the address.
18 年之前
Richard Nyberg
3fb4e5a894
Simplify read_whole_file and rename to read_file.
18 年之前
Richard Nyberg
51e084f144
Document changes for 0.12.
18 年之前
Richard Nyberg
535991f085
Bump version to 0.12.
18 年之前
Richard Nyberg
45bf9f2658
Allow empty files in torrents. Create them in stat_and_adjust and let the
stream abstraction skip past them.
18 年之前
Richard Nyberg
a781e02cd8
Add missing includes.
18 年之前
Richard Nyberg
e1687be96c
A string wasn't properly zero terminated.
18 年之前
Richard Nyberg
d218b1cbfa
Add missing include.
18 年之前
Richard Nyberg
a087071b45
Make the del command work for active torrents too.
18 年之前
Richard Nyberg
a497ca472a
Help text changes and make del and start take the --help option.
18 年之前
Richard Nyberg
0eb36d3914
btcli list now displays size, ratio and the percentage got of torrents.
It sorts by name instead of number (should probably add options for sorting).
It now also takes torrents to list as optional arguments. Added ratio to
btcli stat display. Changed the help text for both commands. Some code shuffle
and other tweaks.
18 年之前
Richard Nyberg
e652eefa26
Add value queries for total amount up- and downloaded. Use the cached values
for torrent size and amount gotten when the torrent isn't active.
18 年之前
Richard Nyberg
7ae55cac4d
Save the total amount down- and uploaded and cache the torrent size and the
amount we have in the info file.
18 年之前
Richard Nyberg
326dc406e7
Remove unneeded braces.
18 年之前
Richard Nyberg
ba9ae40fe7
Add command to stop all active torrents. The command is sent by
'btcli stop -a'.
18 年之前
Richard Nyberg
30601882e5
Whitespace.
18 年之前
Richard Nyberg
00db1f1ced
Add function benc_strcmp.
18 年之前
Richard Nyberg
ce0ef9d46b
Better message for ENOTENT.
18 年之前
Richard Nyberg
311a05f613
btcli add now starts the torrent if not told otherwise. Soem cleanup and
improved error output.
18 年之前
Richard Nyberg
b169d038fe
Return rates in bytes/s instead of time factor * bytes/s. Clients should
not need to know about the sample time.
18 年之前
Richard Nyberg
b0d013a7aa
Make tests for unit changes to take rounding into account.
18 年之前
Richard Nyberg
2483f77ff5
Reprint the header at suitable intervals. Display sizes >= 1000MB in gigs
instead of megs. Similarily, display rates >= 1000kB/s in MB/s instead of
kB/s.
18 年之前
Richard Nyberg
a5ae3e120f
Some changes to the iobuf interface. Remove a debug assert from btpd_if.c and
make it act properly on iobuf errors.
18 年之前
Richard Nyberg
e33b8a57e6
Move the td_* functions to their own file. Remove lots of unneeded includes.
18 年之前
Richard Nyberg
fd7d7fca08
Implement the "key" tracker extension.
18 年之前
Richard Nyberg
0c9cc2aa1d
Enable printf format type checking.
18 年之前
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 年之前
Richard Nyberg
fa6de9c8a5
btinfo output tweaks.
18 年之前
Richard Nyberg
2c15b5701f
No need to have the net structs on a list. Fix a test for finding a torrent
with active net.
18 年之前
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 年之前
Richard Nyberg
763cbbb59f
Hook the new files to the build.
18 年之前
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 年之前
Richard Nyberg
848de36107
This file contains the definitions of the constants used in the btpd
interface.
18 年之前
Richard Nyberg
a162d34982
Moved from ../cli.
18 年之前
Richard Nyberg
28380064b7
Moved to ../misc.
18 年之前
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 年之前
Richard Nyberg
13607e007a
Remove unused function bts_hashes.
18 年之前
Richard Nyberg
334c94db46
There is no spoon^H^H^H^Htruct metainfo. Use struct mi_file instead.
18 年之前
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 年之前
Richard Nyberg
fc20273a80
Moved to ../misc/queue.h
18 年之前