- syslog(LOG_ERR, _("Warning: got DEL_HOST from %s (%s) for ourself, restarting"),
- cl->name, cl->hostname);
- sighup = 1;
- return 0;
+ /* Check if it matches */
+ }
+ else
+ {
+ e = new_edge();
+ e->from = from;
+ e->to = to;
+ e->options = options;
+ e->weight = weight;
+ edge_add(e);
+ }
+
+ /* Tell the rest about the new edge */
+
+ for(node = connection_tree->head; node; node = node->next)
+ {
+ other = (connection_t *)node->data;
+ if(other->status.active && other != c)
+ send_add_edge(other, e);
+ }
+
+ /* Run MST before or after we tell the rest? */
+
+ mst_kruskal();
+ sssp_bfs();
+cp
+ return 0;
+}
+
+int send_del_edge(connection_t *c, edge_t *e)
+{
+cp
+ return send_request(c, "%d %s %s %lx", DEL_EDGE,
+ e->from->name, e->to->name, e->options);
+}
+
+int del_edge_h(connection_t *c)
+{
+ edge_t *e;
+ char from_name[MAX_STRING_SIZE];
+ char to_name[MAX_STRING_SIZE];
+ node_t *from, *to;
+ long int options;
+ connection_t *other;
+ avl_node_t *node;
+cp
+ if(sscanf(c->buffer, "%*d "MAX_STRING" "MAX_STRING" %lx", from_name, to_name, &options) != 3)
+ {
+ syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_EDGE",
+ c->name, c->hostname);
+ return -1;