Commit 9def04a6 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't flush updates manually before sending requests.

This is now done in send_request.
parent a07d28ff
......@@ -521,9 +521,8 @@ main(int argc, char **argv)
gettimeofday(&now, NULL);
send_hello(&nets[i]);
send_self_update(&nets[i], 0);
/* Make sure the update is sent before the request. */
flushupdates();
send_request(&nets[i], NULL, 0, 0, 0, 0);
flushupdates();
flushbuf(&nets[i]);
}
......
......@@ -561,16 +561,12 @@ send_triggered_update(struct route *route, struct source *oldsrc, int oldmetric)
if(oldmetric < INFINITY) {
if(newmetric >= INFINITY || newmetric >= oldmetric + 384) {
/* Ensure that the update goes out before the request */
flushupdates();
send_request_resend(NULL, route->src->prefix, route->src->plen,
route->src->metric >= INFINITY ?
route->src->seqno :
seqno_plus(route->src->seqno, 1),
hash_id(route->src->id));
} else if(newmetric >= oldmetric + 288) {
/* Ensure that the update goes out before the request */
flushupdates();
send_request(NULL, route->src->prefix, route->src->plen,
0, 0, 0);
}
......@@ -612,8 +608,6 @@ route_lost(struct source *src, int oldmetric)
} else {
/* Complain loudly. */
send_update(NULL, 1, src->prefix, src->plen);
/* Ensure the update goes out before the request */
flushupdates();
if(oldmetric < INFINITY)
send_request_resend(NULL, src->prefix, src->plen,
src->metric >= INFINITY ?
......
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