diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-11-14 12:31:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:18 -0500 |
commit | de5d71aebe4e415fcebbfacb852b190498cbf7bf (patch) | |
tree | 2aa0cf59e9275724f5612fff23cff7655883f37a /source4/libcli/smb2/write.c | |
parent | 61317df8aab2fe2fd47baba8a137566df7b23395 (diff) | |
download | samba-de5d71aebe4e415fcebbfacb852b190498cbf7bf.tar.gz samba-de5d71aebe4e415fcebbfacb852b190498cbf7bf.tar.bz2 samba-de5d71aebe4e415fcebbfacb852b190498cbf7bf.zip |
r11722: make the smb2_push/pull functions take a smb2_request_buffer
and the pull ones also a TALLOC_CTX, then we can reuse this functions
in the server later
metze
(This used to be commit 9b616516cae269f0870e9b9a9cecd8ee3f0a9095)
Diffstat (limited to 'source4/libcli/smb2/write.c')
-rw-r--r-- | source4/libcli/smb2/write.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/libcli/smb2/write.c b/source4/libcli/smb2/write.c index e458a540e8..a8e644f2d1 100644 --- a/source4/libcli/smb2/write.c +++ b/source4/libcli/smb2/write.c @@ -30,6 +30,7 @@ */ struct smb2_request *smb2_write_send(struct smb2_tree *tree, struct smb2_write *io) { + NTSTATUS status; struct smb2_request *req; req = smb2_request_init_tree(tree, SMB2_OP_WRITE, io->in.data.length + 0x30); @@ -41,7 +42,11 @@ struct smb2_request *smb2_write_send(struct smb2_tree *tree, struct smb2_write * SBVAL(req->out.body, 0x08, io->in.offset); smb2_put_handle(req->out.body+0x10, &io->in.handle); memcpy(req->out.body+0x20, io->in._pad, 0x10); - memcpy(req->out.body+0x30, io->in.data.data, io->in.data.length); + + status = smb2_push_blob(&req->out, req->out.body+0x30, io->in.data); + if (!NT_STATUS_IS_OK(status)) { + return NULL; + } smb2_transport_send(req); |