Revision 5a122baa

View differences:

src/Cache/topocache.c
545 545
void cache_check(const struct peer_cache *c)
546 546
{
547 547
  int i, j;
548
  int ts = 0;
548 549

  
549 550
  for (i = 0; i < c->current_size; i++) {
551
    if (c->entries[i].timestamp < ts) {
552
      fprintf(stderr, "WTF!!!! %d.ts=%d > %d.ts=%d!!!\n",
553
              i-1, ts, i, c->entries[i].timestamp);
554
      *((char *)0) = 1;
555
    }
556
    ts = c->entries[i].timestamp;
550 557
    for (j = i + 1; j < c->current_size; j++) {
551 558
      if (nodeid_equal(c->entries[i].id, c->entries[j].id)) {
552 559
        fprintf(stderr, "WTF!!!! %d = %d!!!\n", i, j);
......
565 572
  fprintf(stderr, "\tcache_size=%d, current_size=%d\n", c->cache_size, c->current_size);
566 573
  for (i = 0; i < c->current_size; i++) {
567 574
    node_addr(c->entries[i].id, addr, 256);
568
    fprintf(stderr, "\t%d: %s\n", i, addr);
575
    fprintf(stderr, "\t%d: %s[%d]\n", i, addr, c->entries[i].timestamp);
569 576
  }
570 577
  fprintf(stderr, "\n-----------------------------\n");
571 578
}

Also available in: Unified diff