Revision 2d4a594b streaming.c

View differences:

streaming.c
361 361
  return 1;
362 362
}
363 363

  
364
uint64_t get_chunk_timestamp(int cid){
365
  const struct chunk *c = cb_get_chunk(cb, cid);
366
  if (!c) return 0;
367

  
368
  return c->timestamp;
369
}
370

  
364 371
/**
365 372
 *example function to filter chunks based on whether a given peer needs them.
366 373
 *
......
440 447
  return (double) *cid;
441 448
}
442 449

  
443
double getChunkTimestamp(int *cid){
444
  const struct chunk *c = cb_get_chunk(cb, *cid);
445
  if (!c) return 0;
446

  
447
  return (double) c->timestamp;
450
double chunkScoreTimestamp(int *cid){
451
  return (double) get_chunk_timestamp(*cid);
448 452
}
449 453

  
450 454
void send_accepted_chunks(struct nodeID *toid, struct chunkID_set *cset_acc, int max_deliver, uint16_t trans_id){

Also available in: Unified diff