xconnect is non-conforming to "xfunc like libc" rule. Fixing
This commit is contained in:
@@ -67,7 +67,7 @@ static int xconnect_ftpdata(ftp_host_info_t *server, const char *buf)
|
||||
port_num += xatoul_range(buf_ptr + 1, 0, 255) * 256;
|
||||
|
||||
server->s_in->sin_port = htons(port_num);
|
||||
return xconnect(server->s_in);
|
||||
return xconnect_tcp_v4(server->s_in);
|
||||
}
|
||||
|
||||
static FILE *ftp_login(ftp_host_info_t *server)
|
||||
@@ -76,7 +76,7 @@ static FILE *ftp_login(ftp_host_info_t *server)
|
||||
char buf[512];
|
||||
|
||||
/* Connect to the command socket */
|
||||
control_stream = fdopen(xconnect(server->s_in), "r+");
|
||||
control_stream = fdopen(xconnect_tcp_v4(server->s_in), "r+");
|
||||
if (control_stream == NULL) {
|
||||
bb_perror_msg_and_die("cannot open control stream");
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ int telnet_main(int argc, char** argv)
|
||||
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);
|
||||
|
||||
|
||||
@@ -585,7 +585,7 @@ static FILE *open_socket(struct sockaddr_in *s_in)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
fp = fdopen(xconnect(s_in), "r+");
|
||||
fp = fdopen(xconnect_tcp_v4(s_in), "r+");
|
||||
if (fp == NULL)
|
||||
bb_perror_msg_and_die("fdopen");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user