mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 13:17:56 +00:00
Correct if block, only update neighbour->next_neighbour_update when the if-test is true. Avoid compiler warning.
This commit is contained in:
parent
de376ca4bb
commit
051bcd77bc
@ -1174,9 +1174,10 @@ int link_received_packet(struct decode_context *context, int sender_seq, char un
|
|||||||
|
|
||||||
// force an update when we start hearing a new neighbour link
|
// force an update when we start hearing a new neighbour link
|
||||||
if (link->link_timeout < now){
|
if (link->link_timeout < now){
|
||||||
if (neighbour->next_neighbour_update > now + 10);
|
if (neighbour->next_neighbour_update > now + 10) {
|
||||||
neighbour->next_neighbour_update = now + 10;
|
neighbour->next_neighbour_update = now + 10;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
link->link_timeout = now + (context->interface->destination->tick_ms *5);
|
link->link_timeout = now + (context->interface->destination->tick_ms *5);
|
||||||
|
|
||||||
// force an update soon when we need to promptly ack packets
|
// force an update soon when we need to promptly ack packets
|
||||||
|
Loading…
Reference in New Issue
Block a user