Commit e89a181d authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use more accurate count of myxroutes when sending self update.

parent 7fd2e566
...@@ -429,7 +429,13 @@ flushupdates(void) ...@@ -429,7 +429,13 @@ flushupdates(void)
debugf(" (flushing %d buffered updates)\n", n); debugf(" (flushing %d buffered updates)\n", n);
for(i = 0; i < n; i++) { for(i = 0; i < n; i++) {
if(buffered_updates[i] == NULL) { if(buffered_updates[i] == NULL) {
start_message(net, MIN(20 + 20 * nummyxroutes, 1000)); int numpxroutes;
numpxroutes = 0;
for(j = 0; j < nummyxroutes; j++) {
if(myxroutes[j].installed)
numpxroutes++;
}
start_message(net, MIN(20 + 20 * numpxroutes, 1000));
for(j = 0; j < nummyxroutes; j++) { for(j = 0; j < nummyxroutes; j++) {
if(!myxroutes[j].installed) if(!myxroutes[j].installed)
continue; continue;
......
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