projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a global list to track outgoing connections.
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
f52afb0
..
c413792
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-571,18
+571,12
@@
void close_network_connections(void)
for(node = connection_tree->head; node; node = next) {
next = node->next;
c = node->data;
for(node = connection_tree->head; node; node = next) {
next = node->next;
c = node->data;
-
- if(c->outgoing) {
- if(c->outgoing->ai)
- freeaddrinfo(c->outgoing->ai);
- free(c->outgoing->name);
- free(c->outgoing);
- c->outgoing = NULL;
- }
-
+ c->outgoing = false;
terminate_connection(c, false);
}
terminate_connection(c, false);
}
+ list_delete_list(outgoing_list);
+
if(myself && myself->connection) {
subnet_update(myself, NULL, false);
terminate_connection(myself->connection, false);
if(myself && myself->connection) {
subnet_update(myself, NULL, false);
terminate_connection(myself->connection, false);