projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
67498fb
)
Remove useless variable 'hard' from try_harder().
author
Guus Sliepen
<guus@sliepen.org>
Mon, 7 Apr 2014 19:45:12 +0000
(21:45 +0200)
committer
Guus Sliepen
<guus@sliepen.org>
Mon, 7 Apr 2014 19:45:12 +0000
(21:45 +0200)
src/net_packet.c
patch
|
blob
|
history
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
81d0572
..
905b944
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-664,7
+664,6
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
avl_node_t *node;
edge_t *e;
node_t *n = NULL;
avl_node_t *node;
edge_t *e;
node_t *n = NULL;
- bool hard = false;
static time_t last_hard_try = 0;
for(node = edge_weight_tree->head; node; node = node->next) {
static time_t last_hard_try = 0;
for(node = edge_weight_tree->head; node; node = node->next) {
@@
-673,11
+672,8
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
if(e->to == myself)
continue;
if(e->to == myself)
continue;
- if(sockaddrcmp_noport(from, &e->address)) {
- if(last_hard_try == now)
- continue;
- hard = true;
- }
+ if(last_hard_try == now && sockaddrcmp_noport(from, &e->address))
+ continue;
if(!try_mac(e->to, pkt))
continue;
if(!try_mac(e->to, pkt))
continue;
@@
-686,9
+682,6
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
break;
}
break;
}
- if(hard)
- last_hard_try = now;
-
last_hard_try = now;
return n;
}
last_hard_try = now;
return n;
}