diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-07 14:41:24 -0700 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-08-15 09:07:05 +0200 |
commit | 00f784ec91d2cfa95b20327ac20f5bc3fa1f400e (patch) | |
tree | f0dfed5bd884049cccd80468295c367e72e7eee6 /source3/libsmb | |
parent | 97288b7f1048c1bf712463293a1e62737738292c (diff) | |
download | samba-00f784ec91d2cfa95b20327ac20f5bc3fa1f400e.tar.gz samba-00f784ec91d2cfa95b20327ac20f5bc3fa1f400e.tar.bz2 samba-00f784ec91d2cfa95b20327ac20f5bc3fa1f400e.zip |
libcli/smb: Fix smb2cli_write_recv() and smb2cli_write() to return the bytes written.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cli_np_tstream.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/libsmb/cli_np_tstream.c b/source3/libsmb/cli_np_tstream.c index c7ec664c51..07835a5bc2 100644 --- a/source3/libsmb/cli_np_tstream.c +++ b/source3/libsmb/cli_np_tstream.c @@ -527,8 +527,11 @@ static void tstream_cli_np_writev_write_done(struct tevent_req *subreq) if (cli_nps->is_smb1) { status = cli_write_andx_recv(subreq, &written); } else { - status = smb2cli_write_recv(subreq); - written = cli_nps->write.ofs; // TODO: get the value from the server + uint32_t smb2_written; + status = smb2cli_write_recv(subreq, &smb2_written); + if (NT_STATUS_IS_OK(status)) { + written = smb2_written; + } } TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { |