]> git.meshlink.io Git - meshlink/commitdiff
Change level of some debug messages, zero pointer after freeing hostname.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 11 Jun 2009 17:39:25 +0000 (19:39 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 11 Jun 2009 17:39:25 +0000 (19:39 +0200)
src/net_packet.c
src/node.c

index 5e503f581c3ff9c9dc0725309b462ef471ad0d98..31c44771967a2d62f35da6c34eade0f4411cfc9d 100644 (file)
@@ -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;
        }
 
index 9d3592535c267dcdcfca714045abf272f3c575cb..a4ef78f27271647f0b53fb60d8270825510675a7 100644 (file)
@@ -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);
        }
 }