diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-04 23:44:18 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-04 23:44:18 +0000 |
commit | 99a496a3f657f23e4197eb961eb63c840dd115d4 (patch) | |
tree | d83a3a207c3692d65440481164088af6242d41ee /usr.sbin | |
parent | a9270df57059829da96f67a1e097a5971f9299b0 (diff) |
when imsg_get has no imsg any more for us, do not set the done flag,
instead, break out of the inner loop so the outer loop gets us a new fix
via imsg_read
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index 0c774860111..e8416295ec8 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.15 2004/01/04 21:45:05 henning Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.16 2004/01/04 23:44:17 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -145,17 +145,15 @@ again: while (!done) { if ((n = imsg_read(&ibuf)) == -1) - break; + errx(1, "imsg_read error"); if (n == 0) errx(1, "pipe closed"); while (!done) { if ((n = imsg_get(&ibuf, &imsg)) == -1) errx(1, "imsg_get error"); - if (n == 0) { - done = 1; + if (n == 0) break; - } switch (action) { case SHOW: case SHOW_SUMMARY: |