Revision 023f180b topology.c

View differences:

topology.c
195 195
  }
196 196
  dprintf("after:%d, ",peerset_size(pset));
197 197

  
198
  gettimeofday(&tnow, NULL);
199
  timersub(&tnow, &tout_bmap, &told);
200
  peers = peerset_get_peers(pset);
201
  for (i = 0; i < peerset_size(pset); i++) {
202
    if ( (!timerisset(&peers[i].bmap_timestamp) && timercmp(&peers[i].creation_timestamp, &told, <) ) ||
203
         ( timerisset(&peers[i].bmap_timestamp) && timercmp(&peers[i].bmap_timestamp, &told, <)     )   ) {
204
      //if (peerset_size(pset) > 1) {	// avoid dropping our last link to the world
205
		topoAddToBL(peers[i].id);
198
  if timerisset(&tout_bmap) {
199
    dprintf("tcheck");
200
    gettimeofday(&tnow, NULL);
201
    timersub(&tnow, &tout_bmap, &told);
202
    peers = peerset_get_peers(pset);
203
    for (i = 0; i < peerset_size(pset); i++) {
204
      if ( (!timerisset(&peers[i].bmap_timestamp) && timercmp(&peers[i].creation_timestamp, &told, <) ) ||
205
           ( timerisset(&peers[i].bmap_timestamp) && timercmp(&peers[i].bmap_timestamp, &told, <)     )   ) {
206
        //if (peerset_size(pset) > 1) {	// avoid dropping our last link to the world
207
        topoAddToBL(peers[i].id);
206 208
        remove_peer(peers[i--].id);
207
      //}
209
        //}
210
      }
208 211
    }
209 212
  }
210 213

  

Also available in: Unified diff