X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftop.c;h=dc1fecf30d9eb7521fbe9ff5398c6b7362443063;hb=80ca91769d48e546d3e4cde03c2eb2820c03acc4;hp=62c46f5ddcdd556b1a894e9b901734ca4d5247fb;hpb=311f60f4f0bdf974d4890d7eb4a752299d1c9458;p=tinc diff --git a/src/top.c b/src/top.c index 62c46f5d..dc1fecf3 100644 --- a/src/top.c +++ b/src/top.c @@ -108,7 +108,9 @@ static void update(int fd) { } else { found = xmalloc_and_zero(sizeof *found); found->name = xstrdup(name); - list_insert_after(&node_list, i, found); + fprintf(stderr, "Inserting %s before %s\n", found->name, node->name); + list_insert_before(&node_list, i, found); + changed = true; break; } } @@ -117,6 +119,7 @@ static void update(int fd) { found = xmalloc_and_zero(sizeof *found); found->name = xstrdup(name); list_insert_tail(&node_list, found); + changed = true; } found->known = true;