Revision 50f1ec20

View differences:

streaming.c
34 34
#include "topology.h"
35 35
#include "measures.h"
36 36
#include "scheduling.h"
37
#include "transaction.h"
37 38

  
38 39
#include "scheduler_la.h"
39 40

  
......
52 53
struct chunk_buffer *cb;
53 54
static struct input_desc *input;
54 55
static int cb_size;
55
static int transid=0;
56 56

  
57 57
static int offer_per_tick = 1;	//N_p parameter of POLITO
58 58

  
......
458 458
  int i, d, cset_acc_size, res;
459 459
  struct peer *to = nodeid_to_peer(toid, 0);
460 460

  
461
  transaction_reg_accept(trans_id, to->id);
462

  
461 463
  cset_acc_size = chunkID_set_size(cset_acc);
462 464
  reg_offer_accept(cset_acc_size > 0 ? 1 : 0);	//this only works if accepts are sent back even if 0 is accepted
463 465
  for (i = 0, d=0; i < cset_acc_size && d < max_deliver; i++) {
......
533 535
    selectPeersForChunks(SCHED_WEIGHTING, nodeids, n, chunkids, size, selectedpeers, &selectedpeers_len, SCHED_NEEDS, SCHED_PEER);
534 536

  
535 537
    for (i=0; i<selectedpeers_len ; i++){
538
      int transid = transaction_create(selectedpeers[i]);
536 539
      int max_deliver = offer_max_deliver(selectedpeers[i]->id);
537 540
      struct chunkID_set *my_bmap = cb_to_bmap(cb);
538 541
      dprintf("\t sending offer(%d) to %s, cb_size: %d\n", transid, node_addr(selectedpeers[i]->id), selectedpeers[i]->cb_size);

Also available in: Unified diff