- x = send_request(mesh, c, "%d %x %s %d %s %s %s %d %x %d", ADD_EDGE, rand(),
- e->from->name, e->from->devclass, e->to->name, address, port, e->to->devclass,
- e->options, e->weight);
+ if(e->from->submesh) {
+ from_submesh = e->from->submesh->name;
+ } else {
+ from_submesh = CORE_MESH;
+ }
+
+ if(e->to->submesh) {
+ to_submesh = e->to->submesh->name;
+ } else {
+ to_submesh = CORE_MESH;
+ }
+
+ if(e->from->submesh) {
+ s = e->from->submesh;
+ } else {
+ s = e->to->submesh;
+ }
+
+ x = send_request(mesh, c, s, "%d %x %s %d %s %s %s %s %d %s %x %d %d", ADD_EDGE, rand(),
+ e->from->name, e->from->devclass, from_submesh, e->to->name, address, port,
+ e->to->devclass, to_submesh, e->options, e->weight, contradictions);