From 3eadd7e5dfa65bc0dfb41be9948a27993d5c58b9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 21 Oct 2005 21:46:49 +0000 Subject: r11253: Fix an annoying timeout when no nmbd is around (This used to be commit 10fb32ec52b32b72a46a783b73c6dd1f24625d9b) --- source3/nsswitch/winbindd_cm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index c91f955568..bd78f7687f 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -581,17 +581,17 @@ static BOOL receive_getdc_response(struct in_addr dc_ip, static void dcip_to_name( const char *domainname, const char *realm, const DOM_SID *sid, struct in_addr ip, fstring name ) { - int i; /* try GETDC requests first */ - send_getdc_request(ip, domainname, sid); - smb_msleep(100); - - for (i=0; i<5; i++) { - if (receive_getdc_response(ip, domainname, name)) - return; - smb_msleep(500); + if (send_getdc_request(ip, domainname, sid)) { + int i; + smb_msleep(100); + for (i=0; i<5; i++) { + if (receive_getdc_response(ip, domainname, name)) + return; + smb_msleep(500); + } } /* try node status request */ -- cgit