Revision aa2355c3

View differences:

streaming.c
550 550
#endif
551 551
}
552 552

  
553
static struct chunkID_set * compose_offer_cset(void)
554
{
555
  return cb_to_bmap(cb);
556
}
557

  
558

  
553 559
void send_offer()
554 560
{
555 561
  struct chunk *buff;
......
585 591
    for (i=0; i<selectedpeers_len ; i++){
586 592
      int transid = transaction_create(selectedpeers[i]->id);
587 593
      int max_deliver = offer_max_deliver(selectedpeers[i]->id);
588
      struct chunkID_set *my_bmap = cb_to_bmap(cb);
594
      struct chunkID_set *offer_cset = compose_offer_cset();
589 595
      dprintf("\t sending offer(%d) to %s, cb_size: %d\n", transid, node_addr(selectedpeers[i]->id), selectedpeers[i]->cb_size);
590
      res = offerChunks(selectedpeers[i]->id, my_bmap, max_deliver, transid++);
591
      chunkID_set_free(my_bmap);
596
      res = offerChunks(selectedpeers[i]->id, offer_cset, max_deliver, transid++);
597
      chunkID_set_free(offer_cset);
592 598
    }
593 599
  }
594 600
}

Also available in: Unified diff