* I don't agree.
* first - I cannot use programs like sz/rz
* second - the 0x0D is sent as one character and if the next
- * char is 0x0A then it's eaten by a server side.
+ * char is 0x0A then it's eaten by a server side.
* third - whay doy you have to make 'many write()s'?
- * I don't understand.
+ * I don't understand.
* So I implemented it. It's realy useful for me. I hope that
* others people will find it interesting to.
*/
}
outbuf[j++] = *p;
if (*p == 0xff)
- outbuf[j++] = 0xff;
+ outbuf[j++] = 0xff;
else if (*p == 0x0d)
- outbuf[j++] = 0x00;
+ outbuf[j++] = 0x00;
}
if (j > 0 )
- write(G.netfd, outbuf, j);
+ write(G.netfd, outbuf, j);
}
#endif
#ifdef CONFIG_FEATURE_TELNET_TTYPE
- ttype = getenv("TERM");
+ ttype = getenv("TERM");
#endif
memset(&G, 0, sizeof G);
bb_show_usage();
#ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN
- if (1 & bb_getopt_ulflags(argc, argv, "al:", &autologin))
+ if (1 & getopt32(argc, argv, "al:", &autologin))
autologin = getenv("USER");
if (optind < argc) {
s_in.sin_port = bb_lookup_port((argc == 3) ? argv[2] : "telnet", "tcp", 23);
#endif
- G.netfd = xconnect(&s_in);
+ G.netfd = xconnect_tcp_v4(&s_in);
setsockopt(G.netfd, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof one);