e33b8a5
Move the td_* functions to their own file. Remove lots of unneeded includes. by
2006-09-13 19:47:18 +0000
fd7d7fc
Implement the "key" tracker extension. by
2006-09-13 18:46:29 +0000
0c9cc2a
Enable printf format type checking. by
2006-09-13 18:44:23 +0000
1911f32
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. by
2006-09-13 18:21:21 +0000
fa6de9c
btinfo output tweaks. by
2006-09-13 18:18:20 +0000
2c15b57
No need to have the net structs on a list. Fix a test for finding a torrent with active net. by
2006-09-13 08:18:33 +0000
86754d7
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. by
2006-09-13 07:02:07 +0000
763cbbb
Hook the new files to the build. by
2006-09-12 21:23:01 +0000
8695ecd
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. by
2006-09-12 21:21:34 +0000
848de36
This file contains the definitions of the constants used in the btpd interface. by
2006-09-12 21:17:26 +0000
a162d34
Moved from ../cli. by
2006-09-12 21:15:30 +0000
2838006
Moved to ../misc. by
2006-09-12 21:15:05 +0000
d3f404c
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 by
2006-09-12 21:10:54 +0000
13607e0
Remove unused function bts_hashes. by
2006-09-12 17:33:48 +0000
334c94d
There is no spoon^H^H^H^Htruct metainfo. Use struct mi_file instead. by
2006-09-12 15:37:55 +0000
cd0eb82
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. by
2006-09-12 15:12:34 +0000
fc20273
Moved to ../misc/queue.h by
2006-09-12 08:59:21 +0000
c41c08a
Moved from ../btpd/queue.h by
2006-09-12 08:58:09 +0000
a27913a
Add functions for conversions between binary data and ascii hex. Add function for reading a whole file. Enable printf format checking for some functions. by
2006-09-12 08:55:53 +0000
203d414
Add a hashtable implementation. by
2006-09-12 08:53:33 +0000
c9ea09b
Enable printf format type checking for buf_print. by
2006-09-12 08:52:28 +0000
47358cf
Add function benc_strlen. by
2006-09-12 08:51:19 +0000
c4379cd
Send keepalives. by
2006-08-06 19:28:20 +0000
1f4ef6c
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. by
2006-08-06 09:18:01 +0000
e0877d2
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. by
2006-08-03 18:04:14 +0000
251b5d2
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. by
2006-08-03 14:00:43 +0000
eb1581a
Change version to 0.11 and document the changes. by
2006-07-30 12:50:07 +0000
7ce1098
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. by
2006-07-28 13:50:11 +0000
45ceb46
Change version to 0.10 and document the changes. by
2006-07-23 13:04:59 +0000
336a4d4
Changed the help for the '--ipcprot' option. by
2006-07-23 12:41:15 +0000
2e073c1
Truncate the pid file when opening it. Now it actually will contain the pid of the btpd process :) by
2006-07-23 11:19:45 +0000
2285473
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. by
2006-07-23 11:16:54 +0000
7810b15
Add the '--ipcprot' option to change the protection mode of the command socket. From Arnaud Bergeron. by
2006-07-23 08:02:21 +0000
2a462ba
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. by
2006-07-22 20:44:12 +0000
cfb37a5
Split out common code for btpd_log and btpd_err. by
2006-07-21 12:48:18 +0000
ed56df9
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. by
2006-07-21 09:56:30 +0000
368bafd
Fix type mismath. From Arnaud Bergeron. by
2006-07-15 12:31:11 +0000
3c5beea
Changes for 0.9. by
2006-03-21 10:17:22 +0000
a098501
Version 0.9. by
2006-03-21 10:01:46 +0000
4e6f095
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. by
2006-03-20 21:45:02 +0000
db49763
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. by
2006-03-18 20:28:46 +0000
b72b6bb
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! by
2006-03-17 13:58:11 +0000
cdb471d
Fix a bug from the last commit: shared messages for endgame requests could be placed at the wrong index in the array. by
2006-03-16 17:48:42 +0000
9f4070e
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. by
2006-02-21 21:59:49 +0000
6214255
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. by
2006-02-19 13:04:18 +0000
a1f2f9f
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. by
2006-02-17 21:03:02 +0000
f219b47
Set default value of cm_alloc_size to 2MB. by
2006-02-17 20:55:02 +0000
1b3c4e7
Set its rates to zero when stopping a torrent. by
2006-02-12 19:40:04 +0000
4382442
Rewrote the README with changes for 0.8.. by
2006-02-11 21:10:47 +0000
2d696ed
Changes for 0.8. by
2006-02-11 21:04:43 +0000
eb85993
Don't allow a negative cm_alloc_size to wreak havoc. by
2006-02-11 18:25:08 +0000
2ee5eed
Return possible error message in the http result. Log the error in the tracker code. by
2006-02-11 16:52:56 +0000
61752ad
Change preallocation default to 2048. 1 may be a little low. by
2006-02-11 16:49:47 +0000
bcac74d
Safer type use. by
2006-02-11 16:47:15 +0000
b61b04f
Fix typo. by
2006-02-10 21:55:14 +0000
b2271a4
Add a note on the ACX_PTHREAD macro license. by
2006-02-10 21:40:29 +0000
a48375d
I don't quite like this file. I think I will use the trac site to keep this kind of information instead. by
2006-02-10 21:30:29 +0000
88aa2ee
Better log message. by
2006-02-10 21:05:52 +0000
c577f4d
Better log message. by
2006-02-10 21:02:31 +0000
cd1164e
Be careful not to stop the sub struct if they haven't been started. Also be careful so that we don't operate on a dead torrent. by
2006-02-10 20:55:02 +0000
9decd35
Oops! Forgot to free some memory. by
2006-02-10 20:51:38 +0000
eef8a3a
Call realpath after creating the dir. At least on linux the call to realpath may fail if the last path component doesn't exist. by
2006-02-10 20:45:22 +0000
c865aa9
Use c99 types conservatively to compile on OpenBSD. Also convert to or from time_t via long. by
2006-02-10 17:33:48 +0000
9732ed1
Glibc needs sys/file.h for flock. by
2006-02-10 17:13:56 +0000
b43809b
Mostly name changes. Add a missing include. Changed the torrent status characters displayed by btcli. by
2006-02-10 15:41:55 +0000
bf75d6a
Glibc doesn't support locking in open. Use flock after open instead. by
2006-02-10 15:38:14 +0000
7dedb28
Put the ACX_PTHREAD macro from the Autoconf macro archive in acinclude.m4. Build btpd with pthreads. by
2006-02-10 15:35:55 +0000
59c62b3
Change the downloaders option to max-uploads. I find it much less confusing that way :P by
2006-02-10 09:24:07 +0000
31f0e72
Add torrent_name function and use it. by
2006-02-09 22:35:04 +0000
c069f03
btcli stat now takes file arguments to only include stats for the given torrents. by
2006-02-09 22:01:17 +0000
ce06752
Include the info hash in the tpstat structure. by
2006-02-09 21:59:22 +0000
19b4bf1
o Since the torrent sub structs always exist now, we can always write all stats for torrentst. o btpd may be waiting for a torrent to finish so it can exit. Therefore btpd needs to send the reply to the cli before removing the torrent. by
2006-02-09 20:41:13 +0000
d08a4c9
There's no need for exactly 64 bits for the upload and download count. Make them long long instead. by
2006-02-09 20:36:37 +0000
e3dc787
Removed the http_redo hack. by
2006-02-09 20:32:20 +0000
926838a
o Make the torrent sub struct exist for whole life time of the torrent. o Better code for stopping the tracker. No more need for the http_redo hack. by
2006-02-09 20:29:58 +0000
2c43037
Fix typo. Index should be i not 1. by
2006-02-09 16:28:16 +0000
2550d6c
Interaction with btpd is now much more like I want it. Previous work 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 :) by
2006-02-08 22:56:35 +0000
1a82f0c
White space. by
2006-02-08 22:24:58 +0000
634df68
Add functions find_btpd_dir. by
2006-02-08 22:20:02 +0000
8d05b64
Remove unused function canon_path. by
2006-02-08 17:04:44 +0000
2732949
Use benc_dget_mema instead of benc_dget_mem + malloc + bcopy. by
2006-02-08 16:38:56 +0000
b0c4f58
Use strtoul to parse length of strings. by
2006-02-08 16:37:32 +0000
d88c65e
Added buf_swrite. by
2006-02-08 16:36:30 +0000
36a68e4
Check for failure to allocate memory. by
2006-02-06 20:43:56 +0000
af64140
Remove som unused code I commited by mistake. Replace integer parse code in benc_int with a call to strtoll. by
2006-02-06 20:43:14 +0000
8fd51e9
Added description of stat output. Changed the stat output. by
2006-02-05 18:01:59 +0000
01c9205
o Changed the benc_ api to make it easier to use. o Lot of work on the cli and its communication with btpd. by
2006-02-05 17:08:39 +0000
6559fcb
Make the buf api safe to continue to use even if an error has occured. by
2006-02-05 11:35:58 +0000
38418fc
Add functions read_fully and write_fully. They are simpler alternatives to read and write on blocking sockets. by
2006-02-05 11:34:18 +0000
65f3eb2
Add a function to look up a torrent by its number. by
2006-02-05 11:30:08 +0000
53c3ba3
Each torrent now gets a number. This number is used to select which torrent to operate on from btcli. by
2006-02-05 11:29:01 +0000
886fb65
Add function to get tracker error count. Don't look for peers and stuff in tracker replies when we're stopping. by
2006-02-05 11:24:10 +0000
2528d4a
Help text changes. by
2006-02-05 11:21:01 +0000
c8f9335
Torrents can now be deactivated and btpd will wait for all torrents to deactivate on shutdown. To not risk hanging indefinitely on unresponsive trackers, btpd will cancel tracker requests after a while. by
2006-02-01 21:56:59 +0000
44165a8
o Fixed: cm->active was not set to 0 in cm_stop. 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. by
2006-02-01 21:46:22 +0000
76fb776
Peers we download from are given a weight of two compared to peers we seed to when we decide which peers to upload to. Also fix so that we don't prefer to upload to peers who has had a good rate but isn't uploading to us now. by
2006-02-01 21:32:09 +0000
0c71b0c
Added function http_redo, which does a new request for the same url as an old request and cancels the old request. by
2006-02-01 21:19:35 +0000
9af6e55
* Better message when trying to start btpd in a driectory where it's already running. * Added --downloaders and --max-peers options and hopefully usefull defaults. Because curl uses fd_sets it's important to keep the numbers of fds used below FD_SETSIZE. I will probably move the curl stuff to it's own process to get rid of that limitation. * Added to the help text. by
2006-01-25 21:59:06 +0000
e99facb
Don't clear the bitfield for blocks it's possible we have, even though 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. by
2006-01-24 22:42:56 +0000
7068f34
* Implemented the full cm_ life cycle. * 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. by
2006-01-22 23:10:29 +0000