X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnode.c;h=83f4a743e92547bd0a582a470647c2995870d1c8;hb=1e08f518b26db292ad81ce44fc0df06f4df3a869;hp=527970540868007a5296bca04b0d8e2a277b5cf8;hpb=98376916eae96a058d4291187d3960eeea218fee;p=meshlink diff --git a/src/node.c b/src/node.c index 52797054..83f4a743 100644 --- a/src/node.c +++ b/src/node.c @@ -21,6 +21,7 @@ #include "hash.h" #include "logger.h" +#include "meshlink_internal.h" #include "net.h" #include "netutl.h" #include "node.h" @@ -31,8 +32,6 @@ splay_tree_t *node_tree; static hash_t *node_udp_cache; -node_t *myself; - static int node_compare(const node_t *a, const node_t *b) { return strcmp(a->name, b->name); } @@ -105,8 +104,8 @@ node_t *lookup_node_udp(const sockaddr_t *sa) { } void update_node_udp(node_t *n, const sockaddr_t *sa) { - if(n == myself) { - logger(DEBUG_ALWAYS, LOG_WARNING, "Trying to update UDP address of myself!"); + if(n == mesh->self) { + logger(DEBUG_ALWAYS, LOG_WARNING, "Trying to update UDP address of mesh->self!"); return; }