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:
#include <netinet/in.h>
#include <avl_tree.h>
+#include <hooks.h>
#include <utils.h>
#include "netutl.h"
#include "node.h"
#include "edge.h"
#include "connection.h"
-#include "process.h"
#include "logging.h"
#include "system.h"
halfconnection_t to_hc, from_hc;
avl_tree_t *todo_tree;
int indirect;
- char *name;
todo_tree = avl_alloc_tree(NULL, NULL);
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
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);
}
}
}