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) ...@@ -482,7 +482,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
...@@ -493,7 +493,7 @@ schedule_flush_now(struct network *net) ...@@ -493,7 +493,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
...@@ -630,7 +630,7 @@ send_hello_noupdate(struct network *net, unsigned interval) ...@@ -630,7 +630,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;
...@@ -927,7 +927,7 @@ schedule_update_flush(struct network *net, int urgent) ...@@ -927,7 +927,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
...@@ -1005,7 +1005,7 @@ send_update(struct network *net, int urgent, ...@@ -1005,7 +1005,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));
} }
...@@ -334,8 +334,8 @@ network_up(struct network *net, int up) ...@@ -334,8 +334,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 {
......
...@@ -101,7 +101,7 @@ int network_idle(struct network *net); ...@@ -101,7 +101,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