Subject: bin/4310: Problem with pppd auxiliar tool ``chat''
To: None <email@example.com>
From: Paulo Alexandre Pinto Pires <firstname.lastname@example.org>
Date: 10/21/1997 07:43:27
>Synopsis: argument line parsing problem
>Responsible: bin-bug-people (Utility Bug People)
>Arrival-Date: Tue Oct 21 02:50:03 1997
>Originator: Paulo Alexandre Pinto Pires
>Release: NetBSD-current as of 14-Oct-97
i486dx-50 16Mb RAM, NetBSD-current (14-Oct-97)
chat scripting tool used by pppd seems to have a problem in
parsing parameters from the argument line. This is specially
true for switches which take an extra argument like "-t <timeout>".
The problem seems to happen due to parsing errors only when
such switches are the first to appear in the command line, and
it causes chat to abort with a "Connect script failed" message.
pppd /dev/tty03 115200 connect 'chat -t 120 -v "" "ATZ" "OK" "ATDP109"'
The method used in chat sources for parsing the command line
referred to as a "micro getopt()" seems not to be setting the
_O variable correctly.
A workaround for the above example would be changing the order
in which -v and -t switches appear in the command line, as below:
pppd /dev/tty03 115200 connect 'chat -v -t 120 "" "ATZ" "OK" "ATDP109"'