Revision db206d2b

View differences:

chunk_signaling.c
30 30
#include "topology.h"
31 31
#include "dbg.h"
32 32

  
33
void bmap_received(const struct nodeID *fromid, const struct nodeID *ownerid, struct chunkID_set *c_set, int cb_size, int trans_id) {
33
void bmap_received(const struct nodeID *fromid, const struct nodeID *ownerid, struct chunkID_set *c_set, int trans_id) {
34 34
  struct peer *owner;
35 35
  if (nodeid_equal(fromid, ownerid)) {
36 36
    owner = nodeid_to_peer(ownerid,1);
......
41 41
  }
42 42
  
43 43
  if (owner) {	//now we have it almost sure
44
    chunkID_set_clear(owner->bmap,cb_size+5);	//TODO: some better solution might be needed to keep info about chunks we sent in flight.
44
    chunkID_set_clear(owner->bmap,0);	//TODO: some better solution might be needed to keep info about chunks we sent in flight.
45 45
    chunkID_set_union(owner->bmap,c_set);
46
    owner->cb_size = cb_size;
47 46
    gettimeofday(&owner->bmap_timestamp, NULL);
48 47
  }
49 48
}
streaming.c
26 26
#include "output.h"
27 27
#include "input.h"
28 28
#include "dbg.h"
29
#include "chunk_signaling.h"
30 29
#include "chunklock.h"
31 30
#include "topology.h"
32 31
#include "measures.h"
......
206 205
void send_bmap(struct peer *to)
207 206
{
208 207
  struct chunkID_set *my_bmap = cb_to_bmap(cb);
209
   sendBufferMap(to->id,NULL, my_bmap, cb_size, 0);
208
   sendBufferMap(to->id,NULL, my_bmap, 0); //FIXME: should add cb_size
210 209
  chunkID_set_free(my_bmap);
211 210
}
212 211

  
......
322 321
    //dprintf("no bmap\n");
323 322
    return 1;	// if we have no bmap information, we assume it needs the chunk (aggressive behaviour!)
324 323
  }
325
  return _needs(p->bmap, p->cb_size, cid);
324
  return _needs(p->bmap, cb_size, cid);	//FIXME: cb_size should be p->cb_size
326 325
}
327 326

  
328 327
int _needs(struct chunkID_set *cset, int cb_size, int cid){

Also available in: Unified diff