projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove duplicate command-line option parsing.
[tinc]
/
src
/
protocol_auth.c
diff --git
a/src/protocol_auth.c
b/src/protocol_auth.c
index
06735dc
..
3f4fa01
100644
(file)
--- a/
src/protocol_auth.c
+++ b/
src/protocol_auth.c
@@
-497,7
+497,7
@@
static void send_everything(connection_t *c) {
bool ack_h(connection_t *c) {
char hisport[MAX_STRING_SIZE];
bool ack_h(connection_t *c) {
char hisport[MAX_STRING_SIZE];
- char *hisaddress
, *dummy
;
+ char *hisaddress;
int weight, mtu;
uint32_t options;
node_t *n;
int weight, mtu;
uint32_t options;
node_t *n;
@@
-539,7
+539,7
@@
bool ack_h(connection_t *c) {
if(get_config_int(lookup_config(c->config_tree, "PMTU"), &mtu) && mtu < n->mtu)
n->mtu = mtu;
if(get_config_int(lookup_config(c->config_tree, "PMTU"), &mtu) && mtu < n->mtu)
n->mtu = mtu;
- if(get_config_int(lookup_config(
myself->connection->
config_tree, "PMTU"), &mtu) && mtu < n->mtu)
+ if(get_config_int(lookup_config(config_tree, "PMTU"), &mtu) && mtu < n->mtu)
n->mtu = mtu;
if(get_config_bool(lookup_config(c->config_tree, "ClampMSS"), &choice)) {
n->mtu = mtu;
if(get_config_bool(lookup_config(c->config_tree, "ClampMSS"), &choice)) {
@@
-566,10
+566,9
@@
bool ack_h(connection_t *c) {
c->edge = new_edge();
c->edge->from = myself;
c->edge->to = n;
c->edge = new_edge();
c->edge->from = myself;
c->edge->to = n;
- sockaddr2str(&c->address, &hisaddress,
&dummy
);
+ sockaddr2str(&c->address, &hisaddress,
NULL
);
c->edge->address = str2sockaddr(hisaddress, hisport);
free(hisaddress);
c->edge->address = str2sockaddr(hisaddress, hisport);
free(hisaddress);
- free(dummy);
c->edge->weight = (weight + c->estimated_weight) / 2;
c->edge->connection = c;
c->edge->options = c->options;
c->edge->weight = (weight + c->estimated_weight) / 2;
c->edge->connection = c;
c->edge->options = c->options;