Revision 37ba82c3

View differences:

streaming.c
281 281
  }
282 282
}
283 283

  
284
void ack_chunk(struct chunk *c, struct nodeID *from)
284
void ack_chunk(struct chunk *c, struct nodeID *from, uint16_t trans_id)
285 285
{
286 286
  //reduce load a little bit if there are losses on the path from this guy
287 287
  double average_lossrate = get_average_lossrate_pset(get_peers());
......
289 289
  if (rand()/((double)RAND_MAX + 1) < 1 * average_lossrate ) {
290 290
    return;
291 291
  }
292
  send_bmap(from);	//send explicit ack
292
  send_ack(from, trans_id);	//send explicit ack
293 293
}
294 294

  
295 295
void received_chunk(struct nodeID *from, const uint8_t *buff, int len)
......
320 320
    if (p) {	//now we have it almost sure
321 321
      chunkID_set_add_chunk(p->bmap,c.id);	//don't send it back
322 322
    }
323
    ack_chunk(&c,from);	//send explicit ack
323
    ack_chunk(&c, from, transid);	//send explicit ack
324 324
    if (bcast_after_receive_every && bcast_cnt % bcast_after_receive_every == 0) {
325 325
       bcast_bmap();
326 326
    }

Also available in: Unified diff