]> git.meshlink.io Git - meshlink/blobdiff - src/graph.c
Update THANKS and copyright information.
[meshlink] / src / graph.c
index 9dd3fa5df7e94537ed80a94fdebf672f9784f53c..e0c48d42890425e337ab62cee1b9ec2c09a8fb17 100644 (file)
@@ -1,6 +1,6 @@
 /*
     graph.c -- graph algorithms
-    Copyright (C) 2001-2006 Guus Sliepen <guus@tinc-vpn.org>,
+    Copyright (C) 2001-2009 Guus Sliepen <guus@tinc-vpn.org>,
                   2001-2005 Ivo Timmermans
 
     This program is free software; you can redistribute it and/or modify
@@ -101,7 +101,7 @@ void mst_kruskal(void)
 
        /* Starting point */
 
-       for(node = edge_weight_tree->head; node; node = next) {
+       for(node = edge_weight_tree->head; node; node = node->next) {
                e = node->data;
                if(e->from->status.reachable) {
                        e->from->status.visited = true;
@@ -313,6 +313,7 @@ void sssp_bfs(void)
 
 void graph(void)
 {
+       subnet_cache_flush();
        sssp_bfs();
        mst_kruskal();
        graph_changed = true;
@@ -374,6 +375,9 @@ void dump_graph(void)
                pclose(file);
        } else {
                fclose(file);
+#ifdef HAVE_MINGW
+               unlink(filename);
+#endif
                rename(tmpname, filename);
                free(tmpname);
        }