summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp/util.c
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-27 09:28:38 +0000
committershin <shin@FreeBSD.org>2000-01-27 09:28:38 +0000
commitce15efb7c04858f00b57c16093d4a3043809048e (patch)
tree8b3d00f78a4a5a34cc3b17e29c28b4472d93a35c /usr.bin/ftp/util.c
parentdcbae417f8f4365a5eea807290162acd308b720d (diff)
downloadFreeBSD-src-ce15efb7c04858f00b57c16093d4a3043809048e.zip
FreeBSD-src-ce15efb7c04858f00b57c16093d4a3043809048e.tar.gz
another tcp apps IPv6 updates.(should be make world safe)
ftp, telnet, ftpd, faithd also telnet related sync with crypto, secure, kerberosIV Obtained from: KAME project
Diffstat (limited to 'usr.bin/ftp/util.c')
-rw-r--r--usr.bin/ftp/util.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c
index a34ca34..a62565c 100644
--- a/usr.bin/ftp/util.c
+++ b/usr.bin/ftp/util.c
@@ -76,7 +76,7 @@ setpeer(argc, argv)
char *argv[];
{
char *host;
- u_int16_t port;
+ char *port;
if (connected) {
printf("Already connected to %s, use close first.\n",
@@ -95,19 +95,8 @@ setpeer(argc, argv)
port = gateport;
else
port = ftpport;
- if (argc > 2) {
- char *ep;
- long nport;
-
- nport = strtol(argv[2], &ep, 10);
- if (nport < 1 || nport > 0xffff || *ep != '\0') {
- printf("%s: bad port number '%s'.\n", argv[0], argv[2]);
- printf("usage: %s host-name [port]\n", argv[0]);
- code = -1;
- return;
- }
- port = htons(nport);
- }
+ if (argc > 2)
+ port = strdup(argv[2]);
if (gatemode) {
if (gateserver == NULL || *gateserver == '\0')
OpenPOWER on IntegriCloud