Commit d78e4936 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Make sure we don't update seqno more often than once per second.

parent de27bbd7
......@@ -599,7 +599,8 @@ send_update(struct destination *dest, struct network *net)
void
send_self_update(struct network *net, int force_seqno)
{
if(force_seqno || seqno_time + seqno_interval < now.tv_sec) {
if((force_seqno && seqno_time < now.tv_sec) ||
seqno_time + seqno_interval < now.tv_sec) {
seqno = ((seqno + 1) & 0xFF);
seqno_time = now.tv_sec;
}
......
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