]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
get rid of old debug code and possible socket leak
authorHerb Lewis <herb@samba.org>
Fri, 24 Aug 2001 01:49:23 +0000 (01:49 +0000)
committerHerb Lewis <herb@samba.org>
Fri, 24 Aug 2001 01:49:23 +0000 (01:49 +0000)
source/lib/util_sock.c

index d7a2a2e7b9407a4c8399914277a9e471d4ba58c8..8f2eceabbc4443a1c77973875b9682701932db95 100644 (file)
@@ -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));