From 257809558bfab3e45703cf8be76357596392a3ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 26 Mar 2009 20:32:55 +0100 Subject: s3:net: add --request-timeout option metze --- source3/utils/net.c | 1 + source3/utils/net.h | 1 + source3/utils/net_util.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/source3/utils/net.c b/source3/utils/net.c index 7823a98219..bd5107af53 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -651,6 +651,7 @@ static struct functable net_func[] = { {"force", 'f', POPT_ARG_NONE, &c->opt_force}, {"stdin", 'i', POPT_ARG_NONE, &c->opt_stdin}, {"timeout", 't', POPT_ARG_INT, &c->opt_timeout}, + {"request-timeout",0,POPT_ARG_INT, &c->opt_request_timeout}, {"machine-pass",'P', POPT_ARG_NONE, &c->opt_machine_pass}, {"kerberos", 'k', POPT_ARG_NONE, &c->opt_kerberos}, {"myworkgroup", 'W', POPT_ARG_STRING, &c->opt_workgroup}, diff --git a/source3/utils/net.h b/source3/utils/net.h index 2d72756def..d88f962d41 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -43,6 +43,7 @@ struct net_context { const char *opt_container; int opt_flags; int opt_timeout; + int opt_request_timeout; const char *opt_target_workgroup; int opt_machine_pass; int opt_localgroup; diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index c6b6ee9e80..2915ffb809 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -521,6 +521,8 @@ NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain, d_fprintf(stderr, "Connection failed: %s\n", nt_errstr(nt_status)); cli = NULL; + } else if (c->opt_request_timeout) { + cli_set_timeout(cli, c->opt_request_timeout * 1000); } done: -- cgit