- if(!check_id(to_name)) {
- logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_EDGE", c->name,
- c->hostname, "invalid name");
+ return send_request(mesh, c, s, "%d %x %s %s %d %x", DEL_EDGE, prng(mesh, UINT_MAX),
+ e->from->name, e->to->name, contradictions, e->session_id);
+}
+
+bool del_edge_h(meshlink_handle_t *mesh, connection_t *c, const char *request) {
+ assert(request);
+ assert(*request);
+
+ edge_t *e;
+ char from_name[MAX_STRING_SIZE];
+ char to_name[MAX_STRING_SIZE];
+ node_t *from, *to;
+ int contradictions = 0;
+ uint32_t session_id = 0;
+ submesh_t *s = NULL;
+
+ if(sscanf(request, "%*d %*x "MAX_STRING" "MAX_STRING" %d %x", from_name, to_name, &contradictions, &session_id) < 2) {
+ logger(mesh, MESHLINK_ERROR, "Got bad %s from %s", "DEL_EDGE", c->name);