diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-07-09 15:10:44 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-02-19 18:22:26 +0100 |
commit | 60eec86ceb08814dabb986219f756d1645efb82c (patch) | |
tree | 4f18d1ec8e87bd07129bfe1abf633cdd7a60f735 /source3/client/client.c | |
parent | b753900b09e6b5001042e45388b72ad36e8a0093 (diff) | |
download | samba-60eec86ceb08814dabb986219f756d1645efb82c.tar.gz samba-60eec86ceb08814dabb986219f756d1645efb82c.tar.xz samba-60eec86ceb08814dabb986219f756d1645efb82c.zip |
clitar.c, client.c: add flag to know if there's a tar operation to do.
- remove tar_type global.
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: rebase against lp_cli_maxprotocol() changes]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/client/client.c')
-rw-r--r-- | source3/client/client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index b85da0856a..b74ec73370 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -47,7 +47,6 @@ extern int do_smb_browse(void); /* mDNS browsing */ extern bool override_logfile; -extern char tar_type; static int port = 0; static char *service; @@ -5379,7 +5378,7 @@ static int do_message_op(struct user_auth_info *a_info) main program ****************************************************************************/ - int main(int argc,char *argv[]) +int main(int argc,char *argv[]) { const char **const_argv = discard_const_p(const char *, argv); char *base_directory = NULL; @@ -5392,6 +5391,8 @@ static int do_message_op(struct user_auth_info *a_info) int rc = 0; bool tar_opt = false; bool service_opt = false; + extern struct tar tar_ctx; + struct poptOption long_options[] = { POPT_AUTOHELP @@ -5508,7 +5509,6 @@ static int do_message_op(struct user_auth_info *a_info) * position of the -T option in the raw argv[]. */ { int i; - extern struct tar tar_ctx; for (i = 1; i < argc; i++) { if (strncmp("-T", argv[i],2)==0) @@ -5608,7 +5608,7 @@ static int do_message_op(struct user_auth_info *a_info) if(new_name_resolve_order) lp_set_cmdline("name resolve order", new_name_resolve_order); - if (!tar_type && !query_host && !service && !message) { + if (!tar_to_process(&tar_ctx) && !query_host && !service && !message) { poptPrintUsage(pc, stderr, 0); exit(1); } @@ -5623,7 +5623,7 @@ static int do_message_op(struct user_auth_info *a_info) max_protocol = lp_client_max_protocol(); - if (tar_type) { + if (!tar_to_process(&tar_ctx)) { if (cmdstr) process_command_string(cmdstr); rc = do_tar_op(base_directory); |