diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2005-08-02 14:53:23 +0000 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2005-08-02 14:53:23 +0000 |
| commit | e485377f95d4cd7b711af8408fbf6df4a82cc41f (patch) | |
| tree | 684929e470182b10249b94201bb945d1e10bb6ec | |
| parent | 8115e481face340caef134e25993e0235b5996d0 (diff) | |
| download | btpd-e485377f95d4cd7b711af8408fbf6df4a82cc41f.tar.gz btpd-e485377f95d4cd7b711af8408fbf6df4a82cc41f.zip | |
The fix for bitfield in r59 wasn't quite correct. Instead of
being sent too early it could now be sent too late. Change version to 0.5 and document the bug fix.
| -rw-r--r-- | CHANGES | 7 | ||||
| -rw-r--r-- | btpd/net.c | 2 | ||||
| -rw-r--r-- | configure.ac | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES index a56eae3..4f32a95 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +btpd-0.5: +--------- + +Bug fixes: +- The bitfield could be sent too late. This could cause the receiving + peer to close the connection. + btpd-0.4: --------- diff --git a/btpd/net.c b/btpd/net.c index a3f611e..51dc120 100644 --- a/btpd/net.c +++ b/btpd/net.c @@ -788,7 +788,6 @@ net_shake_read(struct peer *p, unsigned long rmax) btpd_log(BTPD_L_CONN, "Got whole shake.\n"); free(hs); p->piece_field = btpd_calloc(1, (int)ceil(p->tp->meta.npieces / 8.0)); - cm_on_new_peer(p); net_generic_reader(p); if (p->tp->have_npieces > 0) { if (p->tp->have_npieces * 9 < 5 + ceil(p->tp->meta.npieces / 8.0)) @@ -796,6 +795,7 @@ net_shake_read(struct peer *p, unsigned long rmax) else net_send_bitfield(p); } + cm_on_new_peer(p); } else event_add(&p->in_ev, NULL); diff --git a/configure.ac b/configure.ac index 76230c4..eb484bb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(btpd, 0.4, btpd@murmeldjur.se) +AC_INIT(btpd, 0.5, btpd@murmeldjur.se) AC_CANONICAL_TARGET |