Revision 8e750be6

View differences:

chunk_signaling.c
31 31

  
32 32
static bool neigh_on_sign_recv = false;
33 33

  
34
void bmap_received(const struct nodeID *fromid, const struct nodeID *ownerid, struct chunkID_set *c_set, int cb_size, int trans_id) {
34
void bmap_received(const struct nodeID *fromid, const struct nodeID *ownerid, struct chunkID_set *c_set, int cb_size, uint16_t trans_id) {
35 35
  struct peer *owner;
36 36
  if (nodeid_equal(fromid, ownerid)) {
37 37
    owner = nodeid_to_peer(ownerid, neigh_on_sign_recv);
......
49 49
  }
50 50
}
51 51

  
52
void offer_received(const struct nodeID *fromid, struct chunkID_set *cset, int max_deliver, int trans_id) {
52
void offer_received(const struct nodeID *fromid, struct chunkID_set *cset, int max_deliver, uint16_t trans_id) {
53 53
  struct chunkID_set *cset_acc;
54 54

  
55 55
  struct peer *from = nodeid_to_peer(fromid, neigh_on_sign_recv);
......
72 72
    chunkID_set_free(cset_acc);
73 73
}
74 74

  
75
void accept_received(const struct nodeID *fromid, struct chunkID_set *cset, int max_deliver, int trans_id) {
75
void accept_received(const struct nodeID *fromid, struct chunkID_set *cset, int max_deliver, uint16_t trans_id) {
76 76
  struct peer *from = nodeid_to_peer(fromid,0);   //verify that we have really offered, 0 at least garantees that we've known the peer before
77 77
  dprintf("The peer %s accepted our offer for %d chunks, max deliver %d.\n", node_addr(fromid), chunkID_set_size(cset), max_deliver);
78 78

  
streaming.c
184 184
}
185 185

  
186 186
// a simple implementation that request everything that we miss ... up to max deliver
187
struct chunkID_set *get_chunks_to_accept(struct nodeID *fromid, const struct chunkID_set *cset_off, int max_deliver, int trans_id){
187
struct chunkID_set *get_chunks_to_accept(struct nodeID *fromid, const struct chunkID_set *cset_off, int max_deliver, uint16_t trans_id){
188 188
  struct chunkID_set *cset_acc, *my_bmap;
189 189
  int i, d, cset_off_size;
190 190
  //double lossrate;
......
435 435
  return (double) c->timestamp;
436 436
}
437 437

  
438
void send_accepted_chunks(struct nodeID *toid, struct chunkID_set *cset_acc, int max_deliver, int trans_id){
438
void send_accepted_chunks(struct nodeID *toid, struct chunkID_set *cset_acc, int max_deliver, uint16_t trans_id){
439 439
  int i, d, cset_acc_size, res;
440 440
  struct peer *to = nodeid_to_peer(toid, 0);
441 441

  
streaming.h
15 15
void send_chunk();
16 16
struct chunk *generated_chunk(suseconds_t *delta);
17 17
int add_chunk(struct chunk *c);
18
struct chunkID_set *get_chunks_to_accept(struct nodeID *fromid, const struct chunkID_set *cset_off, int max_deliver, int trans_id);
18
struct chunkID_set *get_chunks_to_accept(struct nodeID *fromid, const struct chunkID_set *cset_off, int max_deliver, uint16_t trans_id);
19 19
void send_offer();
20
void send_accepted_chunks(struct nodeID *to, struct chunkID_set *cset_acc, int max_deliver, int trans_id);
20
void send_accepted_chunks(struct nodeID *to, struct chunkID_set *cset_acc, int max_deliver, uint16_t trans_id);
21 21
void send_bmap(struct nodeID *to);
22 22

  
23 23
#endif	/* STREAMING_H */

Also available in: Unified diff