Revision 851fa962 streaming.c

View differences:

streaming.c
475 475
    }
476 476

  
477 477
    for (i = 0;i < size; i++) chunkids[size - 1 - i] = (buff+i)->id;
478
    selectPeersForChunks(SCHED_WEIGHTING, nodeids, n, chunkids, size, selectedpeers, &selectedpeers_len, SCHED_NEEDS, SCHED_PEER);
478 479
    for (i = 0; i<n; i++) nodeids[i] = (neighbours+i)->id;
479
    selectPeersForChunks(SCHED_BEST, nodeids, n, chunkids, size, selectedpeers, &selectedpeers_len, needs, (transid % 2) ? peerWeightReceivedfrom : peerWeightRtt);	//select a peer that needs at least one of our chunks
480 480

  
481 481
    for (i=0; i<selectedpeers_len ; i++){
482 482
      int max_deliver = offer_max_deliver(selectedpeers[i]);

Also available in: Unified diff