summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_netlogon.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-04-19 23:27:35 +0200
committerVolker Lendecke <vl@samba.org>2008-04-20 00:14:26 +0200
commite1102b8f48aeebe7d4e730d2b432a1503b425210 (patch)
tree3179083bb844b6537f3a88c1df2100f51fb6fc81 /source3/rpcclient/cmd_netlogon.c
parent9048cafbeaf82d1916de6538024fd660612dd25f (diff)
downloadsamba-e1102b8f48aeebe7d4e730d2b432a1503b425210.tar.gz
samba-e1102b8f48aeebe7d4e730d2b432a1503b425210.tar.bz2
samba-e1102b8f48aeebe7d4e730d2b432a1503b425210.zip
Introduce rpccli_set_timeout()
Reduce dependency on "cli" member of rpc_pipe_client struct (This used to be commit 2e4c1ba38963cffe4c3f25ab24bc28975f2fc291)
Diffstat (limited to 'source3/rpcclient/cmd_netlogon.c')
-rw-r--r--source3/rpcclient/cmd_netlogon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index a30dd740e2..12d8cf3052 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -101,14 +101,15 @@ static WERROR cmd_netlogon_getanydcname(struct rpc_pipe_client *cli,
}
/* Make sure to wait for our DC's reply */
- old_timeout = cli_set_timeout(cli->cli, MAX(cli->cli->timeout,30000)); /* 30 seconds. */
+ old_timeout = rpccli_set_timeout(cli, 30000); /* 30 seconds. */
+ rpccli_set_timeout(cli, MAX(old_timeout, 30000)); /* At least 30 sec */
status = rpccli_netr_GetAnyDCName(cli, mem_ctx,
cli->desthost,
argv[1],
&dcname,
&werr);
- cli_set_timeout(cli->cli, old_timeout);
+ rpccli_set_timeout(cli, old_timeout);
if (!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);
@@ -140,14 +141,15 @@ static WERROR cmd_netlogon_getdcname(struct rpc_pipe_client *cli,
}
/* Make sure to wait for our DC's reply */
- old_timeout = cli_set_timeout(cli->cli, MAX(cli->cli->timeout,30000)); /* 30 seconds. */
+ old_timeout = rpccli_set_timeout(cli, 30000); /* 30 seconds. */
+ rpccli_set_timeout(cli, MAX(30000, old_timeout)); /* At least 30 sec */
status = rpccli_netr_GetDcName(cli, mem_ctx,
cli->desthost,
argv[1],
&dcname,
&werr);
- cli_set_timeout(cli->cli, old_timeout);
+ rpccli_set_timeout(cli, old_timeout);
if (!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);