diff options
Diffstat (limited to 'source3/utils/net_rpc_printer.c')
-rw-r--r-- | source3/utils/net_rpc_printer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index b7d2438df7..e4197d72ce 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -369,13 +369,14 @@ NTSTATUS net_copy_file(TALLOC_CTX *mem_ctx, while (is_file) { - int n = cli_read(cli_share_src, fnum_src, data, nread + start, + int n, ret; + n = cli_read(cli_share_src, fnum_src, data, nread + start, read_size); if (n <= 0) break; - int ret = cli_write(cli_share_dst, fnum_dst, 0, data, + ret = cli_write(cli_share_dst, fnum_dst, 0, data, nread + start, n); if (n != ret) { |