X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=6cb8037940f7296a1be2c99a5dacda3929f19864;hp=c8c41d9f9f5d53c543f291ee08e1f50863d803c1;hb=54b756f7dfb71c5622b7738fd449e126da959864;hpb=2165931c62f0433fd97bd3ac6aefea3627218946 diff --git a/src/protocol.c b/src/protocol.c index c8c41d9f..6cb80379 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.114 2001/10/30 16:34:32 guus Exp $ + $Id: protocol.c,v 1.28.4.116 2001/10/31 20:02:06 guus Exp $ */ #include "config.h" @@ -232,11 +232,11 @@ cp syslog(LOG_ERR, _("Peer %s had unknown identity (%s)"), c->hostname, c->name); return -1; } + } - if(read_rsa_public_key(c)) - { - return -1; - } + if(read_rsa_public_key(c)) + { + return -1; } c->allow_request = METAKEY; @@ -682,7 +682,7 @@ cp /* Run MST and SSSP algorithms */ mst_kruskal(); - sssp_bfs(); + sssp_bfs(0); cp return 0; } @@ -912,12 +912,11 @@ cp int del_node_h(connection_t *c) { node_t *n; - edge_t *e; char name[MAX_STRING_SIZE]; ipv4_t address; port_t port; connection_t *other; - avl_node_t *node, *next; + avl_node_t *node; cp if(sscanf(c->buffer, "%*d "MAX_STRING" %lx:%hd", name, &address, &port) != 3) { @@ -969,21 +968,12 @@ cp send_del_node(other, n); } - /* Delete all edges associated with the node */ - - for(node = n->edge_tree->head; node; node = next) - { - next = node->next; - e = (edge_t *)node->data; - edge_del(e); - } - /* Delete the node */ node_del(n); mst_kruskal(); - sssp_bfs(); + sssp_bfs(0); cp return 0; } @@ -1082,7 +1072,7 @@ cp /* Run MST before or after we tell the rest? */ mst_kruskal(); - sssp_bfs(); + sssp_bfs(0); cp return 0; } @@ -1178,7 +1168,7 @@ cp /* Run MST before or after we tell the rest? */ mst_kruskal(); - sssp_bfs(); + sssp_bfs(1); cp return 0; }