svn commit: samba r19159 - in branches/SAMBA_3_0/source/nsswitch: .
jra at samba.org
jra at samba.org
Fri Oct 6 21:35:26 GMT 2006
Author: jra
Date: 2006-10-06 21:35:26 +0000 (Fri, 06 Oct 2006)
New Revision: 19159
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19159
Log:
The getdc call can take a long time. Allow for timeouts.
Jeremy.
Modified:
branches/SAMBA_3_0/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 2006-10-06 20:09:10 UTC (rev 19158)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2006-10-06 21:35:26 UTC (rev 19159)
@@ -294,7 +294,7 @@
NTSTATUS result;
WERROR werr;
TALLOC_CTX *mem_ctx;
-
+ unsigned int orig_timeout;
fstring tmp;
char *p;
@@ -320,9 +320,17 @@
return False;
}
+ /* This call can take a long time - allow the server to time out.
+ 35 seconds should do it. */
+
+ orig_timeout = cli_set_timeout(netlogon_pipe->cli, 35000);
+
werr = rpccli_netlogon_getdcname(netlogon_pipe, mem_ctx, our_domain->dcname,
domain->name, tmp);
+ /* And restore our original timeout. */
+ cli_set_timeout(netlogon_pipe->cli, orig_timeout);
+
talloc_destroy(mem_ctx);
if (!W_ERROR_IS_OK(werr)) {
More information about the samba-cvs
mailing list