Revision d263a301 streaming.c

View differences:

streaming.c
37 37

  
38 38
#include "scheduler_la.h"
39 39

  
40
#define CB_SIZE_TIME 4*1e6
41

  
40 42
static bool heuristics_distance_maxdeliver = false;
41 43
static int bcast_after_receive_every = 0;
42 44
static bool neigh_on_chunk_recv = false;
......
376 378
int needs(struct peer *n, int cid){
377 379
  struct peer * p = n;
378 380

  
381
  if (get_chunk_timestamp(cid) < gettimeofday_in_us() - CB_SIZE_TIME) {
382
    return 0;
383
  }
384

  
379 385
  //dprintf("\t%s needs c%d ? :",node_addr(p->id),c->id);
380 386
  if (! p->bmap) {
381 387
    //dprintf("no bmap\n");
......
389 395
    return 0;
390 396
  }
391 397

  
398
  if (get_chunk_timestamp(cid) < gettimeofday_in_us() - CB_SIZE_TIME) {
399
    return 0;
400
  }
401

  
392 402
  if (chunkID_set_check(cset,cid) < 0) { //it might need the chunk
393 403
    int missing, min;
394 404
    //@TODO: add some bmap_timestamp based logic

Also available in: Unified diff