Revision ff3e49b8

View differences:

topology.c
321 321
      peerset_add_peer(pset_outgoing, id);
322 322
      if (m) peerset_get_peer(pset_outgoing, id)->cb_size = m->cb_size;
323 323
      if (m) peerset_get_peer(pset_outgoing, id)->capacity = m->capacity;
324
      /* add measures here */
325
      add_measures(id);
326 324
      send_bmap(id);
327 325
  }
328 326
  if (incoming) {
......
330 328
      peerset_add_peer(pset_incoming, id);
331 329
      if (m) peerset_get_peer(pset_incoming, id)->cb_size = m->cb_size;
332 330
      if (m) peerset_get_peer(pset_incoming, id)->capacity = m->capacity;
331
      /* add measures here */
332
      add_measures(id);
333 333
      send_topo_msg(id, STREAMER_TOPOLOGY_MSG_ADD);
334 334
  }
335 335
}
......
338 338
{
339 339
  if (outgoing) {
340 340
      dtprintf("Removing %s from outgoing neighbourhood!\n", node_addr(id));
341
      /* delete measures here */
342
      delete_measures(id);
343 341
      peerset_remove_peer(pset_outgoing, id);
344 342
  }
345 343
  if (incoming) {
346 344
      dtprintf("Topo: explicit remove message sent!!! to %s (peers:%d)\n", node_addr(id));
347 345
      peerset_remove_peer(pset_incoming, id);
346
      /* delete measures here */
347
      delete_measures(id);
348 348
      send_topo_msg(id, STREAMER_TOPOLOGY_MSG_REMOVE);
349 349
  }
350 350
}
......
426 426
  ra = add_noise(get_rtt_of(*a), alpha_target);
427 427
  rb = add_noise(get_rtt_of(*b), alpha_target);
428 428
  
429
  fprintf(stderr, "RTTS: %s %f %s %f\n", node_addr(*a), ra, node_addr(*b), rb );
430 429
  if ((isnan(ra) && isnan(rb)) || ra == rb) return 0;
431 430
  else if (isnan(rb) || ra < rb) return -1;
432 431
  else return 1;

Also available in: Unified diff