Commit b4453d10 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Move message_source_id around.

parent 60ea90a3
...@@ -444,27 +444,6 @@ send_message(struct network *net, ...@@ -444,27 +444,6 @@ send_message(struct network *net,
schedule_flush(net); schedule_flush(net);
} }
static const unsigned char *
message_source_id(struct network *net)
{
int i;
assert(net->buffered % 24 == 0);
i = net->buffered / 24 - 1;
while(i >= 0) {
const unsigned char *message;
message = (const unsigned char*)(net->sendbuf + i * 24);
if(message[0] == 3)
return message + 8;
else if(message[0] == 4)
i--;
else
break;
}
return NULL;
}
void void
send_hello_noupdate(struct network *net, unsigned interval) send_hello_noupdate(struct network *net, unsigned interval)
{ {
...@@ -591,6 +570,28 @@ send_unicast_request(struct neighbour *neigh, ...@@ -591,6 +570,28 @@ send_unicast_request(struct neighbour *neigh,
send_unicast_packet(neigh, buf, 24); send_unicast_packet(neigh, buf, 24);
} }
/* Return the source-id of the last buffered update message. */
static const unsigned char *
message_source_id(struct network *net)
{
int i;
assert(net->buffered % 24 == 0);
i = net->buffered / 24 - 1;
while(i >= 0) {
const unsigned char *message;
message = (const unsigned char*)(net->sendbuf + i * 24);
if(message[0] == 3)
return message + 8;
else if(message[0] == 4)
i--;
else
break;
}
return NULL;
}
static void static void
really_send_update(struct network *net, really_send_update(struct network *net,
const unsigned char *address, const unsigned char *address,
......
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