]> git.ozlabs.org Git - ppp.git/commitdiff
leave tty with echo turned off if not default device
authorPaul Mackerras <paulus@samba.org>
Mon, 1 May 1995 00:26:22 +0000 (00:26 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 1 May 1995 00:26:22 +0000 (00:26 +0000)
pppd/sys-aix4.c
pppd/sys-bsd.c
pppd/sys-linux.c
pppd/sys-osf.c
pppd/sys-str.c
pppd/sys-ultrix.c

index b6485ec34c94e298e7bf9284016ddf798dce4284..ca9cebc94c446fcfd353ae91f0759d6456a550b1 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-aix4.c,v 1.5 1995/04/28 06:25:40 paulus Exp $";
+static char rcsid[] = "$Id: sys-aix4.c,v 1.6 1995/05/01 00:26:11 paulus Exp $";
 #endif
 
 /*
@@ -463,6 +463,15 @@ void
 restore_tty()
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");
index c884a62914a94cff32294191f4739003a2ca087c..4dbb9d7970a8ac2a7aa050974f11b16d776ddc4e 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.17 1995/04/27 00:33:39 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.18 1995/05/01 00:23:53 paulus Exp $";
 #endif
 
 /*
@@ -269,6 +269,15 @@ void
 restore_tty()
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");
index 946a2f93033eb5e377208ba9e046bb8c0c36f3b7..9f04976e5b810139a04228e73a8b8e4bf2b68853 100644 (file)
@@ -399,6 +399,15 @@ void setdtr (int fd, int on)
 void restore_tty (void)
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");
index 8cd7710b7a4989e72c4c5b8782f33b20c4867f02..5b1d2ab8342aced220f14866e82dfef713f80d53 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.3 1995/04/28 06:26:23 paulus Exp $";
+static char rcsid[] = "$Id: sys-osf.c,v 1.4 1995/05/01 00:26:01 paulus Exp $";
 #endif
 
 /*
@@ -587,6 +587,15 @@ void
 restore_tty()
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");
index f5afba95d119d8da644d9952853a4e189371ccff..e5831330cac83bc9922990ddd2aa188be84d4d95 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-str.c,v 1.19 1995/04/28 06:26:46 paulus Exp $";
+static char rcsid[] = "$Id: sys-str.c,v 1.20 1995/05/01 00:26:22 paulus Exp $";
 #endif
 
 /*
@@ -452,6 +452,15 @@ void
 restore_tty()
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");
index 879aedaa0f8763817adf2ca3aba36f7499355bd5..46369e6cc1fcf9102e0d64df8aba1fc0816b9350 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-ultrix.c,v 1.10 1995/04/28 06:26:57 paulus Exp $";
+static char rcsid[] = "$Id: sys-ultrix.c,v 1.11 1995/05/01 00:25:38 paulus Exp $";
 #endif
 
 /*
@@ -401,6 +401,15 @@ void
 restore_tty()
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");