X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fgraph.c;h=fb1eb650a52c759882db714ad8792be7b9c1f9eb;hp=6841ff29ae874bd7a9ae40323016d1e7bb02eb31;hb=5fc1ed17f41f0c535cf57a4b7e00cd6d45759503;hpb=641705df90b4c41e7f5083f6cd601cbbfb1c2c85 diff --git a/src/graph.c b/src/graph.c index 6841ff29..fb1eb650 100644 --- a/src/graph.c +++ b/src/graph.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: graph.c,v 1.1.2.16 2002/09/06 09:48:39 guus Exp $ + $Id: graph.c,v 1.1.2.18 2002/09/09 19:39:58 guus Exp $ */ /* We need to generate two trees from the graph: @@ -128,6 +128,8 @@ void mst_kruskal(void) e->to->status.visited = 1; if(e->connection) e->connection->status.mst = 1; + if(e->reverse->connection) + e->reverse->connection->status.mst = 1; safe_edges++; @@ -267,9 +269,9 @@ void sssp_bfs(void) n->status.validkey = 0; n->status.waitingforkey = 0; - asprintf(&envp[0], "NETNAME=%s", netname?netname:""); - asprintf(&envp[1], "DEVICE=%s", device?device:""); - asprintf(&envp[2], "INTERFACE=%s", interface?interface:""); + asprintf(&envp[0], "NETNAME=%s", netname?:""); + asprintf(&envp[1], "DEVICE=%s", device?:""); + asprintf(&envp[2], "INTERFACE=%s", interface?:""); asprintf(&envp[3], "NODE=%s", n->name); sockaddr2str(&n->address, &address, &port); asprintf(&envp[4], "REMOTEADDRESS=%s", address);