projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove forward declaration for do_decrement_ttl.
[tinc]
/
src
/
net_socket.c
diff --git
a/src/net_socket.c
b/src/net_socket.c
index
526d382
..
767e91e
100644
(file)
--- a/
src/net_socket.c
+++ b/
src/net_socket.c
@@
-604,9
+604,12
@@
void setup_outgoing_connection(outgoing_t *outgoing) {
if(n && n->connection) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Already connected to %s", outgoing->name);
if(n && n->connection) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Already connected to %s", outgoing->name);
-
- n->connection->outgoing = outgoing;
- return;
+ if(!n->connection->outgoing) {
+ n->connection->outgoing = outgoing;
+ return;
+ } else {
+ goto remove;
+ }
}
init_configuration(&outgoing->config_tree);
}
init_configuration(&outgoing->config_tree);
@@
-617,12
+620,16
@@
void setup_outgoing_connection(outgoing_t *outgoing) {
if(n)
outgoing->aip = outgoing->ai = get_known_addresses(n);
if(!outgoing->ai) {
if(n)
outgoing->aip = outgoing->ai = get_known_addresses(n);
if(!outgoing->ai) {
- logger(DEBUG_ALWAYS, LOG_
ERR
, "No address known for %s", outgoing->name);
-
return
;
+ logger(DEBUG_ALWAYS, LOG_
DEBUG
, "No address known for %s", outgoing->name);
+
goto remove
;
}
}
do_outgoing_connection(outgoing);
}
}
do_outgoing_connection(outgoing);
+ return;
+
+remove:
+ list_delete(outgoing_list, outgoing);
}
/*
}
/*