mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Fix handling on full pipe to client in bird. Prevent packet overflows
for even only medium sized route table output. Fix a strange garbled output problem in the client. The latter seems to be caused by some library doing tcflush while there is still command output pending. So the best fix here is to do fflush and then tcdrain. Note that this problem occurs only under certain load situations and is not too easy to reproduce. (by Andreas)
This commit is contained in:
@@ -183,10 +183,12 @@ cli_write(cli *c)
|
||||
if (c->tx_pos)
|
||||
{
|
||||
struct cli_out *o = c->tx_pos;
|
||||
c->tx_pos = o->next;
|
||||
s->tbuf = o->outpos;
|
||||
if (sk_send(s, o->wpos - o->outpos) > 0)
|
||||
ev_schedule(c->event);
|
||||
{
|
||||
c->tx_pos = o->next;
|
||||
ev_schedule(c->event);
|
||||
}
|
||||
}
|
||||
return !c->tx_pos;
|
||||
}
|
||||
|
Reference in New Issue
Block a user