mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3:net: add --request-timeout option
metze
This commit is contained in:
parent
c0dfe0cf80
commit
257809558b
@ -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},
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user