Fix nodes joining the VPN after tincctl top started.

This commit is contained in:
Guus Sliepen 2011-06-02 21:14:50 +02:00
parent 311f60f4f0
commit 80ca91769d
3 changed files with 25 additions and 1 deletions

View file

@ -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;