diff options
author | Volker Lendecke <vl@samba.org> | 2011-04-02 11:46:30 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-04-26 12:22:55 -0700 |
commit | 0226428eb9d7c6d3a4984d571622f21e9c82e408 (patch) | |
tree | f45e1a38b93b580d554ef8b7ad1f47c1cdb48e44 /source3/utils | |
parent | d018fccb705e91f33f3211cdc5b8a4006d032f65 (diff) | |
download | samba-0226428eb9d7c6d3a4984d571622f21e9c82e408.tar.gz samba-0226428eb9d7c6d3a4984d571622f21e9c82e408.tar.bz2 samba-0226428eb9d7c6d3a4984d571622f21e9c82e408.zip |
s3: Use cli_writeall instead of cli_write
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_printer.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 7a22587174..06023649ec 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -387,20 +387,19 @@ NTSTATUS net_copy_file(struct net_context *c, while (is_file) { /* copying file */ - int n, ret; + int n; n = cli_read(cli_share_src, fnum_src, data, nread, read_size); if (n <= 0) break; - ret = cli_write(cli_share_dst, fnum_dst, 0, data, - nread, n); + nt_status = cli_writeall(cli_share_dst, fnum_dst, 0, + (uint8_t *)data, nread, n, NULL); - if (n != ret) { + if (!NT_STATUS_IS_OK(nt_status)) { d_fprintf(stderr, _("Error writing file: %s\n"), - cli_errstr(cli_share_dst)); - nt_status = cli_nt_error(cli_share_dst); + nt_errstr(nt_status)); goto out; } |