Commit 0a3b421e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename delay_jitter to set_timeout.

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