diff options
author | Günther Deschner <gd@samba.org> | 2008-05-07 21:06:23 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-05-09 14:59:19 +0200 |
commit | 847f258632f6d49a3fd45f466c5d3d8c6222ff85 (patch) | |
tree | 88ca715d17e8b7e79dbe7f8a82f17de0fbafeef4 /source/libsmb | |
parent | d13fe66f3d9ba152e3e8197ee6682e175163a6cd (diff) | |
download | samba-847f258632f6d49a3fd45f466c5d3d8c6222ff85.tar.gz samba-847f258632f6d49a3fd45f466c5d3d8c6222ff85.tar.xz samba-847f258632f6d49a3fd45f466c5d3d8c6222ff85.zip |
dsgetdcname: simply call ourself with DS_FORCE_REDISCOVERY after cache expiry.
Guenther
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/dsgetdcname.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/source/libsmb/dsgetdcname.c b/source/libsmb/dsgetdcname.c index 388c7be3952..247cfd35265 100644 --- a/source/libsmb/dsgetdcname.c +++ b/source/libsmb/dsgetdcname.c @@ -196,22 +196,14 @@ static NTSTATUS dsgetdcname_cache_refresh(TALLOC_CTX *mem_ctx, const char *site_name, struct netr_DsRGetDCNameInfo *info) { - uint32_t nt_version = NETLOGON_VERSION_1; - - /* check if matching entry is older then 15 minutes, if yes, send - * CLDAP/MAILSLOT ping again and store the cached data */ - - if (ads_cldap_netlogon(mem_ctx, info->dc_unc, - info->domain_name, &nt_version, NULL)) { - - dsgetdcname_cache_delete(mem_ctx, domain_name); - - return dsgetdcname_cache_store(mem_ctx, - info->domain_name, - info); - } - - return NT_STATUS_INVALID_NETWORK_RESPONSE; + struct netr_DsRGetDCNameInfo *dc_info; + + return dsgetdcname(mem_ctx, + domain_name, + domain_guid, + site_name, + flags | DS_FORCE_REDISCOVERY, + &dc_info); } /**************************************************************** |