about summary refs log tree commit diff
AgeCommit message (Collapse)Author
2005-07-31Add items for 0.4.Richard Nyberg
2005-07-30Spelling.Richard Nyberg
2005-07-30Removed the info entry in the net_buf. The information can easilyRichard Nyberg
be extracted from the buffer data instead. Created functions to do that.
2005-07-30Better tests. peer_laden is needed beacuse the peer might haveRichard Nyberg
gotten new request if the piece was fully downloaded and found to be bad.
2005-07-30Fix style. Remove unnecessary check for EINTR.Richard Nyberg
2005-07-30All files:Richard Nyberg
Each piece must have at least one byte for their block bit array, or they will collide causing great confusion in btpd. The calculation was done wrong so this could happen for small torrents (blocks / piece < 8). policy_subr.c: * Add test for correctness. * Add missing call to cm_on_piece_full in cm_new_piece.
2005-07-30* Don't hold a net_buf on allocation. Do it when it's really needed instead.Richard Nyberg
* Add function net_unsend to safely remove network buffers from a peer's outq. Use it where needed in peer.c.
2005-07-29Make sure we don't empty the outq and leave the write callback enabled.Richard Nyberg
2005-07-29Remove dead code.Richard Nyberg
2005-07-29Rework the outgoing network buffers. The buffers now contain moreRichard Nyberg
information on what data they hold, making it unnecessary to have other lists tracking that information. Also they now have a reference count, making it possible to use the same buffer on many peers. This is only a start though. I've just done enough for btpd to work, I haven't taken advantage of the reference count yet.
2005-07-29Missing space.Richard Nyberg
2005-07-29Queue the bitfield for sending after the handshake is completed.Richard Nyberg
This fixes a bug where peer could miss pieces btpd got while the peer was in handshake. Also, btpd now sends multiple have messages instead of a bitfield when it's better to do so.
2005-07-29At each bandwidth call the remaining bandwidht counter is set to limit / hz.Richard Nyberg
Since the set hz is (almost) never achieved the denominator is now based on the average hz the last 5 seconds.
2005-07-23Spelling.Richard Nyberg
2005-07-23Use the old simpler bandwidth limiter, but run it at a configurable rate.Richard Nyberg
Let the default be 8 hz for now. Removed a try at time correction. I don't really think it'll matter and there was a potential bug if the clock went backwards. Removed net_by_second. Let the peer bandwidth calculation be handled in cm_by_second.
2005-07-22Set a 60s timeout on writes. If a write times ut the peer in question willRichard Nyberg
be killed.
2005-07-22Kill a peer when write indicates a closed connection.Richard Nyberg
2005-07-22Speling.Richard Nyberg
2005-07-22The assert is only valid if we haven't transitioned to end game.Richard Nyberg
2005-07-22Remove fixed item.Richard Nyberg
2005-07-21Add item for 0.3.Richard Nyberg
2005-07-21Code shuffle.Richard Nyberg
2005-07-21* Use torrent_get_piece instead of loop. Check for correctness.Richard Nyberg
* Don't decrease busy count on a piece when a block arrives in end game. The busy count should always be zero at that stage.
2005-07-21Prepare for release 0.3.Richard Nyberg
2005-07-21Clear flag for busy blocks when entering end game.Richard Nyberg
Add test for program correctness.
2005-07-21No need to test piece_full in end game mode.Richard Nyberg
Added test for program correctness.
2005-07-21Add tests for correctness.Richard Nyberg
2005-07-21Increase the number of requests to pipe to 10.Richard Nyberg
2005-07-21The test for if we should call cm_on_undownload or not wasn'tRichard Nyberg
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.
2005-07-21Introduce the -d option.Richard Nyberg
2005-07-20Missed to update peer->nreqs_out at a couple of places.Richard Nyberg
2005-07-20Peers wasn't removed from the list of unattached peers before beingRichard Nyberg
added to the torrent list. This bug crept in because this file was based on an earlier version of policy.c.
2005-07-20Don't try to assign requests if the peer already has enough requests.Richard Nyberg
2005-07-20Rework the download algorithm. This isn't tested yet, but it compilesRichard Nyberg
so it must be bug free :)
2005-07-19Remove -Wall -Werror from the default CFLAGS.Richard Nyberg
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.
2005-07-17Use net_read_to_buf in net_generic_read.Richard Nyberg
2005-07-17Add net_read_to_buf getting rid of some common code. I should makeRichard Nyberg
net_generic_read use a real io_buffer and this function too.
2005-07-17Make changes in the choke/interest state of a peer visible to theRichard Nyberg
policy on a lower level.
2005-07-17* Better interface between the net and peer code.Richard Nyberg
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.
2005-07-07This is version 0.2.Richard Nyberg
2005-07-07Add CHANGES. A file describing changes between versions of btpd.Richard Nyberg
2005-07-07*) Add one item.Richard Nyberg
*) Don't call names. *) Don't think it's neccessary to include fixing of general bugs.
2005-07-07Add check so that we don't connect to more peers than we should.Richard Nyberg
2005-07-07Write "1 torrent." instead of "1 torrents.".Richard Nyberg
2005-07-07The generic reader didn't have a buffer that was large enough toRichard Nyberg
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!
2005-07-07Accept more data from tracker.Richard Nyberg
2005-07-06It wasn't safe to modify the list from within the loop. Fixed it.Richard Nyberg
2005-07-06Keep peers not attached to a torrent on a list,Richard Nyberg
making it possible to remove peers in mid hand- shake when removing a torrent.
2005-07-04Remove #if 0'ed code.Richard Nyberg
2005-07-04Remove unused label.Richard Nyberg