aboutsummaryrefslogtreecommitdiff
path: root/toys/net
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-07-17 05:23:45 -0500
committerRob Landley <rob@landley.net>2017-07-17 05:23:45 -0500
commit92b6026fa55eb1a6d76dfa549e173fc7b863dda5 (patch)
tree93d148eee63cb4aea260f3faad60ba60b75fe43e /toys/net
parentd4adb3f8e2ec39674e34ed518983ed6e85560c91 (diff)
downloadtoybox-92b6026fa55eb1a6d76dfa549e173fc7b863dda5.tar.gz
Split out xgetaddrinfo() from xconnect()
Diffstat (limited to 'toys/net')
-rw-r--r--toys/net/ftpget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/net/ftpget.c b/toys/net/ftpget.c
index 94e5caed..3c63905e 100644
--- a/toys/net/ftpget.c
+++ b/toys/net/ftpget.c
@@ -107,7 +107,8 @@ void ftpget_main(void)
if (!remote) remote = toys.optargs[1];
// connect
- TT.fd = xconnect(*toys.optargs, TT.port, 0, SOCK_STREAM, 0, AI_ADDRCONFIG);
+ TT.fd = xconnect(xgetaddrifo(*toys.optargs, TT.port, 0, SOCK_STREAM, 0,
+ AI_ADDRCONFIG));
if (getpeername(TT.fd, (void *)&si6, &sl)) perror_exit("getpeername");
// Login