aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
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/pending
parentd4adb3f8e2ec39674e34ed518983ed6e85560c91 (diff)
downloadtoybox-92b6026fa55eb1a6d76dfa549e173fc7b863dda5.tar.gz
Split out xgetaddrinfo() from xconnect()
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/telnet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/pending/telnet.c b/toys/pending/telnet.c
index dc3487a5..e37b982c 100644
--- a/toys/pending/telnet.c
+++ b/toys/pending/telnet.c
@@ -306,7 +306,8 @@ void telnet_main(void)
}
terminal_size(&TT.win_width, &TT.win_height);
- TT.sfd = xconnect(*toys.optargs, port, 0, SOCK_STREAM, IPPROTO_TCP, 0);
+ TT.sfd = xconnect(xgetaddrinfo(*toys.optargs, port, 0, SOCK_STREAM,
+ IPPROTO_TCP, 0));
setsockopt(TT.sfd, SOL_SOCKET, SO_REUSEADDR, &set, sizeof(set));
setsockopt(TT.sfd, SOL_SOCKET, SO_KEEPALIVE, &set, sizeof(set));