diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-05-11 10:47:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:54 -0500 |
commit | dc86ab3e454d7219608d01879145dec5609acaa3 (patch) | |
tree | 5feacd2c479a6532ddb078d2b55db4144cc4e826 /source4/libcli/smb2/request.c | |
parent | cf83b29b582c4475e5c065dae7e214faf4710222 (diff) | |
download | samba-dc86ab3e454d7219608d01879145dec5609acaa3.tar.gz samba-dc86ab3e454d7219608d01879145dec5609acaa3.tar.bz2 samba-dc86ab3e454d7219608d01879145dec5609acaa3.zip |
r15532: add a BOOL body_dynamic_present, because the body_dynamic_size can be 0
also if the dynamic flag should be set
metze
(This used to be commit 7829100e1ee79f4f5d24004af221288e19c09b3e)
Diffstat (limited to 'source4/libcli/smb2/request.c')
-rw-r--r-- | source4/libcli/smb2/request.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c index 2476270d49..136b81e977 100644 --- a/source4/libcli/smb2/request.c +++ b/source4/libcli/smb2/request.c @@ -31,10 +31,19 @@ initialise a smb2 request */ struct smb2_request *smb2_request_init(struct smb2_transport *transport, uint16_t opcode, - uint16_t body_fixed_size, uint32_t body_dynamic_size) + uint16_t body_fixed_size, BOOL body_dynamic_present, + uint32_t body_dynamic_size) { struct smb2_request *req; + if (body_dynamic_present) { + if (body_dynamic_size == 0) { + body_dynamic_size = 1; + } + } else { + body_dynamic_size = 0; + } + req = talloc(transport, struct smb2_request); if (req == NULL) return NULL; @@ -95,10 +104,12 @@ struct smb2_request *smb2_request_init(struct smb2_transport *transport, uint16_ initialise a smb2 request for tree operations */ struct smb2_request *smb2_request_init_tree(struct smb2_tree *tree, uint16_t opcode, - uint16_t body_fixed_size, uint32_t body_dynamic_size) + uint16_t body_fixed_size, BOOL body_dynamic_present, + uint32_t body_dynamic_size) { struct smb2_request *req = smb2_request_init(tree->session->transport, opcode, - body_fixed_size, body_dynamic_size); + body_fixed_size, body_dynamic_present, + body_dynamic_size); if (req == NULL) return NULL; SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); |