]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbindd: untangle reconnect_methods vs reconnect_ads_methods
authorRalph Boehme <slow@samba.org>
Thu, 16 Mar 2017 09:36:14 +0000 (10:36 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 16 Mar 2017 19:30:20 +0000 (20:30 +0100)
No change in behaviour. The previous logic just seemed a bit clumsy
because of the ifdefs.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/winbindd/winbindd_cache.c

index f0c19fbe2f77ebab84da16d61d9db8a8599b6047..0ef7c1632d8193b70e3b036581b2368868caeef7 100644 (file)
@@ -162,8 +162,8 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
           --jerry
         */
 
-       if (domain->backend == NULL) {
 #ifdef HAVE_ADS
+       if (domain->backend == NULL) {
                struct winbindd_domain *our_domain = domain;
 
                /* find our domain first so we can figure out if we 
@@ -177,13 +177,13 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
                    && !lp_winbind_rpc_only()) {
                        DEBUG(5,("get_cache: Setting ADS methods for domain %s\n", domain->name));
                        domain->backend = &reconnect_ads_methods;
-               } else {
-#endif /* HAVE_ADS */
-                       DEBUG(5,("get_cache: Setting MS-RPC methods for domain %s\n", domain->name));
-                       domain->backend = &reconnect_methods;
-#ifdef HAVE_ADS
                }
+       }
 #endif /* HAVE_ADS */
+
+       if (domain->backend == NULL) {
+               DEBUG(5,("get_cache: Setting MS-RPC methods for domain %s\n", domain->name));
+               domain->backend = &reconnect_methods;
        }
 
        if (ret)