Revision a2859bcd som/ChunkTrading/chunk_signalling.c

View differences:

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