diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-17 05:03:31 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-17 05:03:31 +0000 |
commit | 036dbaa082f1974246d1d7d21a8e163559642485 (patch) | |
tree | 2488441544ab16f8e08d0955d323019e96ed3d4f /networking/telnet.c | |
parent | b03be7f5677b86acfe2f64b5a57e1f361e257f6c (diff) | |
download | busybox-w32-036dbaa082f1974246d1d7d21a8e163559642485.tar.gz busybox-w32-036dbaa082f1974246d1d7d21a8e163559642485.tar.bz2 busybox-w32-036dbaa082f1974246d1d7d21a8e163559642485.zip |
Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
Diffstat (limited to 'networking/telnet.c')
-rw-r--r-- | networking/telnet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/telnet.c b/networking/telnet.c index 110c9d151..1b71bf26a 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -599,7 +599,7 @@ extern int telnet_main(int argc, char** argv) | |||
599 | bb_show_usage(); | 599 | bb_show_usage(); |
600 | 600 | ||
601 | bb_lookup_host(&s_in, argv[1]); | 601 | bb_lookup_host(&s_in, argv[1]); |
602 | s_in.sin_port = bb_lookup_port((argc == 3) ? argv[2] : "telnet", 23); | 602 | s_in.sin_port = bb_lookup_port((argc == 3) ? argv[2] : "telnet", "tcp", 23); |
603 | 603 | ||
604 | G.netfd = xconnect(&s_in); | 604 | G.netfd = xconnect(&s_in); |
605 | 605 | ||