diff options
Diffstat (limited to 'source3/client/client.c')
-rw-r--r-- | source3/client/client.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 67a2458a94..6491f39ed0 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -220,9 +220,7 @@ struct push_state { SMB_OFF_T nread; }; -static size_t push_source(uint8_t *inbuf, size_t n, - const uint8_t **outbuf, - void *priv) +static size_t push_source(uint8_t *buf, size_t n, void *priv) { struct push_state *state = (struct push_state *)priv; int result; @@ -231,7 +229,7 @@ static size_t push_source(uint8_t *inbuf, size_t n, return 0; } - result = readfile(inbuf, n, state->f); + result = readfile(buf, n, state->f); state->nread += result; return result; } @@ -1421,7 +1419,7 @@ static bool do_altname(const char *name) static int cmd_quit(void) { - cli_cm_shutdown(); + cli_shutdown(cli); exit(0); /* NOTREACHED */ return 0; @@ -1683,8 +1681,8 @@ static int do_put(const char *rname, const char *lname, bool reput) state.f = f; state.nread = 0; - status = cli_push(targetcli, fnum, 0, 0, io_bufsize, - false, push_source, &state); + status = cli_push(targetcli, fnum, 0, 0, io_bufsize, push_source, + &state); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, "cli_push returned %s\n", nt_errstr(status)); } @@ -1716,7 +1714,7 @@ static int do_put(const char *rname, const char *lname, bool reput) } if (f == x_stdin) { - cli_cm_shutdown(); + cli_shutdown(cli); exit(0); } @@ -3817,7 +3815,7 @@ static int cmd_logon(void) static int cmd_list_connect(void) { - cli_cm_display(); + cli_cm_display(cli); return 0; } @@ -4528,7 +4526,7 @@ static int process(const char *base_directory) if (base_directory && *base_directory) { rc = do_cd(base_directory); if (rc) { - cli_cm_shutdown(); + cli_shutdown(cli); return rc; } } @@ -4539,7 +4537,7 @@ static int process(const char *base_directory) process_stdin(); } - cli_cm_shutdown(); + cli_shutdown(cli); return rc; } @@ -4570,7 +4568,7 @@ static int do_host_query(const char *query_host) /* Workgroups simply don't make sense over anything else but port 139... */ - cli_cm_shutdown(); + cli_shutdown(cli); cli = cli_cm_open(talloc_tos(), NULL, query_host, "IPC$", true, smb_encrypt, max_protocol, 139, name_type); @@ -4583,7 +4581,7 @@ static int do_host_query(const char *query_host) list_servers(lp_workgroup()); - cli_cm_shutdown(); + cli_shutdown(cli); return(0); } @@ -4611,14 +4609,14 @@ static int do_tar_op(const char *base_directory) if (base_directory && *base_directory) { ret = do_cd(base_directory); if (ret) { - cli_cm_shutdown(); + cli_shutdown(cli); return ret; } } ret=process_tar(); - cli_cm_shutdown(); + cli_shutdown(cli); return(ret); } @@ -4665,12 +4663,12 @@ static int do_message_op(struct user_auth_info *auth_info) if (!cli_session_request(cli, &calling, &called)) { d_printf("session request failed\n"); - cli_cm_shutdown(); + cli_shutdown(cli); return 1; } send_message(get_cmdline_auth_info_username(auth_info)); - cli_cm_shutdown(); + cli_shutdown(cli); return 0; } |