next part of ipv6-ization is here: wget & httpd
This commit is contained in:
@@ -37,7 +37,10 @@ int nc_main(int argc, char **argv)
|
||||
"" USE_NC_SERVER("lp:") USE_NC_EXTRA("w:i:f:e:") )) > 0
|
||||
) {
|
||||
if (ENABLE_NC_SERVER && opt=='l') USE_NC_SERVER(do_listen++);
|
||||
else if (ENABLE_NC_SERVER && opt=='p') USE_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0));
|
||||
else if (ENABLE_NC_SERVER && opt=='p') {
|
||||
USE_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0));
|
||||
USE_NC_SERVER(lport = htons(lport));
|
||||
}
|
||||
else if (ENABLE_NC_EXTRA && opt=='w') USE_NC_EXTRA( wsecs = xatou(optarg));
|
||||
else if (ENABLE_NC_EXTRA && opt=='i') USE_NC_EXTRA( delay = xatou(optarg));
|
||||
else if (ENABLE_NC_EXTRA && opt=='f') USE_NC_EXTRA( cfd = xopen(optarg, O_RDWR));
|
||||
@@ -119,6 +122,7 @@ int nc_main(int argc, char **argv)
|
||||
|
||||
address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list;
|
||||
address.sin_port = bb_lookup_port(argv[1], "tcp", 0);
|
||||
address.sin_port = htons(address.sin_port);
|
||||
|
||||
xconnect(sfd, (struct sockaddr *) &address, sizeof(address));
|
||||
cfd = sfd;
|
||||
|
Reference in New Issue
Block a user