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/tcpsvd.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/tcpsvd.c')
-rw-r--r-- | ipsvd/tcpsvd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipsvd/tcpsvd.c b/ipsvd/tcpsvd.c index 197edca..98234a7 100644 --- a/ipsvd/tcpsvd.c +++ b/ipsvd/tcpsvd.c @@ -128,8 +128,8 @@ int tcpsvd_main(int argc, char **argv) uint16_t remote_port; char *local_hostname = NULL; char *remote_hostname = (char*)""; /* "" used if no -h */ - char *local_ip = local_ip; - char *remote_ip = NULL; + char *local_ip = local_ip; /* gcc */ + char *remote_ip = remote_ip; /* gcc */ //unsigned iscdb = 0; /* = option_mask32 & OPT_x (TODO) */ //unsigned long timeout = 0; #ifndef SSLSVD @@ -271,10 +271,10 @@ int tcpsvd_main(int argc, char **argv) if (max_per_host) { /* we drop connection immediately if cur_per_host > max_per_host * (minimizing load under SYN flood) */ - free(remote_ip); remote_ip = xmalloc_sockaddr2dotted_noport(&sock_adr.sa, sockadr_size); cur_per_host = ipsvd_perhost_add(remote_ip, max_per_host, &hccp); if (cur_per_host > max_per_host) { + free(remote_ip); /* ipsvd_perhost_add detected that max is exceeded * (and did not store us in connection table) */ if (msg_per_host) { |