Commit b6e54a7c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Split update_myseqno into its own function.

parent 68da3363
......@@ -639,13 +639,20 @@ send_update(struct network *net, int urgent,
}
void
send_self_update(struct network *net, int force_seqno)
update_myseqno(int force)
{
int i;
if(force_seqno || seqno_time + seqno_interval < now.tv_sec) {
if(force || seqno_time + seqno_interval < now.tv_sec) {
myseqno = seqno_plus(myseqno, 1);
seqno_time = now.tv_sec;
}
}
void
send_self_update(struct network *net, int force_seqno)
{
int i;
update_myseqno(force_seqno);
if(net == NULL) {
for(i = 0; i < numnets; i++)
......
......@@ -51,6 +51,7 @@ void send_unicast_request(struct neighbour *neigh,
unsigned short router_hash);
void send_update(struct network *net, int urgent,
const unsigned char *prefix, unsigned char plen);
void update_myseqno(int force);
void send_self_update(struct network *net, int force_seqno);
void send_self_retract(struct network *net);
void send_neighbour_update(struct neighbour *neigh, struct network *net);
......
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