Commit a9bc5ae9 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Slightly simplify logic for sending txcost.

parent 42d47e46
...@@ -154,7 +154,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval) ...@@ -154,7 +154,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
} }
/* Make sure to give neighbours some feedback early after association */ /* Make sure to give neighbours some feedback early after association */
if(neigh->reach == 0x8000) { if((neigh->reach & 0xF000) == 0x8000) {
send_hello(neigh->network); send_hello(neigh->network);
send_txcost(neigh, NULL); send_txcost(neigh, NULL);
} else { } else {
...@@ -164,9 +164,6 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval) ...@@ -164,9 +164,6 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
send_txcost(neigh, NULL); send_txcost(neigh, NULL);
send_self_update(neigh->network); send_self_update(neigh->network);
send_neighbour_update(neigh, NULL); send_neighbour_update(neigh, NULL);
} else {
if((neigh->reach & 0xF000) != 0 && (neigh->reach & 0x0F00) == 0)
send_txcost(neigh, NULL);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment