diff options
author | Denis Vlasenko | 2007-04-02 12:37:28 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-04-02 12:37:28 +0000 |
commit | 729bd9e0b0d5977e9c2c2a4eff7e2f0ca2ad4b9e (patch) | |
tree | d5cb1a1c7c41b2681ca867c57c3b4e473c0a56be /ipsvd/udpsvd.c | |
parent | b05a939bcc0249fe8bd94b9795db8f8d93c3921e (diff) | |
download | busybox-729bd9e0b0d5977e9c2c2a4eff7e2f0ca2ad4b9e.zip busybox-729bd9e0b0d5977e9c2c2a4eff7e2f0ca2ad4b9e.tar.gz |
test: comment out unused code
udpsvd: fake it compile
tcpsvd: more optimal memorizing of IP's for -C
Diffstat (limited to 'ipsvd/udpsvd.c')
-rw-r--r-- | ipsvd/udpsvd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ipsvd/udpsvd.c b/ipsvd/udpsvd.c index b3f6082..06c4f2e 100644 --- a/ipsvd/udpsvd.c +++ b/ipsvd/udpsvd.c @@ -42,9 +42,9 @@ int udpsvd_main(int argc, char **argv) // unsigned long timeout = 0; char *remote_hostname; - char *local_hostname; + char *local_hostname = local_hostname; /* gcc */ char *remote_ip; - char *local_ip; + char *local_ip = local_ip; /* gcc */ uint16_t local_port, remote_port; union { struct sockaddr sa; @@ -145,6 +145,11 @@ int udpsvd_main(int argc, char **argv) /* if (recvfrom(sock, 0, 0, MSG_PEEK, (struct sockaddr *)&sock_adr, &sockadr_size) == -1) drop("unable to read from socket"); */ + if (verbose) { + local_ip = argv[0]; // TODO: recv_from_to! + local_hostname = (char*)"localhost"; + } + remote_ip = xmalloc_sockaddr2dotted_noport(&sock_adr.sa, sockadr_size); remote_port = get_nport(&sock_adr.sa); remote_port = ntohs(remote_port); |