diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-11-25 08:24:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:43 -0500 |
commit | d90914dda878a21372a9e6c4025a61f903c12313 (patch) | |
tree | 93c1c8014343fe06555b5ad1c35d3fb496aa0cf5 /source4/libcli/smb2/setinfo.c | |
parent | b227b98a6c87b18db2bc949241ead6bbc46baff4 (diff) | |
download | samba-d90914dda878a21372a9e6c4025a61f903c12313.tar.gz samba-d90914dda878a21372a9e6c4025a61f903c12313.tar.bz2 samba-d90914dda878a21372a9e6c4025a61f903c12313.zip |
r11895: - reorder some code to make it easier to follow, how the fields appear on the wire
- add some comments to the header file, to represent the wire format
metze
(This used to be commit fa98f09f8b8829e66aa37cd947ab4f0cbb7b5476)
Diffstat (limited to 'source4/libcli/smb2/setinfo.c')
-rw-r--r-- | source4/libcli/smb2/setinfo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/libcli/smb2/setinfo.c b/source4/libcli/smb2/setinfo.c index d6c5555a33..ce03a69482 100644 --- a/source4/libcli/smb2/setinfo.c +++ b/source4/libcli/smb2/setinfo.c @@ -30,13 +30,20 @@ */ struct smb2_request *smb2_setinfo_send(struct smb2_tree *tree, struct smb2_setinfo *io) { + NTSTATUS status; struct smb2_request *req; req = smb2_request_init_tree(tree, SMB2_OP_SETINFO, 0x20, io->in.blob.length); if (req == NULL) return NULL; SSVAL(req->out.body, 0x02, io->in.level); - smb2_push_s32o32_blob(&req->out, 0x04, io->in.blob); + + status = smb2_push_s32o32_blob(&req->out, 0x04, io->in.blob); + if (!NT_STATUS_IS_OK(status)) { + talloc_free(req); + return NULL; + } + SIVAL(req->out.body, 0x0C, io->in.flags); smb2_push_handle(req->out.body+0x10, &io->in.handle); |