summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-10-22 10:36:21 +0200
committerKarolin Seeger <kseeger@samba.org>2008-12-15 08:36:51 +0100
commit8df2422c7a1654db44c33bd871d13da1a531079d (patch)
treed31424215340d18ea1088be696d61582b0176057
parent807365d2cb15ea468e53449023299d17914b68dc (diff)
downloadsamba-8df2422c7a1654db44c33bd871d13da1a531079d.tar.gz
samba-8df2422c7a1654db44c33bd871d13da1a531079d.tar.xz
samba-8df2422c7a1654db44c33bd871d13da1a531079d.zip
s3: correctly detect if the current dc is the closest one
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) (cherry picked from commit 588f5aae669910fee6da7f807f330163496b4170) (cherry picked from commit b609f41baa035a15dafb18b2ec569a2b96968b17)
-rw-r--r--source/include/ads.h1
-rw-r--r--source/libads/ndr.c1
-rw-r--r--source/utils/net_ads.c2
3 files changed, 1 insertions, 3 deletions
diff --git a/source/include/ads.h b/source/include/ads.h
index b72d2509402..abff9eaa8c7 100644
--- a/source/include/ads.h
+++ b/source/include/ads.h
@@ -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;
diff --git a/source/libads/ndr.c b/source/libads/ndr.c
index 6324a22041f..6ada66ca40d 100644
--- a/source/libads/ndr.c
+++ b/source/libads/ndr.c
@@ -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--;
diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c
index 627374cb96b..95a68079bef 100644
--- a/source/utils/net_ads.c
+++ b/source/utils/net_ads.c
@@ -291,7 +291,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);