From 861ee9319f3cce8f104fd30c7139323ac3d3319d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 11 Aug 2013 13:08:49 +0200 Subject: [PATCH] s3:client: avoid interpret_protocol() lp_set_cmdline("client max protocol",...) and lp_cli_maxprotocol() are the more generic solution. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source3/client/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index 1f63052651..44e1efd6db 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -58,7 +58,7 @@ const char *cmd_ptr = NULL; static int io_bufsize = 524288; static int name_type = 0x20; -static int max_protocol = PROTOCOL_NT1; +static int max_protocol = -1; static int process_tok(char *tok); static int cmd_help(void); @@ -5456,7 +5456,7 @@ static int do_message_op(struct user_auth_info *a_info) } break; case 'm': - max_protocol = interpret_protocol(poptGetOptArg(pc), max_protocol); + lp_set_cmdline("client max protocol", poptGetOptArg(pc)); break; case 'T': /* We must use old option processing for this. Find the @@ -5574,6 +5574,8 @@ static int do_message_op(struct user_auth_info *a_info) /* Ensure we have a password (or equivalent). */ set_cmdline_auth_info_getpass(auth_info); + max_protocol = lp_cli_maxprotocol(); + if (tar_type) { if (cmdstr) process_command_string(cmdstr); -- 2.34.1