svn commit: samba r11253 - branches/SAMBA_3_0/source/nsswitch
trunk/source/nsswitch
vlendec at samba.org
vlendec at samba.org
Fri Oct 21 21:46:50 GMT 2005
Author: vlendec
Date: 2005-10-21 21:46:49 +0000 (Fri, 21 Oct 2005)
New Revision: 11253
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11253
Log:
Fix an annoying timeout when no nmbd is around
Modified:
branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
trunk/source/nsswitch/winbindd_cm.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2005-10-21 21:43:39 UTC (rev 11252)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2005-10-21 21:46:49 UTC (rev 11253)
@@ -581,17 +581,17 @@
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 */
Modified: trunk/source/nsswitch/winbindd_cm.c
===================================================================
--- trunk/source/nsswitch/winbindd_cm.c 2005-10-21 21:43:39 UTC (rev 11252)
+++ trunk/source/nsswitch/winbindd_cm.c 2005-10-21 21:46:49 UTC (rev 11253)
@@ -581,17 +581,17 @@
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 */
More information about the samba-cvs
mailing list