Revision a2859bcd

View differences:

include/trade_sig_ha.h
69 69
 * @param[in] trans_id transaction number associated with this request.
70 70
 * @return 1 on success, <0 on error.
71 71
 */
72
int offerChunks(const struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id);
72
int offerChunks(struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id);
73 73

  
74 74
/**
75 75
 * Accept a (sub)set of chunks from a Peer.
......
83 83
 * @param[in] trans_id transaction number associated with this request.
84 84
 * @return 1 on success, <0 on error.
85 85
 */
86
int acceptChunks(const struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id);
86
int acceptChunks(struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id);
87 87

  
88 88
/**
89 89
 * Send a BufferMap to a Peer.
......
97 97
 * @param[in] trans_id transaction number associated with this send.
98 98
 * @return 1 Success, <0 on error.
99 99
 */
100
int sendBufferMap(const struct nodeID *to, const struct nodeID *owner, struct chunkID_set *bmap, int bmap_len, int trans_id);
100
int sendBufferMap(struct nodeID *to, const struct nodeID *owner, struct chunkID_set *bmap, int bmap_len, int trans_id);
101 101

  
102 102
/**
103 103
 * Request a BufferMap to a Peer.
som/ChunkTrading/chunk_signalling.c
53 53
    return 1;
54 54
}
55 55

  
56
int sendSignalling(int type, const struct nodeID *to_id, const struct nodeID *owner_id, struct chunkID_set *cset, int max_deliver, int cb_size, int trans_id)
56
int sendSignalling(int type, struct nodeID *to_id, const struct nodeID *owner_id, struct chunkID_set *cset, int max_deliver, int cb_size, int trans_id)
57 57
{
58 58
    int buff_len, meta_len, msg_len, ret;
59 59
    uint8_t *buff;
......
186 186
 * @return 1 on success, <0 on error
187 187
 */
188 188

  
189
int offerChunks(const struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id)
189
int offerChunks(struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id)
190 190
{
191 191
  return sendSignalling(MSG_SIG_OFF, to, NULL, cset, max_deliver, -1, trans_id);
192 192
}
......
203 203
 * @param[in] trans_id transaction number associated with this request
204 204
 * @return 1 on success, <0 on error
205 205
 */
206
int acceptChunks(const struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id) {
206
int acceptChunks(struct nodeID *to, struct chunkID_set *cset, int max_deliver, int trans_id) {
207 207
  return sendSignalling(MSG_SIG_ACC, to, NULL, cset, max_deliver, -1, trans_id);
208 208
}
209 209

  
......
219 219
 * @param[in] trans_id transaction number associated with this send
220 220
 * @return 1 on success, <0 on error
221 221
 */
222
int sendBufferMap(const struct nodeID *to, const struct nodeID *owner_id, struct chunkID_set *bmap, int bmap_len, int trans_id) {
222
int sendBufferMap(struct nodeID *to, const struct nodeID *owner_id, struct chunkID_set *bmap, int bmap_len, int trans_id) {
223 223
  return sendSignalling(MSG_SIG_BMOFF, to, (!owner_id?localID:owner_id), bmap, 0, bmap_len, trans_id);//owner NULL -> my buffermap
224 224
}
225 225

  

Also available in: Unified diff