summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-09-03 05:28:52 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-09-03 05:28:52 +0000
commit085ae53fca6989059ac7c4cce998d79a33d74029 (patch)
treedae49ce0440cf04b66e7a70e5c566059be97884b
parent60eb2db36d1b711a8e194ffedcfc736f406c4aa5 (diff)
repair a bug in 1.23, where "telnetport" was incorrectly set.
From: Pekka Savola <pekkas@netcore.fi>
-rw-r--r--usr.bin/telnet/commands.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c
index 278df40709a..09d1c6a2539 100644
--- a/usr.bin/telnet/commands.c
+++ b/usr.bin/telnet/commands.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commands.c,v 1.37 2001/07/12 05:17:22 deraadt Exp $ */
+/* $OpenBSD: commands.c,v 1.38 2001/09/03 05:28:51 itojun Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
@@ -2370,10 +2370,12 @@ tn(argc, argv)
hints.ai_flags = AI_CANONNAME;
if (portp == NULL) {
portp = "telnet";
+ telnetport = 1;
} else if (*portp == '-') {
portp++;
telnetport = 1;
- }
+ } else
+ telnetport = 0;
h_errno = 0;
error = getaddrinfo(hostp, portp, &hints, &res0);
if (error) {