diff options
author | Elliott Hughes <enh@google.com> | 2019-07-08 16:02:56 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-07-11 22:02:12 -0500 |
commit | a57721d14642291696be4ffd5d8bb0915fbe861b (patch) | |
tree | 11a18894601df31ce1eb9c46c5d1faaa59e2f9e8 /toys/pending/telnet.c | |
parent | 34f095fcbf0829719f9a130a359ebf2a3e223ca0 (diff) | |
download | toybox-a57721d14642291696be4ffd5d8bb0915fbe861b.tar.gz |
bind/connect cleanup.
Rename the existing xbind/xconnect to xbindany/xconnectany, to make room
for new xbind/xconnect that are more like 'x' versions of the regular
bind and connect. Move explicit bind/connect callers over to
xbind/xconnect.
Of the affected commands, only netcat is actually used by Android. It
was the most recent patch to netcat that made the lack of a more
traditional xbind/xconnect apparent.
Diffstat (limited to 'toys/pending/telnet.c')
-rw-r--r-- | toys/pending/telnet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/telnet.c b/toys/pending/telnet.c index e37b982c..b8c9c140 100644 --- a/toys/pending/telnet.c +++ b/toys/pending/telnet.c @@ -306,7 +306,7 @@ void telnet_main(void) } terminal_size(&TT.win_width, &TT.win_height); - TT.sfd = xconnect(xgetaddrinfo(*toys.optargs, port, 0, SOCK_STREAM, + TT.sfd = xconnectany(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)); |