From: Guus Sliepen Date: Thu, 11 Jun 2009 17:39:25 +0000 (+0200) Subject: Change level of some debug messages, zero pointer after freeing hostname. X-Git-Tag: import-tinc-1.1~592^2~27 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=de029ce46056e02908b5390da9b71a6a59133f26;p=meshlink Change level of some debug messages, zero pointer after freeing hostname. --- diff --git a/src/net_packet.c b/src/net_packet.c index 5e503f58..31c44771 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -71,7 +71,7 @@ void send_mtu_probe(node_t *n) n->mtuevent = NULL; if(!n->status.reachable) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Trying to send MTU probe to unreachable node %s (%s)"), n->name, n->hostname); + logger(LOG_DEBUG, _("Trying to send MTU probe to unreachable node %s (%s)"), n->name, n->hostname); return; } diff --git a/src/node.c b/src/node.c index 9d359253..a4ef78f2 100644 --- a/src/node.c +++ b/src/node.c @@ -176,10 +176,11 @@ void update_node_udp(node_t *n, const sockaddr_t *sa) n->hostname = sockaddr2hostname(&n->address); avl_delete(node_udp_tree, n); avl_insert(node_udp_tree, n); - logger(LOG_DEBUG, "UDP address of %s set to %s", n->name, n->hostname); + ifdebug(PROTOCOL) logger(LOG_DEBUG, "UDP address of %s set to %s", n->name, n->hostname); } else { memset(&n->address, 0, sizeof n->address); - logger(LOG_DEBUG, "UDP address of %s cleared", n->name); + n->hostname = 0; + ifdebug(PROTOCOL) logger(LOG_DEBUG, "UDP address of %s cleared", n->name); } }