X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Ftty.c;h=7ece6753a0f3ac19733d556f8b4bbe5b5cc3a7c2;hp=a9832d918d076a0bd8634091d9086269c353de1f;hb=b6b4d28e0c38320ca6753af40845df991118cd11;hpb=8f09debe1ccab6c267f1d803bfa6facdd30b56e0 diff --git a/pppd/tty.c b/pppd/tty.c index a9832d9..7ece675 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 @@ -83,7 +83,6 @@ #include #include #include -#include #include #include #include @@ -136,6 +135,7 @@ struct stat devstat; /* result of stat() on devnam */ /* option variables */ int crtscts = 0; /* Use hardware flow control */ +int stop_bits = 1; /* Number of serial port stop bits */ bool modem = 1; /* Use modem control lines */ int inspeed = 0; /* Input/Output speed requested */ bool lockflag = 0; /* Create lock file to lock the serial dev */ @@ -221,6 +221,9 @@ option_t tty_options[] = { OPT_PRIOSUB | OPT_ALIAS | OPT_NOARG | OPT_VAL(-1) }, { "xonxoff", o_special_noarg, (void *)setxonxoff, "Set software (XON/XOFF) flow control", OPT_PRIOSUB }, + { "stop-bits", o_int, &stop_bits, + "Number of stop bits in serial port", + OPT_PRIO | OPT_PRIVFIX | OPT_LIMITS, NULL, 2, 1 }, { "modem", o_bool, &modem, "Use modem control lines", OPT_PRIO | 1 }, @@ -554,7 +557,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) {