Richard Nyberg
2904cdca2d
Add tests for correctness.
19 vuotta sitten
Richard Nyberg
ce0e134bc4
Increase the number of requests to pipe to 10.
19 vuotta sitten
Richard Nyberg
0c794ac33a
The test for if we should call cm_on_undownload or not wasn't
totally correct. Since there's a possibility that we've assigned
requests to peer and then decreased the wanted level, we could've
missed peers with requests but a wanted level of zero.
Now we check if the peer has any requests instead.
19 vuotta sitten
Richard Nyberg
c8a115a0f0
Introduce the -d option.
19 vuotta sitten
Richard Nyberg
5169d5a862
Missed to update peer->nreqs_out at a couple of places.
19 vuotta sitten
Richard Nyberg
78fddd57db
Peers wasn't removed from the list of unattached peers before being
added to the torrent list. This bug crept in because this file was
based on an earlier version of policy.c.
19 vuotta sitten
Richard Nyberg
5d6ad9d7bb
Don't try to assign requests if the peer already has enough requests.
19 vuotta sitten
Richard Nyberg
0502d4bf92
Rework the download algorithm. This isn't tested yet, but it compiles
so it must be bug free :)
19 vuotta sitten
Richard Nyberg
aecad435f7
Remove -Wall -Werror from the default CFLAGS.
Add --with-warn option to configure, making it easy to
select between a couple of predefined warning options.
Having all warnings on and treated as errors wasn't so good,
since different versions of gcc have different warnings.
There's no need to make it harder than it should be to build
btpd.
19 vuotta sitten
Richard Nyberg
614afd29cd
Use net_read_to_buf in net_generic_read.
19 vuotta sitten
Richard Nyberg
47aa24ceaf
Add net_read_to_buf getting rid of some common code. I should make
net_generic_read use a real io_buffer and this function too.
19 vuotta sitten
Richard Nyberg
ba425dc31a
Make changes in the choke/interest state of a peer visible to the
policy on a lower level.
19 vuotta sitten
Richard Nyberg
474c7b5b3a
* Better interface between the net and peer code.
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.
19 vuotta sitten
Richard Nyberg
8e3883a853
This is version 0.2.
19 vuotta sitten
Richard Nyberg
4aaf966137
Add CHANGES. A file describing changes between versions of btpd.
19 vuotta sitten
Richard Nyberg
0aec4ea071
*) Add one item.
*) Don't call names.
*) Don't think it's neccessary to include fixing of general bugs.
19 vuotta sitten
Richard Nyberg
96d68439bb
Add check so that we don't connect to more peers than we should.
19 vuotta sitten
Richard Nyberg
b5cdaf06a9
Write "1 torrent." instead of "1 torrents.".
19 vuotta sitten
Richard Nyberg
f8a4999e40
The generic reader didn't have a buffer that was large enough to
save uncomplete messages. I had forgotten about the four bytes of
message length preceding the message. A buffer overflow could occur
because of this. Ouch!
19 vuotta sitten
Richard Nyberg
051b1b4e2a
Accept more data from tracker.
19 vuotta sitten
Richard Nyberg
617691251e
It wasn't safe to modify the list from within the loop. Fixed it.
19 vuotta sitten
Richard Nyberg
4b9aa9c042
Keep peers not attached to a torrent on a list,
making it possible to remove peers in mid hand-
shake when removing a torrent.
19 vuotta sitten
Richard Nyberg
fda00374c7
Remove #if 0'ed code.
19 vuotta sitten
Richard Nyberg
6bba1ff6f8
Remove unused label.
19 vuotta sitten
Richard Nyberg
bdb91bc49b
Sanity checks.
19 vuotta sitten
Richard Nyberg
27ba618c5e
Move increment of btpd.npeers to a more fitting location.
19 vuotta sitten
Richard Nyberg
36ea68a4b2
No need to check for EINTR.
19 vuotta sitten
Richard Nyberg
b5ee1dba08
Must save the old time to be able to calculate the delta.
19 vuotta sitten
Richard Nyberg
c8ba22b776
Base bandwidth calculations on actual time between data points,
instead of the ideal.
19 vuotta sitten
Richard Nyberg
2cb31f1244
Update btpd.npeers in the right place.
19 vuotta sitten
Richard Nyberg
f9170e868c
Don't multiply the index by 6, it's increased by that amount each loop.
19 vuotta sitten
Richard Nyberg
b529666a82
Use compact mode for tracker requests.
19 vuotta sitten
Richard Nyberg
307b9a50aa
Before, the count of uploaded torrent data was increases by the block size
as soon as the message head was written to the network. Now it's increased
for each byte of torrent data we've written.
19 vuotta sitten
Richard Nyberg
b84c77f1f7
New algorithm for bandwidth limitation.
19 vuotta sitten
Richard Nyberg
c375a92236
Rename TAILQ to BTPDQ to avoid macro redefinition,
which may happen if some other header includes sys/queue.h.
19 vuotta sitten
Richard Nyberg
2131b9c00e
test(1) uses '=' as the equality operator, not '=='.
19 vuotta sitten
Richard Nyberg
33e4dfd65f
Separate the child struct from worker specific data.
19 vuotta sitten
Richard Nyberg
f25e5b2856
sprintf -> snprintf
Removed two unnecessary assignments.
19 vuotta sitten
Richard Nyberg
4dd1bad88c
* Indicate that this is not version 0.1 any more.
* Change email address.
* Better tests for curl.
19 vuotta sitten
Richard Nyberg
6af4c680d1
Changed email address.
19 vuotta sitten
Richard Nyberg
78c9ff4bb4
Create main development area.
19 vuotta sitten
Richard Nyberg
dd0d462afa
Import btpd-0.1.
git-svn-id: file:///home/rnyberg/svngit/btpd/releases/0.1@1 76a1f634-46fa-0310-9943-bd1476092a85
19 vuotta sitten