+
+ /* Check if the rest matches */
+
+ if(address != n->address || port != n->port)
+ {
+ syslog(LOG_WARNING, _("Got %s from %s (%s) for %s which does not match existing entry"), "DEL_NODE", c->name, c->hostname, n->name);
+ }
+
+ /* Tell the rest about the deleted node */
+
+ for(node = connection_tree->head; node; node = node->next)
+ {
+ other = (connection_t *)node->data;
+ if(other->status.active && other != c)
+ send_del_node(other, n);
+ }
+
+ /* Delete the node */
+
+ node_del(n);
+
+ mst_kruskal();
+ sssp_bfs(0);
+cp
+ return 0;
+}
+
+/* Edges */
+
+int send_add_edge(connection_t *c, edge_t *e)
+{
+cp
+ return send_request(c, "%d %s %s %lx %d", ADD_NODE,
+ e->from->name, e->to->name, e->options, e->weight);
+}
+
+int add_edge_h(connection_t *c)
+{
+ connection_t *other;
+ edge_t *e;
+ node_t *from, *to;
+ char from_name[MAX_STRING_SIZE];
+ char to_name[MAX_STRING_SIZE];
+ long int options;
+ int weight;
+ avl_node_t *node;
+cp
+ if(sscanf(c->buffer, "%*d "MAX_STRING" "MAX_STRING" %lx %d", from_name, to_name, &options, &weight) != 4)
+ {
+ syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_EDGE", c->name, c->hostname);
+ return -1;
+ }