summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2001-08-24 01:49:23 +0000
committerHerb Lewis <herb@samba.org>2001-08-24 01:49:23 +0000
commitf942397d6515402be0c7c1085fc2e6d48eb6928f (patch)
tree0356489cf363ab67eed365eeb9f0e4ea6c6cc1f5 /source
parentfaae7512e059456db2450f878c435fd402839146 (diff)
downloadsamba-f942397d6515402be0c7c1085fc2e6d48eb6928f.tar.gz
samba-f942397d6515402be0c7c1085fc2e6d48eb6928f.tar.xz
samba-f942397d6515402be0c7c1085fc2e6d48eb6928f.zip
get rid of old debug code and possible socket leak
Diffstat (limited to 'source')
-rw-r--r--source/lib/util_sock.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index d7a2a2e7b94..8f2eceabbc4 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -814,20 +814,12 @@ int open_socket_in(int type, int port, int dlevel,uint32 socket_addr, BOOL rebin
/* now we've got a socket - we need to bind it */
if (bind(res, (struct sockaddr * ) &sock,sizeof(sock)) < 0)
{
- if (port) {
if (port == SMB_PORT || port == NMB_PORT)
DEBUG(dlevel,("bind failed on port %d socket_addr=%s (%s)\n",
port,inet_ntoa(sock.sin_addr),strerror(errno)));
close(res);
- if (dlevel > 0 && port < 1000)
- port = 7999;
-
- if (port >= 1000 && port < 9000)
- return(open_socket_in(type,port+1,dlevel,socket_addr,rebind));
- }
-
- return(-1);
+ return(-1);
}
DEBUG(3,("bind succeeded on port %d\n",port));