Import Upstream version 1.1~pre4
This commit is contained in:
parent
34d5939212
commit
ff64081061
48 changed files with 1739 additions and 1176 deletions
10
src/node.c
10
src/node.c
|
|
@ -78,8 +78,7 @@ void free_node(node_t *n) {
|
|||
ecdsa_free(&n->ecdsa);
|
||||
sptps_stop(&n->sptps);
|
||||
|
||||
if(timeout_initialized(&n->mtuevent))
|
||||
event_del(&n->mtuevent);
|
||||
timeout_del(&n->mtutimeout);
|
||||
|
||||
if(n->hostname)
|
||||
free(n->hostname);
|
||||
|
|
@ -129,6 +128,13 @@ void update_node_udp(node_t *n, const sockaddr_t *sa) {
|
|||
|
||||
if(sa) {
|
||||
n->address = *sa;
|
||||
n->sock = 0;
|
||||
for(int i = 0; i < listen_sockets; i++) {
|
||||
if(listen_socket[i].sa.sa.sa_family == sa->sa.sa_family) {
|
||||
n->sock = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
hash_insert(node_udp_cache, sa, n);
|
||||
free(n->hostname);
|
||||
n->hostname = sockaddr2hostname(&n->address);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue