summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-28 00:35:08 +0200
committerMartin Mares <mj@ucw.cz>2000-04-28 00:35:08 +0200
commitf75e3bbc01f2b711d1a2479eddd9ea35f8cfff47 (patch)
tree8063cd5dab1f0441a8cf49de52a6c6fb52b806bc /sysdep/unix/main.c
parent54896cbdba42a2ccd83c7f23c8ba14bed37a8b73 (diff)
downloadbird-f75e3bbc01f2b711d1a2479eddd9ea35f8cfff47.tar
bird-f75e3bbc01f2b711d1a2479eddd9ea35f8cfff47.zip
Fixed a couple of nasty CLI bugs which were triggered on long or multi-part
outputs. It took a whole evening to hunt them down, but now the CLI seems to work fine. Now I run three BGP connections with several thousand routes!
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 621d85c..06d1d1d 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -179,9 +179,10 @@ cli_write(cli *c)
struct cli_out *o = c->tx_pos;
c->tx_pos = o->next;
s->tbuf = o->outpos;
- return sk_send(s, o->wpos - o->outpos);
+ if (sk_send(s, o->wpos - o->outpos) > 0)
+ ev_schedule(c->event);
}
- return 1;
+ return !c->tx_pos;
}
int