Change level of some debug messages, zero pointer after freeing hostname.
This commit is contained in:
parent
66be914d35
commit
de029ce460
2 changed files with 4 additions and 3 deletions
|
@ -71,7 +71,7 @@ void send_mtu_probe(node_t *n)
|
||||||
n->mtuevent = NULL;
|
n->mtuevent = NULL;
|
||||||
|
|
||||||
if(!n->status.reachable) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,10 +176,11 @@ void update_node_udp(node_t *n, const sockaddr_t *sa)
|
||||||
n->hostname = sockaddr2hostname(&n->address);
|
n->hostname = sockaddr2hostname(&n->address);
|
||||||
avl_delete(node_udp_tree, n);
|
avl_delete(node_udp_tree, n);
|
||||||
avl_insert(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 {
|
} else {
|
||||||
memset(&n->address, 0, sizeof n->address);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue