namequery: remove dead code
authorUri Simchoni <urisimchoni@gmail.com>
Mon, 8 Jun 2015 05:42:58 +0000 (08:42 +0300)
committerJeremy Allison <jra@samba.org>
Mon, 15 Jun 2015 23:29:24 +0000 (01:29 +0200)
When composing the list of servers out of the server affinity cache
and "password server" parameter, there's fallback to DNS-SRV-record-
based search if the "password server" + session affinity yield an empty
list. However:
1. The way the code is written, it never gets executed because the empty list
   is not an empty string (it contains a comma)
2. This fallback is doe in any case just a few lines down the function

Therefore this patch simply removes this fallback code.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/libsmb/namequery.c

index 7ef555200750a0acb665455ccede3b75604cb10a..5e48474b2d5dcc08c4d103136f4f108d79d81861 100644 (file)
@@ -3141,15 +3141,6 @@ static NTSTATUS get_dc_list(const char *domain,
                goto out;
        }
 
-       /* if we are starting from scratch, just lookup DOMAIN<0x1c> */
-
-       if (!*pserver ) {
-               DEBUG(10,("get_dc_list: no preferred domain controllers.\n"));
-               status = internal_resolve_name(domain, 0x1C, sitename, ip_list,
-                                            count, resolve_order);
-               goto out;
-       }
-
        DEBUG(3,("get_dc_list: preferred server list: \"%s\"\n", pserver ));
 
        /*