- free(n->hostname);
- n->hostname = sockaddr2hostname(&n->address);
- logger(DEBUG_PROTOCOL, LOG_DEBUG, "UDP address of %s set to %s", n->name, n->hostname);
+
+ meshlink_hint_address(mesh, (meshlink_node_t *)n, &sa->sa);
+
+ if(mesh->log_level <= MESHLINK_DEBUG) {
+ char *hostname = sockaddr2hostname(&n->address);
+ logger(mesh, MESHLINK_DEBUG, "UDP address of %s set to %s", n->name, hostname);
+ free(hostname);
+ }