From: Paul Mackerras Date: Tue, 1 Jul 2008 12:27:56 +0000 (+0000) Subject: Clear hungup in start_link() instead of connect_tty() X-Git-Tag: ppp-2.4.7~76 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=7a7ed0a1a26961a165fd17183fd161c36a4b088f Clear hungup in start_link() instead of connect_tty() Since hungup gets set in get_input(), which is generic, but only cleared in connect_tty(), which is specific to the tty channel type, other channel types were showing various problems on the second and subsequent connections when the persist option was used. This fixes it by clearing hungup in start_link() rather than connect_tty(). --- diff --git a/pppd/auth.c b/pppd/auth.c index f615fd3..fb71944 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.116 2008/06/25 10:30:36 paulus Exp $" +#define RCSID "$Id: auth.c,v 1.117 2008/07/01 12:27:56 paulus Exp $" #include #include @@ -557,6 +557,7 @@ void start_link(unit) new_phase(PHASE_SERIALCONN); + hungup = 0; devfd = the_channel->connect(); msg = "Connect script failed"; if (devfd < 0) diff --git a/pppd/tty.c b/pppd/tty.c index a9832d9..d571b11 100644 --- a/pppd/tty.c +++ b/pppd/tty.c @@ -68,7 +68,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: tty.c,v 1.26 2008/06/23 11:44:06 paulus Exp $" +#define RCSID "$Id: tty.c,v 1.27 2008/07/01 12:27:56 paulus Exp $" #include #include @@ -554,7 +554,6 @@ int connect_tty() * out and we want to use the modem lines, we reopen it later * in order to wait for the carrier detect signal from the modem. */ - hungup = 0; got_sigterm = 0; connector = doing_callback? callback_script: connect_script; if (devnam[0] != 0) {