summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-21 21:46:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:09 -0500
commit3eadd7e5dfa65bc0dfb41be9948a27993d5c58b9 (patch)
tree4ce75b359db637d1a23681fb5a2f3871181edfa4 /source3/nsswitch
parente7dba276858783b82d6d655d632d460176208473 (diff)
downloadsamba-3eadd7e5dfa65bc0dfb41be9948a27993d5c58b9.tar.gz
samba-3eadd7e5dfa65bc0dfb41be9948a27993d5c58b9.tar.bz2
samba-3eadd7e5dfa65bc0dfb41be9948a27993d5c58b9.zip
r11253: Fix an annoying timeout when no nmbd is around
(This used to be commit 10fb32ec52b32b72a46a783b73c6dd1f24625d9b)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cm.c16
1 files changed, 8 insertions, 8 deletions
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 */