Revision 77947fd5 src/ChunkTrading/chunk_signaling.c

View differences:

src/ChunkTrading/chunk_signaling.c
61 61
}
62 62

  
63 63
int parseSignaling(uint8_t *buff, int buff_len, struct nodeID **owner_id,
64
                   struct chunkID_set **cset, int *max_deliver, int *trans_id,
64
                   struct chunkID_set **cset, int *max_deliver, uint16_t *trans_id,
65 65
                   enum signaling_type *sig_type)
66 66
{
67 67
  int meta_len = 0;
......
109 109
static int sendSignaling(int type, struct nodeID *to_id,
110 110
                         const struct nodeID *owner_id,
111 111
                         const struct chunkID_set *cset, int max_deliver,
112
                         int trans_id)
112
                         uint16_t trans_id)
113 113
{
114 114
  int meta_len, msg_len;
115 115
  uint8_t *buff;
......
154 154
}
155 155

  
156 156
int requestChunks(struct nodeID *to, const ChunkIDSet *cset,
157
                  int max_deliver, int trans_id)
157
                  int max_deliver, uint16_t trans_id)
158 158
{
159 159
  return sendSignaling(MSG_SIG_REQ, to, NULL, cset, max_deliver, trans_id);
160 160
}
161 161

  
162
int deliverChunks(struct nodeID *to, ChunkIDSet *cset, int trans_id)
162
int deliverChunks(struct nodeID *to, ChunkIDSet *cset, uint16_t trans_id)
163 163
{
164 164
  return sendSignaling(MSG_SIG_DEL, to, NULL, cset, 0, trans_id);
165 165
}
166 166

  
167 167
int offerChunks(struct nodeID *to, struct chunkID_set *cset,
168
                int max_deliver, int trans_id)
168
                int max_deliver, uint16_t trans_id)
169 169
{
170 170
  return sendSignaling(MSG_SIG_OFF, to, NULL, cset, max_deliver, trans_id);
171 171
}
172 172

  
173
int acceptChunks(struct nodeID *to, struct chunkID_set *cset, int trans_id)
173
int acceptChunks(struct nodeID *to, struct chunkID_set *cset, uint16_t trans_id)
174 174
{
175 175
  return sendSignaling(MSG_SIG_ACC, to, NULL, cset, 0, trans_id);
176 176
}
177 177

  
178 178
int sendBufferMap(struct nodeID *to, const struct nodeID *owner,
179
                  struct chunkID_set *bmap, int cb_size, int trans_id)
179
                  struct chunkID_set *bmap, int cb_size, uint16_t trans_id)
180 180
{
181 181
  return sendSignaling(MSG_SIG_BMOFF, to, (!owner ? localID : owner), bmap,
182 182
                       cb_size, trans_id);
183 183
}
184 184

  
185 185
int requestBufferMap(struct nodeID *to, const struct nodeID *owner,
186
                     int trans_id)
186
                     uint16_t trans_id)
187 187
{
188 188
  return sendSignaling(MSG_SIG_BMREQ, to, (!owner?localID:owner), NULL,
189 189
                       0, trans_id);

Also available in: Unified diff