#include "conf.h"
#include "connection.h"
-#include "edge.h"
-#include "graph.h"
#include "logger.h"
#include "meshlink_internal.h"
#include "meta.h"
#include "xalloc.h"
#include "submesh.h"
+#if 0
bool send_add_edge(meshlink_handle_t *mesh, connection_t *c, const edge_t *e, int contradictions) {
bool x;
char *address, *port;
return x;
}
+#endif
bool add_edge_h(meshlink_handle_t *mesh, connection_t *c, const char *request) {
assert(request);
assert(*request);
+ (void)mesh;
+ (void)c;
+#if 0
edge_t *e;
node_t *from, *to;
char from_name[MAX_STRING_SIZE];
if(!from) {
from = new_node();
from->status.dirty = true;
- from->status.blacklisted = mesh->default_blacklist;
+ from->status.blacklisted = false;
from->name = xstrdup(from_name);
from->devclass = from_devclass;
if(!to) {
to = new_node();
to->status.dirty = true;
- to->status.blacklisted = mesh->default_blacklist;
+ to->status.blacklisted = false;
to->name = xstrdup(to_name);
to->devclass = to_devclass;
/* Tell the rest about the new edge */
forward_request(mesh, c, s, request);
+#endif
+ /* TODO: Check if this is an edge we would own */
return true;
}
+#if 0
bool send_del_edge(meshlink_handle_t *mesh, connection_t *c, const edge_t *e, int contradictions) {
submesh_t *s = NULL;
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);
}
+#endif
bool del_edge_h(meshlink_handle_t *mesh, connection_t *c, const char *request) {
assert(request);
assert(*request);
+ (void)mesh;
+ (void)c;
+#if 0
edge_t *e;
char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE];
}
}
+#endif
+
+ /* TODO: Check if this is an edge we would own. */
return true;
}