summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-01-05 14:12:44 +0100
committerVolker Lendecke <vl@samba.org>2011-01-07 13:28:06 +0100
commitb4041b59b2977b821f1f786e42c9bfac9763d7ea (patch)
tree974382408ff48cf80ff031002b06c67279498c34 /source3/libsmb
parentf9520008dfbea495636fdf591b5c998056082633 (diff)
downloadsamba-b4041b59b2977b821f1f786e42c9bfac9763d7ea.tar.gz
samba-b4041b59b2977b821f1f786e42c9bfac9763d7ea.tar.bz2
samba-b4041b59b2977b821f1f786e42c9bfac9763d7ea.zip
s3: Use the new nbt_getdc in dsgetdcname()
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/dsgetdcname.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 63621ed52f..cc486c122e 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -950,26 +950,13 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
return NT_STATUS_UNSUCCESSFUL;
}
- if (send_getdc_request(msg_ctx,
- &dclist[i].ss, domain_name,
- NULL, nt_version, dgm_id))
- {
- int k;
- smb_msleep(300);
- for (k=0; k<5; k++) {
- if (receive_getdc_response(mem_ctx,
- &dclist[i].ss,
- domain_name,
- dgm_id,
- &nt_version,
- &dc_name,
- &r)) {
- store_cache = true;
- namecache_store(dc_name, NBT_NAME_SERVER, 1, &ip_list);
- goto make_reply;
- }
- smb_msleep(1500);
- }
+ status = nbt_getdc(msg_ctx, &dclist[i].ss, domain_name,
+ NULL, nt_version,
+ mem_ctx, &nt_version, &dc_name, &r);
+ if (NT_STATUS_IS_OK(status)) {
+ store_cache = true;
+ namecache_store(dc_name, NBT_NAME_SERVER, 1, &ip_list);
+ goto make_reply;
}
if (name_status_find(domain_name,