Revision 0ebdcf82

View differences:

chunk_signaling.c
31 31

  
32 32
static bool neigh_on_sign_recv = false;
33 33

  
34
void ack_received(const struct nodeID *fromid, struct chunkID_set *cset, int max_deliver, uint16_t trans_id) {
35
  struct peer *from = nodeid_to_peer(fromid,0);   //verify that we have really sent, 0 at least garantees that we've known the peer before
36
  dprintf("The peer %s acked our chunk %d chunks, max deliver %d, trans_id %d.\n", node_addr(fromid), chunkID_set_get_latest(cset), max_deliver, trans_id);
37
}
38

  
34 39
void bmap_received(const struct nodeID *fromid, const struct nodeID *ownerid, struct chunkID_set *c_set, int cb_size, uint16_t trans_id) {
35 40
  struct peer *owner;
36 41
  if (nodeid_equal(fromid, ownerid)) {
......
117 122
        case sig_accept:
118 123
          accept_received(fromid, c_set, chunkID_set_size(c_set), trans_id);
119 124
          break;
125
	    case sig_ack:
126
	      ack_received(fromid, c_set, chunkID_set_size(c_set), trans_id);
127
          break;
120 128
        default:
121 129
          ret = -1;
122 130
    }
streaming.c
256 256
  chunkID_set_free(my_bmap);
257 257
}
258 258

  
259
void send_ack(struct nodeID *toid, uint16_t trans_id)
260
{
261
  struct chunkID_set *my_bmap = cb_to_bmap(cb);
262
  sendAck(toid, my_bmap,trans_id);
263
  chunkID_set_free(my_bmap);
264
}
265

  
259 266
double get_average_lossrate_pset(struct peerset *pset)
260 267
{
261 268
  int i, n;

Also available in: Unified diff