Browse Source

Only allocate one have message for all peers, instead of one per peer.

master
Richard Nyberg 19 years ago
parent
commit
fcbec726e5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      btpd/policy_if.c

+ 2
- 1
btpd/policy_if.c View File

@@ -137,8 +137,9 @@ cm_on_ok_piece(struct piece *pc)
tp->have_npieces++;
msync(tp->imem, tp->isiz, MS_ASYNC);

struct net_buf *have = nb_create_have(pc->index);
BTPDQ_FOREACH(p, &tp->peers, cm_entry)
peer_have(p, pc->index);
peer_send(p, have);

if (tp->endgame)
BTPDQ_FOREACH(p, &tp->peers, cm_entry)


Loading…
Cancel
Save