Commit a5ce4985 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename delay_jitter to set_timeout.

parent e3131ee4
......@@ -482,7 +482,7 @@ schedule_flush(struct network *net)
if(net->flush_timeout.tv_sec != 0 &&
timeval_minus_msec(&net->flush_timeout, &now) < msecs)
return;
delay_jitter(&net->flush_timeout, msecs);
set_timeout(&net->flush_timeout, msecs);
}
static void
......@@ -493,7 +493,7 @@ schedule_flush_now(struct network *net)
if(net->flush_timeout.tv_sec != 0 &&
timeval_minus_msec(&net->flush_timeout, &now) < msecs)
return;
delay_jitter(&net->flush_timeout, msecs);
set_timeout(&net->flush_timeout, msecs);
}
static void
......@@ -630,7 +630,7 @@ send_hello_noupdate(struct network *net, unsigned interval)
flushbuf(net);
net->hello_seqno = seqno_plus(net->hello_seqno, 1);
delay_jitter(&net->hello_timeout, net->hello_interval);
set_timeout(&net->hello_timeout, net->hello_interval);
if(!net_up(net))
return;
......@@ -927,7 +927,7 @@ schedule_update_flush(struct network *net, int urgent)
if(net->update_flush_timeout.tv_sec != 0 &&
timeval_minus_msec(&net->update_flush_timeout, &now) < msecs)
return;
delay_jitter(&net->update_flush_timeout, msecs);
set_timeout(&net->update_flush_timeout, msecs);
}
static void
......@@ -1005,7 +1005,7 @@ send_update(struct network *net, int urgent,
routes[i].src->plen);
}
}
delay_jitter(&net->update_timeout, net->update_interval);
set_timeout(&net->update_timeout, net->update_interval);
}
schedule_update_flush(net, urgent);
}
......
......@@ -145,7 +145,7 @@ update_jitter(struct network *net, int urgent)
}
void
delay_jitter(struct timeval *timeout, int msecs)
set_timeout(struct timeval *timeout, int msecs)
{
timeval_add_msec(timeout, &now, roughly(msecs));
}
......@@ -334,8 +334,8 @@ network_up(struct network *net, int up)
memcpy(net->ll, ll, rc * 16);
}
}
delay_jitter(&net->hello_timeout, net->hello_interval);
delay_jitter(&net->update_timeout, net->update_interval);
set_timeout(&net->hello_timeout, net->hello_interval);
set_timeout(&net->update_timeout, net->update_interval);
send_hello(net);
send_request(net, NULL, 0);
} else {
......
......@@ -101,7 +101,7 @@ int network_idle(struct network *net);
int update_hello_interval(struct network *net);
unsigned jitter(struct network *net, int urgent);
unsigned update_jitter(struct network *net, int urgent);
void delay_jitter(struct timeval *timeout, int msecs);
void set_timeout(struct timeval *timeout, int msecs);
int network_up(struct network *net, int up);
int network_ll_address(struct network *net, const unsigned char *address);
void check_networks(void);
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