Revision 0ebdcf82 chunk_signaling.c

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
    }

Also available in: Unified diff