X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Fgraph.c;fp=src%2Fgraph.c;h=f953263212c650fa726954ccaaa064c826641602;hp=e8e8baf4a0d1aef063ec59c89144358f2fc7bdcb;hb=4c1a4e8a790584e4c7d5c0f2485706f4c01e1911;hpb=a77b35e748b7cf4cf7ac31750cefab7b2b0325f5 diff --git a/src/graph.c b/lib/graph.c similarity index 96% rename from src/graph.c rename to lib/graph.c index e8e8baf4..f9532632 100644 --- a/src/graph.c +++ b/lib/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.4 2002/04/28 12:46:26 zarq Exp $ + $Id: graph.c,v 1.1 2002/05/02 11:50:07 zarq Exp $ */ /* We need to generate two trees from the graph: @@ -55,13 +55,13 @@ #include #include +#include #include #include "netutl.h" #include "node.h" #include "edge.h" #include "connection.h" -#include "process.h" #include "logging.h" #include "system.h" @@ -156,7 +156,6 @@ void sssp_bfs(void) halfconnection_t to_hc, from_hc; avl_tree_t *todo_tree; int indirect; - char *name; todo_tree = avl_alloc_tree(NULL, NULL); @@ -260,9 +259,7 @@ void sssp_bfs(void) if(debug_lvl >= DEBUG_TRAFFIC) syslog(LOG_DEBUG, _("Node %s (%s) became reachable"), n->name, n->hostname); n->status.reachable = 1; - asprintf(&name, "hosts/%s-up", n->name); - execute_script(name); - free(name); + run_hooks("node-visible", n); } } else @@ -275,9 +272,7 @@ void sssp_bfs(void) n->status.validkey = 0; n->status.waitingforkey = 0; n->sent_seqno = 0; - asprintf(&name, "hosts/%s-down", n->name); - execute_script(name); - free(name); + run_hooks("node-invisible", n); } } }