Revision 4123e0f7 sched.c

View differences:

sched.c
738 738
  if (trace) fprintf(trace, "\tPeer %d: %d ---> %d\n", p->id, *chunk, (*target)->id);
739 739
}
740 740

  
741
void peer_send_chunk(struct peer *p, int t, int *chunk, struct peer *target)
742
{
743
  *chunk = chunk_sched(p, t, target);
744
  if (*chunk < 0) {
745
    if (trace) fprintf(trace, "\tPeer %d: Idle (no chunk that %d needs)\n", p->id, (target)->id);
746
    return;
747
  }
748
  
749
  if (trace) fprintf(trace, "\tPeer %d: %d ---> %d\n", p->id, *chunk, (target)->id);
750
}
751

  
741 752
/* Should be probably merged with peer_send_c_p */
742 753
void peer_send_utility(struct peer *p, int t, int *chunk, struct peer **target)
743 754
{

Also available in: Unified diff