Revision d1de8494

View differences:

include/peerset.h
35 35
  * @return > 0 if the peer is correctly inserted in the set, 0 if a peer with
36 36
  *         the same nodeID is already in the set, < 0 on error
37 37
  */
38
int peerset_add_peer(struct peerset *h, const struct nodeID *id);
38
int peerset_add_peer(struct peerset *h, struct nodeID *id);
39 39

  
40 40
 /**
41 41
  * Add peers to the set.
......
47 47
  * @parameter ids the IDs of the peers to be inserted in the set
48 48
  * @parameter n length of the its array
49 49
  */
50
void peerset_add_peers(struct peerset *h, const struct nodeID **ids, int n);
50
void peerset_add_peers(struct peerset *h, struct nodeID **ids, int n);
51 51

  
52 52
 /**
53 53
  * Remove a peer from the set.
include/trade_msg_ha.h
17 17
  * @param[in] c Chunk to send
18 18
  * @return 0 on success, <0 on error
19 19
  */
20
int sendChunk(const struct nodeID *to, struct chunk *c);
20
int sendChunk(struct nodeID *to, const struct chunk *c);
21 21

  
22 22
/**
23 23
  * Init the Chunk trading stuff...
som/ChunkTrading/chunk_delivery.c
27 27

  
28 28
//TO CHECK AND CORRECT
29 29
//XXX Send data is in char while our buffer is in uint8
30
int sendChunk(const struct nodeID *to, struct chunk *c){
30
int sendChunk(struct nodeID *to, const struct chunk *c)
31
{
31 32
    int buff_len;
32 33
    uint8_t *buff;
33 34
    int res;
som/PeerSet/peerset_ops.c
39 39
  return p;
40 40
}
41 41

  
42
int peerset_add_peer(struct peerset *h, const struct nodeID *id)
42
int peerset_add_peer(struct peerset *h, struct nodeID *id)
43 43
{
44 44
  struct peer *e;
45 45
  if (peerset_check(h, id) >= 0) {
......
66 66
  return h->n_elements;
67 67
}
68 68

  
69
void peerset_add_peers(struct peerset *h, const struct nodeID **ids, int n)
69
void peerset_add_peers(struct peerset *h, struct nodeID **ids, int n)
70 70
{
71 71
  int i;
72 72

  
73 73
  for (i = 0; i < n; i++) {
74
    peerset_add_peer(h,ids[i]);
74
    peerset_add_peer(h, ids[i]);
75 75
  }
76 76
}
77 77

  

Also available in: Unified diff