summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-09-16 23:15:16 +0000
committerbrian <brian@FreeBSD.org>1997-09-16 23:15:16 +0000
commitaaae64c991c822b762ac56ba2cc8a23cb4def67e (patch)
tree485c667968466c02da5c8fac3b08a01c169004d7 /usr.sbin/ppp/command.c
parente4a215054b550bf515c4bb8281f95caed9584733 (diff)
downloadFreeBSD-src-aaae64c991c822b762ac56ba2cc8a23cb4def67e.zip
FreeBSD-src-aaae64c991c822b762ac56ba2cc8a23cb4def67e.tar.gz
o Fix two unlikely descriptor leaks.
o Output the correct device for "show modem" while in -direct mode. o Cosmetic: Moan a bit more when we can't open the [modem] device. o Call OpenModem() in a more "natural" way. o Add some LogDEBUG in OpenModem().
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 7a68992..e606505 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.79 1997/09/09 23:23:24 brian Exp $
+ * $Id: command.c,v 1.80 1997/09/09 23:56:29 brian Exp $
*
*/
#include <sys/types.h>
@@ -161,8 +161,7 @@ DialCommand(struct cmdtab const * cmdlist, int argc, char **argv)
do {
if (VarTerm)
fprintf(VarTerm, "Dial attempt %u of %d\n", ++tries, VarDialTries);
- modem = OpenModem(mode);
- if (modem < 0) {
+ if (OpenModem(mode) < 0) {
if (VarTerm)
fprintf(VarTerm, "Failed to open modem.\n");
break;
@@ -747,8 +746,7 @@ TerminalCommand(struct cmdtab const * list, int argc, char **argv)
}
if (!IsInteractive())
return (1);
- modem = OpenModem(mode);
- if (modem < 0) {
+ if (OpenModem(mode) < 0) {
if (VarTerm)
fprintf(VarTerm, "Failed to open modem.\n");
return (1);
@@ -814,7 +812,7 @@ SetModemSpeed(struct cmdtab const * list, int argc, char **argv)
int speed;
if (argc > 0) {
- if (strcmp(*argv, "sync") == 0) {
+ if (strcasecmp(*argv, "sync") == 0) {
VarSpeed = 0;
return 0;
}
OpenPOWER on IntegriCloud