Commit 5b9587c1 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Split send_hello into send_hello_noupdate.

parent 6e4b3d91
......@@ -355,17 +355,22 @@ message_source_id(struct network *net)
}
void
send_hello(struct network *net)
send_hello_noupdate(struct network *net, unsigned interval)
{
int changed;
debugf("Sending hello to %s.\n", net->ifname);
changed = update_hello_interval(net);
net->hello_seqno = ((net->hello_seqno + 1) & 0xFFFF);
net->hello_time = now.tv_sec;
send_message(net, 0, 0, net->hello_seqno,
100 * net->hello_interval > 0xFFFF ?
0 : 100 * net->hello_interval,
interval > 0xFFFF ? 0 : interval,
myid);
}
void
send_hello(struct network *net)
{
int changed;
changed = update_hello_interval(net);
send_hello_noupdate(net, net->hello_interval * 100);
if(changed)
send_ihu(NULL, net);
}
......
......@@ -40,6 +40,7 @@ extern const unsigned char packet_header[8];
void parse_packet(const unsigned char *from, struct network *net,
const unsigned char *packet, int len);
void flushbuf(struct network *net);
void send_hello_noupdate(struct network *net, unsigned interval);
void send_hello(struct network *net);
void send_request(struct network *net,
const unsigned char *prefix, unsigned char plen);
......
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