Browse Source

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.
master
Richard Nyberg 19 years ago
parent
commit
e485377f95
3 changed files with 9 additions and 2 deletions
  1. +7
    -0
      CHANGES
  2. +1
    -1
      btpd/net.c
  3. +1
    -1
      configure.ac

+ 7
- 0
CHANGES View File

@@ -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: btpd-0.4:
--------- ---------




+ 1
- 1
btpd/net.c View File

@@ -788,7 +788,6 @@ net_shake_read(struct peer *p, unsigned long rmax)
btpd_log(BTPD_L_CONN, "Got whole shake.\n"); btpd_log(BTPD_L_CONN, "Got whole shake.\n");
free(hs); free(hs);
p->piece_field = btpd_calloc(1, (int)ceil(p->tp->meta.npieces / 8.0)); p->piece_field = btpd_calloc(1, (int)ceil(p->tp->meta.npieces / 8.0));
cm_on_new_peer(p);
net_generic_reader(p); net_generic_reader(p);
if (p->tp->have_npieces > 0) { if (p->tp->have_npieces > 0) {
if (p->tp->have_npieces * 9 < 5 + ceil(p->tp->meta.npieces / 8.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 else
net_send_bitfield(p); net_send_bitfield(p);
} }
cm_on_new_peer(p);
} else } else
event_add(&p->in_ev, NULL); event_add(&p->in_ev, NULL);




+ 1
- 1
configure.ac View File

@@ -1,4 +1,4 @@
AC_INIT(btpd, 0.4, btpd@murmeldjur.se)
AC_INIT(btpd, 0.5, btpd@murmeldjur.se)


AC_CANONICAL_TARGET AC_CANONICAL_TARGET




Loading…
Cancel
Save