From b7820caf033dd1d806f5c3a424785a7b244745b1 Mon Sep 17 00:00:00 2001 From: thorkill Date: Mon, 6 Jul 2015 01:49:03 +0200 Subject: [PATCH] removed edge_clone() --- src/edge.c | 18 ------------------ src/edge.h | 1 - 2 files changed, 19 deletions(-) diff --git a/src/edge.c b/src/edge.c index fdff942b..c9252726 100644 --- a/src/edge.c +++ b/src/edge.c @@ -118,24 +118,6 @@ void edge_del(edge_t *e) { splay_delete(e->from->edge_tree, e); } -edge_t *clone_edge(edge_t *e) { - edge_t *v; - - v = new_edge(); - v->from = e->from; - v->to = e->to; - - memcpy(&v->address, &e->address, sizeof(sockaddr_t)); - memcpy(&v->local_address, &e->local_address, sizeof(sockaddr_t)); - - v->options = e->options; - v->weight = e->weight; - v->avg_rtt = e->avg_rtt; - v->connection = e->connection; - v->reverse = e->reverse; - - return v; - } edge_t *lookup_edge(node_t *from, node_t *to) { diff --git a/src/edge.h b/src/edge.h index 297d6a82..e98ade88 100644 --- a/src/edge.h +++ b/src/edge.h @@ -51,7 +51,6 @@ extern void free_edge_tree(splay_tree_t *); extern void edge_add(edge_t *); extern void edge_del(edge_t *); extern edge_t *lookup_edge(struct node_t *, struct node_t *); -extern edge_t *clone_edge(edge_t *); extern bool dump_edges(struct connection_t *); #endif /* __TINC_EDGE_H__ */