From 2da5df67a7ec03c6723141559c1a71497e6e860b Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sun, 25 Mar 2001 20:06:08 +0000 Subject: [PATCH] Issue a ``quit'' after other ppp commands given on the command line and then wait for the connection to be closed by the peer. This means that commands such as ``pppctl ... show links'' will display the correct output again (rather than truncating it depending on how much data arrived in the last packet). --- usr.sbin/pppctl/pppctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/pppctl/pppctl.c b/usr.sbin/pppctl/pppctl.c index 3f14a6b1ec12..753b32e94020 100644 --- a/usr.sbin/pppctl/pppctl.c +++ b/usr.sbin/pppctl/pppctl.c @@ -622,6 +622,11 @@ main(int argc, char **argv) if (next) start = ++next; } while (next && *next); + if (verbose) + write(1, "quit\n", 5); + write(fd, "quit\n", 5); + while (Receive(fd, verbose | REC_SHOW) == 0) + ; if (verbose) puts(""); }