X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fgraph.c;h=42157b0a994b8cc29630eed36559dac9688e6cb1;hp=bb55dfdcba1c821d25fcf1f27e4c81fc5478fb7f;hb=f5dc136cfd7a3a195b75f7174722734e25f30fd9;hpb=3fba80174dbe29bcfe0d121a2a1d2e61be5ee57b diff --git a/src/graph.c b/src/graph.c index bb55dfdc..42157b0a 100644 --- a/src/graph.c +++ b/src/graph.c @@ -239,6 +239,7 @@ void sssp_bfs(void) { myself->status.visited = true; myself->status.indirect = false; myself->nexthop = myself; + myself->prevedge = NULL; myself->via = myself; list_insert_head(todo_list, myself); @@ -279,6 +280,7 @@ void sssp_bfs(void) { e->to->status.visited = true; e->to->status.indirect = indirect; e->to->nexthop = (n->nexthop == myself) ? e->to : n->nexthop; + e->to->prevedge = e; e->to->via = indirect ? n->via : e->to; e->to->options = e->options;