Revision 304607e2 topology.c

View differences:

topology.c
253 253
  static const struct metadata *metas;
254 254
  struct peer *peers;
255 255
  struct timeval tnow, told;
256
  static const struct nodeID **savedids;
257
  static int savedids_size;
256 258

  
257 259
  if timerisset(&tout_bmap) {
258 260
    gettimeofday(&tnow, NULL);
......
311 313
  n_ids = peerset_size(pset);
312 314
  newids = topoGetNeighbourhood(&newids_size);	//TODO handle both tman and topo
313 315
  metas = topGetMetadata(&metasize);	//TODO: check metasize
314
  max_ids = n_ids + newids_size;
316
  max_ids = n_ids + savedids_size + newids_size;
315 317
  ftprintf(stderr,"Topo modify start peers:%d candidates:%d\n", n_ids, newids_size);
316 318
  {
317
    static const struct nodeID **savedids;
318
    static int savedids_size;
319 319
    int desired_part;
320 320
    const struct nodeID *oldids[max_ids], *nodeids[max_ids], *candidates[max_ids], *desireds[max_ids], *selecteds[max_ids], *others[max_ids], *toadds[max_ids], *toremoves[max_ids];
321 321
    int oldids_size, nodeids_size, candidates_size, desireds_size, selecteds_size, others_size, toadds_size, toremoves_size, keep_size, random_size;

Also available in: Unified diff