telnet: provide feedback after successful connect
authorDanijel Tasov <m@rbfh.de>
Sun, 6 Jan 2019 18:20:05 +0000 (19:20 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 6 Jan 2019 18:20:05 +0000 (19:20 +0100)
The real telnet provides some feedback:

Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.

We should do this to, because people are sitting there and think
a firewall is dropping packets.

function                                             old     new   delta
telnet_main                                         1270    1279      +9

Signed-off-by: Danijel Tasov <m@rbfh.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/telnet.c

index 6b4accd33de35ffd3cb8d5d8e0dbc8ea92461e92..94c7512fcecda5f9e01c6e3eb48bb186be022500 100644 (file)
@@ -639,6 +639,7 @@ int telnet_main(int argc UNUSED_PARAM, char **argv)
                bb_show_usage();
 
        xmove_fd(create_and_connect_stream_or_die(host, port), netfd);
+       printf("Connected to %s\n", host);
 
        setsockopt_keepalive(netfd);