From ba63d2751b8143c0c9d602e9790eda8e178966ce Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 21 Mar 2005 09:20:16 +0000 Subject: [PATCH] Do an lcp_close whenever the link terminates, not just if it terminates because of an error. This is needed for persist to work properly. --- pppd/auth.c | 5 +---- pppd/main.c | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pppd/auth.c b/pppd/auth.c index f34be0e..0f59f7f 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -68,7 +68,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: auth.c,v 1.102 2004/12/31 11:58:56 paulus Exp $" +#define RCSID "$Id: auth.c,v 1.103 2005/03/21 09:20:16 paulus Exp $" #include #include @@ -584,9 +584,6 @@ link_required(unit) new_phase(PHASE_DEAD); if (the_channel->cleanup) (*the_channel->cleanup)(); - - /* XXX not nice here but needs to go somewhere... */ - lcp_close(0, msg); } /* diff --git a/pppd/main.c b/pppd/main.c index f136a28..b5702f2 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -66,7 +66,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: main.c,v 1.149 2004/11/14 22:53:42 carlsonj Exp $" +#define RCSID "$Id: main.c,v 1.150 2005/03/21 09:20:16 paulus Exp $" #include #include @@ -551,6 +551,8 @@ main(argc, argv) } } } + /* restore FSMs to original state */ + lcp_close(0, ""); if (!persist || asked_to_quit || (maxfail > 0 && unsuccess >= maxfail)) break; -- 2.39.2