s3: correctly detect if the current dc is the closest one
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Oct 2008 08:36:21 +0000 (10:36 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 13 Dec 2008 10:42:22 +0000 (11:42 +0100)
ads->config.tried_closest_dc was never set.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: G√ľnther Deschner <gd@samba.org>
(cherry picked from commit dfe5b00db35e1e7c7bb3ba36729fc3f97eb48db3)

source3/include/ads.h
source3/libads/ndr.c
source3/utils/net_ads.c

index b72d25094025156108c6815f62c44c8a0b141867..abff9eaa8c7268a88d4a078ebb46dfa29cc9cfac 100644 (file)
@@ -80,7 +80,6 @@ typedef struct ads_struct {
                char *server_site_name;
                char *client_site_name;
                time_t current_time;
-               int tried_closest_dc;
                char *schema_path;
                char *config_path;
        } config;
index 6324a22041fdbe713f637b8eeefa282d0191ed54..6ada66ca40d9ccf1eb2a4d5eb8c8fddd71d055a5 100644 (file)
@@ -75,7 +75,6 @@ void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct
        ndr_print_string(ndr, "server_site_name", r->config.server_site_name);
        ndr_print_string(ndr, "client_site_name", r->config.client_site_name);
        ndr_print_time_t(ndr, "current_time", r->config.current_time);
-       ndr_print_bool(ndr, "tried_closest_dc", r->config.tried_closest_dc);
        ndr_print_string(ndr, "schema_path", r->config.schema_path);
        ndr_print_string(ndr, "config_path", r->config.config_path);
        ndr->depth--;
index b03fefe14a1362e15c85d08441bc63e84fd8bec5..27d534665c4c0f1d91cb29c2fb10c010dc6acb58 100644 (file)
@@ -293,7 +293,7 @@ retry:
 
                tried_closest_dc = true; /* avoid loop */
 
-               if (!ads->config.tried_closest_dc) {
+               if (!ads_closest_dc(ads)) {
 
                        namecache_delete(ads->server.realm, 0x1C);
                        namecache_delete(ads->server.workgroup, 0x1C);