Revision 49bf6fbe

View differences:

Makefile
1
PEER_SCHED ?= ch_earliest_free_peer
2
CHUNK_SCHED ?= dl_sched
1
PEER_SCHED ?= ch_useful_peer_weighted_random
2
CHUNK_SCHED ?= dest_earliest_useful_chunk #dl_sched
3 3

  
4 4
CFLAGS = -std=c99 -Wall
5 5
ifndef DBG
6 6
CFLAGS += -O8
7 7
endif
8
CFLAGS += -g -I EventScheduler/ -I Matrix/
8
CFLAGS += -g -I EventScheduler/ -IMatrix/
9 9
LDLIBS = -lm 
10 10

  
11
CPPFLAGS += -Dpeer_send=peer_send_c_p
11
CPPFLAGS += -Dpeer_send=peer_send_p_c
12 12
CPPFLAGS += -Dpeer_sched=$(PEER_SCHED)
13 13
CPPFLAGS += -Dchunk_sched=$(CHUNK_SCHED)
14 14

  
sched.c
723 723
void peer_send_p_c(struct peer *p, int t, int *chunk, struct peer **target)
724 724
{
725 725
  *target = peer_sched(p, t, t);
726
  if (*target < 0) {
726
  if (*target == NULL) {
727 727
    if (trace) fprintf(trace, "\tPeer %d: Idle (no peer to send to)\n", p->id);
728 728
    return;
729 729
  }

Also available in: Unified diff